Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. calling modal message dialog from external dll

calling modal message dialog from external dll

Scheduled Pinned Locked Moved C / C++ / MFC
helpcomtutorial
2 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • L Offline
    L Offline
    lob
    wrote on last edited by
    #1

    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

    H 1 Reply Last reply
    0
    • L lob

      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

      H Offline
      H Offline
      Hans Ruck
      wrote on last edited by
      #2

      The information you provided is probably not sufficient. I made a test program and it works fine; i could have send it to you if i would have know your email address... rechi

      1 Reply Last reply
      0
      Reply
      • Reply as topic
      Log in to reply
      • Oldest to Newest
      • Newest to Oldest
      • Most Votes


      • Login

      • Don't have an account? Register

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • World
      • Users
      • Groups