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
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. newbie button method question

newbie button method question

Scheduled Pinned Locked Moved C / C++ / MFC
c++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.
  • G Offline
    G Offline
    gavshan
    wrote on last edited by
    #1

    i have two IDD forms (MFC) and i want to be able to click a button on one to open up the other i have added the onclick handler but just cant get the code for opening anywhere can anyone help

    M 1 Reply Last reply
    0
    • G gavshan

      i have two IDD forms (MFC) and i want to be able to click a button on one to open up the other i have added the onclick handler but just cant get the code for opening anywhere can anyone help

      M Offline
      M Offline
      Michael P Butler
      wrote on last edited by
      #2

      Are they forms (CFormView derived classes) or dialogs (CDialog derived)? If it is a CDialog derived class, then CMyDialog dlg; dlg.DoModal(); Michael 'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space

      A 1 Reply Last reply
      0
      • M Michael P Butler

        Are they forms (CFormView derived classes) or dialogs (CDialog derived)? If it is a CDialog derived class, then CMyDialog dlg; dlg.DoModal(); Michael 'Logic, my dear Zoe, merely enables one to be wrong with authority.' - The Doctor: The Wheel in Space

        A Offline
        A Offline
        asierra
        wrote on last edited by
        #3

        And if it is a CFormView you need to create a new document, like this. POSITION templatePos = GetFirstDocTemplatePosition(); while(templatePos != NULL) { CDocTemplate* pTemplate = GetNextDocTemplate(templatePos); CString strDocName; pTemplate->GetDocString(strDocName, CDocTemplate::docName); if(strDocName == "Form you want to open") pTemplate->OpenDocumentFile(NULL); } Alfredo

        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