|
From: Michael Tissington on 15 Feb 2005 17:40 I have an MFC Dialog class and am trying to use OnActivate I look at the window with Spy++ and see the WM_ACTIVATE message being sent to the window, however my OnActivate method is not being called. Any ideas please? -- Michael Tissington http://www.oaklodge.com http://www.tabtag.com
From: Tom Serface on 15 Feb 2005 18:02 Not sure what you're trying to do, but you might want to take a look at OnShowWindow() That one works well for me. Also, for initializations you can OnInitDialog() Tom "Michael Tissington" <michael(a)nospam.com> wrote in message news:uiJ9N96EFHA.3824(a)TK2MSFTNGP10.phx.gbl... >I have an MFC Dialog class and am trying to use OnActivate > > I look at the window with Spy++ and see the WM_ACTIVATE message being sent > to the window, however my OnActivate method is not being called. > > Any ideas please? > > -- > Michael Tissington > http://www.oaklodge.com > http://www.tabtag.com > > >
From: Michael Tissington on 15 Feb 2005 18:16 Thanks - I'm already using these ... Basically I want to automatically close the dialog if the user clicks on anything (any other window or application) other than the dialog. -- Michael Tissington http://www.oaklodge.com http://www.tabtag.com "Tom Serface" <tserface(a)msn.com> wrote in message news:uX$LoJ7EFHA.3384(a)tk2msftngp13.phx.gbl... > Not sure what you're trying to do, but you might want to take a look at > OnShowWindow() That one works well for me. > > Also, for initializations you can OnInitDialog() > > Tom > > "Michael Tissington" <michael(a)nospam.com> wrote in message > news:uiJ9N96EFHA.3824(a)TK2MSFTNGP10.phx.gbl... >>I have an MFC Dialog class and am trying to use OnActivate >> >> I look at the window with Spy++ and see the WM_ACTIVATE message being >> sent to the window, however my OnActivate method is not being called. >> >> Any ideas please? >> >> -- >> Michael Tissington >> http://www.oaklodge.com >> http://www.tabtag.com >> >> >> > >
From: AliR on 15 Feb 2005 18:19 Make sure that you have this entry in your message map ON_WM_ACTIVATE() something like this BEGIN_MESSAGE_MAP(CChildDlg, CDialog) ON_WM_ACTIVATE() END_MESSAGE_MAP() void CChildDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CDialog::OnActivate(nState, pWndOther, bMinimized); // TODO: Add your message handler code here } AliR. "Michael Tissington" <michael(a)nospam.com> wrote in message news:uiJ9N96EFHA.3824(a)TK2MSFTNGP10.phx.gbl... > I have an MFC Dialog class and am trying to use OnActivate > > I look at the window with Spy++ and see the WM_ACTIVATE message being sent > to the window, however my OnActivate method is not being called. > > Any ideas please? > > -- > Michael Tissington > http://www.oaklodge.com > http://www.tabtag.com > > >
From: Michael Tissington on 15 Feb 2005 18:29 Its in there but still not getting called. -- Michael Tissington http://www.oaklodge.com http://www.tabtag.com "AliR" <AliR(a)newsgroup.nospam> wrote in message news:ssvQd.10382$D34.2664(a)newssvr12.news.prodigy.com... > Make sure that you have this entry in your message map > > ON_WM_ACTIVATE() > > something like this > > BEGIN_MESSAGE_MAP(CChildDlg, CDialog) > ON_WM_ACTIVATE() > END_MESSAGE_MAP() > > > void CChildDlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) > { > CDialog::OnActivate(nState, pWndOther, bMinimized); > > // TODO: Add your message handler code here > } > > AliR. > > "Michael Tissington" <michael(a)nospam.com> wrote in message > news:uiJ9N96EFHA.3824(a)TK2MSFTNGP10.phx.gbl... >> I have an MFC Dialog class and am trying to use OnActivate >> >> I look at the window with Spy++ and see the WM_ACTIVATE message being >> sent >> to the window, however my OnActivate method is not being called. >> >> Any ideas please? >> >> -- >> Michael Tissington >> http://www.oaklodge.com >> http://www.tabtag.com >> >> >> > >
|
Next
|
Last
Pages: 1 2 Prev: How to set/reset word wrapping in a CEdit control? Next: listView question |