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
[11073] Re:[질문] 메세지 맵 사용시에 경고가 나타 납니다.
박지훈.임프 [cbuilder] 1061 읽음    2001-09-14 01:54
임프랍니다.

오늘은 비슷한 실수를 하신 분을 또 보는군요. ^^
다른 분은 재귀호출을 만들어내셨는데..

메시지맵의 END_MESSAGE_MAP(TControl)에서 TControl을 TForm으로 바꾸세요.

그럼 이만..


이창환 님이 쓰신 글 :
: 메세지 맵을 사용하여 다른 폼에 메세지를 전송하는
:
: 일을 할 경우에 "Functions containing switch are not expanded line"이라는 메세지가 나타납니다.
:
: 메세지 맵을 쓸 경우 항상 이렇제 나타나는데여.
:
: (Command-line option to suppress warning: -w-inl)
:
: 도움말에는 이런 메세지가 나오는 것으로 봐서는 컴파일 옵션을 바꾸어 주어야 하는 것은데
:
: 자세한 것을 알고 싶습니다.
:
: 메세지 맵 사용한 소스는
:
: //////////////////////////////////////////////////////////////////////////////
: // Form1.h
: //////////////////////////////////////////////////////////////////////////////
:
: #define WM_MYMESSAGE (WM_APP + 400)
: //---------------------------------------------------------------------------
: class TForm1 : public TForm
: {
: __published:    // IDE-managed Components
:     TButton *Button1;
:     TButton *Button2;
:     void __fastcall Button1Click(TObject *Sender);
:     void __fastcall Button2Click(TObject *Sender);
: private:    // User declarations
: public:        // User declarations
:     __fastcall TForm1(TComponent* Owner);
:
: };
:
: //////////////////////////////////////////////////////////////////////////////
: // Form1.cpp
: //////////////////////////////////////////////////////////////////////////////
: void __fastcall TForm1::Button2Click(TObject *Sender)
: {
:     PostMessage(Form2->Handle, WM_MYMESSAGE, 0,0);
: }
:
:
: //////////////////////////////////////////////////////////////////////////////
: // Form2.h
: //////////////////////////////////////////////////////////////////////////////
: #define WM_MYMESSAGE (WM_APP + 400)
: //---------------------------------------------------------------------------
: class TForm2 : public TForm
: {
: __published:    // IDE-managed Components
:     TEdit *Edit1;
: private:    // User declarations
: public:        // User declarations
:     __fastcall TForm2(TComponent* Owner);
:
: protected:
:     void __fastcall OnMyMessage(TMessage &Message);
: BEGIN_MESSAGE_MAP
:   MESSAGE_HANDLER(WM_MYMESSAGE, TMessage, OnMyMessage)
: END_MESSAGE_MAP(TControl)
: };
:
: //////////////////////////////////////////////////////////////////////////////
: // Form2.cpp
: //////////////////////////////////////////////////////////////////////////////
: void __fastcall TForm2::OnMyMessage(TMessage &Message)
: {
:     static int i = 0;
:     Edit1->Text = IntToStr(i++);
: }
:
: 입니다.
:
:

+ -

관련 글 리스트
10972 [질문] 메세지 맵 사용시에 경고가 나타 납니다. 이창환 799 2001/09/11
11073     Re:[질문] 메세지 맵 사용시에 경고가 나타 납니다. 박지훈.임프 1061 2001/09/14
10973     Re:[질문] 메세지 맵 사용시에 경고가 나타 납니다. 박세호 859 2001/09/11
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.