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. Call to Dialog causes error

Call to Dialog causes error

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
3 Posts 3 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.
  • R Offline
    R Offline
    romuzu
    wrote on last edited by
    #1

    I have created a function display a dialog. When I try to show a previously selected window, it causes error. :(What seems to be the problem? Here’s my code: void CProjectView::SetSelectedDialog(CDialog* dialog) { if(m_pSelectedDialog) { //Hide previously selected window m_pSelectedDialog->ShowWindow(SW_HIDE); } if(dialog) { // show Selected Window CRect rect; GetClientRect( &rect ); m_pSelectedDialog = dialog; m_pSelectedDialog->MoveWindow(rect, TRUE); m_pSelectedDialog->ShowWindow(SW_SHOW); } }

    C H 2 Replies Last reply
    0
    • R romuzu

      I have created a function display a dialog. When I try to show a previously selected window, it causes error. :(What seems to be the problem? Here’s my code: void CProjectView::SetSelectedDialog(CDialog* dialog) { if(m_pSelectedDialog) { //Hide previously selected window m_pSelectedDialog->ShowWindow(SW_HIDE); } if(dialog) { // show Selected Window CRect rect; GetClientRect( &rect ); m_pSelectedDialog = dialog; m_pSelectedDialog->MoveWindow(rect, TRUE); m_pSelectedDialog->ShowWindow(SW_SHOW); } }

      C Offline
      C Offline
      Cedric Moonen
      wrote on last edited by
      #2

      romuzu wrote:

      it causes error

      What error ? Be more specific.


      Cédric Moonen Software developer
      Charting control [Updated - v1.1]

      1 Reply Last reply
      0
      • R romuzu

        I have created a function display a dialog. When I try to show a previously selected window, it causes error. :(What seems to be the problem? Here’s my code: void CProjectView::SetSelectedDialog(CDialog* dialog) { if(m_pSelectedDialog) { //Hide previously selected window m_pSelectedDialog->ShowWindow(SW_HIDE); } if(dialog) { // show Selected Window CRect rect; GetClientRect( &rect ); m_pSelectedDialog = dialog; m_pSelectedDialog->MoveWindow(rect, TRUE); m_pSelectedDialog->ShowWindow(SW_SHOW); } }

        H Offline
        H Offline
        Hamid Taebi
        wrote on last edited by
        #3

        Whats error?


        WhiteSky


        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