분명히 컴파일은 되는데 프로그램을 돌리면 그 폼이 안 떠요 ㅠㅠ
(상태는 첨부파일 2개를 보시면 돼요 ㅠㅠ)
왜 폼이 제대로 안 보이는 걸까요 ㅠㅠ
아무 에러도 안 뜨는데요 ㅠㅠㅠㅠㅠㅠ
심지어 프로젝트 속성 들어가서 메인 폼을 이걸로 하면 제대로 떠요 ㅠ
//---------------------------------------------------------------------------
#include
#pragma hdrstop
#include "save.h"
#include "gpac.h"
//---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.dfm"
TForm5 *Form5;
//---------------------------------------------------------------------------
__fastcall TForm5::TForm5(TComponent* Owner)
: TForm(Owner)
{
}
//---------------------------------------------------------------------------
void __fastcall TForm5::FormShow(TObject *Sender)
{
Label2->Caption = (String)(Form1->fileName);
if(Label2->Width <= MAX_LABEL2_WIDTH){
Label2->Left = Label1->Left + Label1->Width;
Label2->Top = Label1->Top;
Label3->Left = Label2->Left + Label2->Width;
Label3->Top = Label1->Top;
Form5->ClientHeight = POPUP_DEFAULT_HEIGHT;
}
else{
Label2->Left = Label1->Left;
Label2->Top = Label1->Top+LABEL_GAP;
Label3->Left = Label2->Left;
Label3->Top = Label1->Top+LABEL_GAP;
Form5->ClientHeight = POPUP_DEFAULT_HEIGHT + LABEL_GAP*2;
}
Form1->selected = false;
}
//---------------------------------------------------------------------------
void __fastcall TForm5::Button1Click(TObject *Sender)
{
Form1->willSave = true;
Form1->cancle = false;
Form5->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm5::Button2Click(TObject *Sender)
{
Form1->willSave = false;
Form1->cancle = false;
Form5->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm5::Button3Click(TObject *Sender)
{
Form1->willSave = false;
Form1->cancle = true;
Form5->Close();
}
//---------------------------------------------------------------------------
void __fastcall TForm5::FormClose(TObject *Sender, TCloseAction &Action)
{
Form1->selected = true;
}
//---------------------------------------------------------------------------
이건 소스코드예요...
Label1은 "변경 내용을 " 이라고 되어 있는 거고요
Label2는 아직 아무 내용도 없고 그때그때 값이 달라져요...
Label3는 "에 저장하시겠습니까?" 라고 되어 있는 거고요
Button1 은 "예", Button2는 "아니오", Button3은 "취소"예요
글구 MAX_LABEL2_WIDTH, POPUP_DEFAULT_HEIGHT, LABEL_GAP은
gpac1.h(메인 폼의 헤더 파일)에 있는 constant int variable이예요 ㅠㅠ
|