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. Using SDI with Formviews

Using SDI with Formviews

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestionlearning
5 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.
  • M Offline
    M Offline
    Mike Danberg
    wrote on last edited by
    #1

    Hey all, I need some help using SDI with formviews. I can't seem to figure out how to change the screen to a different formview. For instance I have created two different formviews, one with a button on it, and another with just text on it to see if it will work. The problem I have is I don't know what to put in the button to make the view change resource IDD's and use the second formview. It looks like it is as simple as changing the ID, then calling invalidate to repaint the view with my new formview. Can anyone help me on this?? Thanks, Mike

    S M 2 Replies Last reply
    0
    • M Mike Danberg

      Hey all, I need some help using SDI with formviews. I can't seem to figure out how to change the screen to a different formview. For instance I have created two different formviews, one with a button on it, and another with just text on it to see if it will work. The problem I have is I don't know what to put in the button to make the view change resource IDD's and use the second formview. It looks like it is as simple as changing the ID, then calling invalidate to repaint the view with my new formview. Can anyone help me on this?? Thanks, Mike

      S Offline
      S Offline
      Steve S
      wrote on last edited by
      #2

      Not that simple, I'm afraid. You have to create the second CFormView object and perform some low-level "trickery" to swap them -- I'm sure there's an article about switching forms around here somewhere... Steve S

      1 Reply Last reply
      0
      • M Mike Danberg

        Hey all, I need some help using SDI with formviews. I can't seem to figure out how to change the screen to a different formview. For instance I have created two different formviews, one with a button on it, and another with just text on it to see if it will work. The problem I have is I don't know what to put in the button to make the view change resource IDD's and use the second formview. It looks like it is as simple as changing the ID, then calling invalidate to repaint the view with my new formview. Can anyone help me on this?? Thanks, Mike

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

        It isn't a simple as first thought but this article and sample should show you how. http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q141/3/33.asp&NoWebContent=1[^] Michael 'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879

        M 2 Replies Last reply
        0
        • M Michael P Butler

          It isn't a simple as first thought but this article and sample should show you how. http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q141/3/33.asp&NoWebContent=1[^] Michael 'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879

          M Offline
          M Offline
          Mike Danberg
          wrote on last edited by
          #4

          Thanks a bunch. That's exactly what I was looking for.

          1 Reply Last reply
          0
          • M Michael P Butler

            It isn't a simple as first thought but this article and sample should show you how. http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/q141/3/33.asp&NoWebContent=1[^] Michael 'War is at best barbarism...Its glory is all moonshine. It is only those who have neither fired a shot nor heard the shrieks and groans of the wounded who cry aloud for blood, more vengeance, more desolation. War is hell.' - General William Sherman, 1879

            M Offline
            M Offline
            Mike Danberg
            wrote on last edited by
            #5

            Got another question for you that pertains to the question above, if you're able to answer it. A general doc/view question though. The application I want to use the SDI for I have programmed in a dialog based interface. The reason for the switch is to create printable reports, which I don't see a way to do in dialog based. What I'm doing is reading in tables from a database and displaying them in dialog windows, and allowing things to be entered into the database through the dialogs. The question I have is, is this something that should be used in an SDI like I'm thinking or should it be used in an MDI? I'm still pretty new to the doc/view structure and SDI/MDI. I've only really done one program using it about a year ago during my last year of school. Anyway, I don't really need any detailed explanations or anything like that, just wondering what the best way to go is, so I don't spend my time learning something that isn't going to be useful for my project. (I do realize that MDI builds off of SDI, but if MDI is the way to go I'd rather learn how to build the multiple views using that instead of what I'm currently doing with SDI). Thanks, Mike

            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