calling modal message dialog from external dll
-
Hello, I have application where i need to show modal message window. It should be custom ( not AfxMessageBox ) , so i built a class CPopupDlg which is inherited from CDialog and it's a DLL , because i need to call it from different dialogs ( and i don't want to duplicate it . It doesn't have title bar. CPopup constructor gets "CWnd* pParent" ( for z-order , etc ) So , i call for it in following way ( from another dialogs ): CPopupDlg* pPopupDlg; pPopupDlg = new CPopupDlg( this ); pPopupDlg->SetPopupMessage( m_strPopupMsg ); pPopupDlg->DoModal(); The dialog itself works fine , showing needed msg with custom colors , custom buttons , etc. BUT , there is a problem. There's a title above CPopup dialog ( while originally it doesn't have title bar ) of dialog calling for it. For example , if calling dialog has title text "My Test Window" this text will appear in title above CPopup dialog . Here's screenshot Here's entry from .rc file ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_POPUP_DIALOG DIALOG DISCARDABLE 0, 0, 187, 92 STYLE WS_POPUP FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,130,7,50,14,NOT WS_VISIBLE PUSHBUTTON "Cancel",IDCANCEL,130,24,50,14,NOT WS_VISIBLE | WS_DISABLED CONTROL "popupOK",IDC_POPUP_OK,"Button",BS_OWNERDRAW | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,15,65,55,15 CONTROL "popupCancel",IDC_POPUP_CANCEL,"Button",BS_OWNERDRAW | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,115,60,50,20 END Any help greatly appreciated ( it's pretty urgent ), thanks a lot
-
Hello, I have application where i need to show modal message window. It should be custom ( not AfxMessageBox ) , so i built a class CPopupDlg which is inherited from CDialog and it's a DLL , because i need to call it from different dialogs ( and i don't want to duplicate it . It doesn't have title bar. CPopup constructor gets "CWnd* pParent" ( for z-order , etc ) So , i call for it in following way ( from another dialogs ): CPopupDlg* pPopupDlg; pPopupDlg = new CPopupDlg( this ); pPopupDlg->SetPopupMessage( m_strPopupMsg ); pPopupDlg->DoModal(); The dialog itself works fine , showing needed msg with custom colors , custom buttons , etc. BUT , there is a problem. There's a title above CPopup dialog ( while originally it doesn't have title bar ) of dialog calling for it. For example , if calling dialog has title text "My Test Window" this text will appear in title above CPopup dialog . Here's screenshot Here's entry from .rc file ///////////////////////////////////////////////////////////////////////////// // // Dialog // IDD_POPUP_DIALOG DIALOG DISCARDABLE 0, 0, 187, 92 STYLE WS_POPUP FONT 8, "MS Sans Serif" BEGIN DEFPUSHBUTTON "OK",IDOK,130,7,50,14,NOT WS_VISIBLE PUSHBUTTON "Cancel",IDCANCEL,130,24,50,14,NOT WS_VISIBLE | WS_DISABLED CONTROL "popupOK",IDC_POPUP_OK,"Button",BS_OWNERDRAW | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,15,65,55,15 CONTROL "popupCancel",IDC_POPUP_CANCEL,"Button",BS_OWNERDRAW | NOT WS_VISIBLE | WS_DISABLED | WS_TABSTOP,115,60,50,20 END Any help greatly appreciated ( it's pretty urgent ), thanks a lot