DoModal to call other Dialog
-
Hi, I use DoModal() to open a Dialog in a Dialog-Based project. In the main OnInitDialog I hide the SIP button, and when I use DoModal() to open a second Dialog, the SIP continues hide, but when I close the second Dialog, the SIP button and the bar appears in the Main Dialog. Is it possible to execute OnInitDialog again to hide the bar? Or exists another way for doing it? Thanks in advance. Regards, Javier
-
Hi, I use DoModal() to open a Dialog in a Dialog-Based project. In the main OnInitDialog I hide the SIP button, and when I use DoModal() to open a second Dialog, the SIP continues hide, but when I close the second Dialog, the SIP button and the bar appears in the Main Dialog. Is it possible to execute OnInitDialog again to hide the bar? Or exists another way for doing it? Thanks in advance. Regards, Javier
Your dialog window receives a WM_ACTIVATE message when it is shown. Regards, João Paulo Figueira Embedded MVP
-
Your dialog window receives a WM_ACTIVATE message when it is shown. Regards, João Paulo Figueira Embedded MVP
Ok, initially for a dialog this message doesn't appear in the ClassWizard. I put a message handler in the *.cpp. Is this the way?:
void CFullScreen2Dlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CDialog::OnActivate(nState, pWndOther, bMinimized); // HERE I PUT ANY CODE WHICH IS EXECUTED WHEN THIS MESSAGE IS SENT... }
I test in this way and it's not right. Can you help me? Thanks. Regards, Javier -
Ok, initially for a dialog this message doesn't appear in the ClassWizard. I put a message handler in the *.cpp. Is this the way?:
void CFullScreen2Dlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CDialog::OnActivate(nState, pWndOther, bMinimized); // HERE I PUT ANY CODE WHICH IS EXECUTED WHEN THIS MESSAGE IS SENT... }
I test in this way and it's not right. Can you help me? Thanks. Regards, JavierDid you write an entry on the message map? Regards, João Paulo Figueira Embedded MVP
-
Ok, initially for a dialog this message doesn't appear in the ClassWizard. I put a message handler in the *.cpp. Is this the way?:
void CFullScreen2Dlg::OnActivate(UINT nState, CWnd* pWndOther, BOOL bMinimized) { CDialog::OnActivate(nState, pWndOther, bMinimized); // HERE I PUT ANY CODE WHICH IS EXECUTED WHEN THIS MESSAGE IS SENT... }
I test in this way and it's not right. Can you help me? Thanks. Regards, JavierI repass it and it's works, thanks!. Is there a easy way to hide the below bar (where the SIP button is) in all the application? I suppose at the beginning...I try it in many ways and wrong... It's better than I hide this bar in each "Activate Message"... Regards, Javier