C++Builder Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
C++빌더 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
메신저 프로젝트
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
볼랜드포럼 광고 모집

C++빌더 Q&A
C++Builder Programming Q&A
[18942] Re:왕대박님...다시 한번 갈켜주세염..미디폼 로드시키기...
시후 [] 790 읽음    2002-05-28 13:23
자문 자답했습니다..델마당에가서 뒤지다 보니 비슷한게 있어서 해보니 되네염..맞는지는 몰겠지만..
미디폼을 show()로 불렀는데.. 폼의 onCreate이벤트에서 기냥 Action = caFree; 라고 했는데 맞나염....이글 보시구 틀린점이 잇으면 꼭 좀 리플달아 주세염..그럼 오늘도 즐프하세염..^^*



시후 님이 쓰신 글 :
: 미디폼을 2개이상 만들고 메인폼에서 각 버튼마다 각각의 미디폼을 불러 오려 하는데,,첫번째 버튼에서는 미디폼이 불려 지지만 다른 버튼에서는 불러오지를 못하네요..
: 왕대박님께서 하신 말씀을 잘못 이해한건지는 모르겠지만...도와주세염...
:
: // 메인폼.cpp
: //---------------------------------------------------------------------------
: #include <vcl.h>
: #pragma hdrstop
:
: #include "Main.h"
: //---------------------------------------------------------------------------
: #pragma resource "*.dfm"
: TMainForm *MainForm;
: TSwListForm *SwListForm;  // 왕대박님이 하신 말씀인거 같은데 맞나여..?
: TSearchForm *SearchForm;  //
: //---------------------------------------------------------------------------
: __fastcall TMainForm::TMainForm(TComponent *Owner)
:     : TForm(Owner)
: {
: }
: //---------------------------------------------------------------------------
: void __fastcall TMainForm::Timer1Timer(TObject *Sender)
: {
:         StatusBar1->Panels->Items[3]->Text = FormatDateTime("yyyy-mm-dd dddd", Date());
:         StatusBar1->Panels->Items[4]->Text = FormatDateTime("hh:mm:ss", Now());
: }
: //---------------------------------------------------------------------------
: void __fastcall TMainForm::ToolButton1Click(TObject *Sender)
: {
:         SwListForm = new TSwListForm(Application);  // 미디폼 생성(요건 불러오네요)        SwListForm->Tag = 100;
           SwListForm->Show(); ---->요렇게 했더니 폼이 모두 뜨네요..
: }
: //---------------------------------------------------------------------------
: void __fastcall TMainForm::ToolButton3Click(TObject *Sender)
: {
:         SearchForm = new TSearchForm(Application);  // 미디폼 생성(요건 죽어도 안불러오네요)SearchForm->Tag = 200;
           SearchForm->Show();
: }
: //---------------------------------------------------------------------------
: void __fastcall TMainForm::ToolButton4Click(TObject *Sender)
: {
:
: }
: //---------------------------------------------------------------------------
: void __fastcall TMainForm::ToolButton5Click(TObject *Sender)
: {
: int cnt = MDIChildCount;
:
:         if(cnt > 0)
:         {
:                 Application->MessageBox("폼이 열려있는 동안 애플리케이션을 닫을 수 없습니다.", "정보",
:                                          MB_OK|MB_ICONSTOP);
:         }
:         else
:         {
:                 switch(Application->MessageBox("프로그램을 종료하시겠습니까?","정보",
:                                                 MB_YESNO|MB_ICONQUESTION|MB_DEFBUTTON1))
:                 {
:                         case IDYES : Close(); break;
:                 }
:         }
: }
: //---------------------------------------------------------------------------
:
:
:
: // 메인폼.h
: //----------------------------------------------------------------------------
: #ifndef MainH
: #define MainH
: //----------------------------------------------------------------------------
: #include "SwListUnit.h"
: #include "SearchUnit.h"
: #include <vcl\ComCtrls.hpp>
: #include <vcl\ExtCtrls.hpp>
: #include <vcl\Messages.hpp>
: #include <vcl\Buttons.hpp>
: #include <vcl\Dialogs.hpp>
: #include <vcl\StdCtrls.hpp>
: #include <vcl\Menus.hpp>
: #include <vcl\Controls.hpp>
: #include <vcl\Forms.hpp>
: #include <vcl\Graphics.hpp>
: #include <vcl\Classes.hpp>
: #include <vcl\SysUtils.hpp>
: #include <vcl\Windows.hpp>
: #include <vcl\System.hpp>
: #include <ActnList.hpp>
: #include <ImgList.hpp>
: #include <StdActns.hpp>
: #include <ToolWin.hpp>
: //----------------------------------------------------------------------------
: class TMainForm : public TForm
: {
: __published:
:     TMainMenu *MainMenu1;
:         TActionList *ActionList1;
:         TStatusBar *StatusBar1;
:         TTimer *Timer1;
:         TCoolBar *CoolBar1;
:         TToolBar *ToolBar1;
:         TToolButton *ToolButton1;
:         TToolButton *ToolButton2;
:         TToolButton *ToolButton3;
:         TToolButton *ToolButton4;
:         TToolButton *ToolButton10;
:         TToolButton *ToolButton5;
:         TMenuItem *N111111;
:         TImageList *ImageList1;
:         TImage *Image1;
:         void __fastcall Timer1Timer(TObject *Sender);
:         void __fastcall ToolButton1Click(TObject *Sender);
:         void __fastcall ToolButton5Click(TObject *Sender);
:         void __fastcall ToolButton3Click(TObject *Sender);
:         void __fastcall ToolButton4Click(TObject *Sender);
: private:
: public:
:     virtual __fastcall TMainForm(TComponent *Owner);
: };
: //----------------------------------------------------------------------------
: extern TMainForm *MainForm;
: extern TSwListForm *SwListForm;  // 요거 이렇게 하는게 맞나요..?
: extern TSearchForm *SearchForm;  //
: //----------------------------------------------------------------------------
: #endif
:
:
:
:
: // mdiapp.cpp
: //---------------------------------------------------------------------
: #include <vcl.h>
: #pragma hdrstop
: //---------------------------------------------------------------------
: USEFORM("Main.cpp", MainForm);
: USEFORM("SwListUnit.cpp", SwListForm);
: USEFORM("SearchUnit.cpp", SearchForm);
: USERES("mdiapp.res");
: //---------------------------------------------------------------------------
: WINAPI WinMain(HINSTANCE, HINSTANCE, LPSTR, int)
: {
:     Application->Initialize();
:     Application->CreateForm(__classid(TMainForm), &MainForm);
:         Application->Run();
:
:     return 0;
: }
: //---------------------------------------------------------------------
:

+ -

관련 글 리스트
18939 왕대박님...다시 한번 갈켜주세염..미디폼 로드시키기... 시후 672 2002/05/28
18942     Re:왕대박님...다시 한번 갈켜주세염..미디폼 로드시키기... 시후 790 2002/05/28
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.