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. need help on setting state flags

need help on setting state flags

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

    I am relatively new to programming and i need help on coding for state flags. my problem is: I want to set a state flag which sort of act as a switch for my onpaint() to be executed after my dialog has beem accessed in SDI. How do i code that line in my dialog and Onpaint(). Also, by doing this, will my onpaint() be able to access the updated values in the dialog? (as i need these values in order to draw).will greatly appreciate any kind help.

    D 1 Reply Last reply
    0
    • C coda_x

      I am relatively new to programming and i need help on coding for state flags. my problem is: I want to set a state flag which sort of act as a switch for my onpaint() to be executed after my dialog has beem accessed in SDI. How do i code that line in my dialog and Onpaint(). Also, by doing this, will my onpaint() be able to access the updated values in the dialog? (as i need these values in order to draw).will greatly appreciate any kind help.

      D Offline
      D Offline
      David Crow
      wrote on last edited by
      #2

      If I understand your question, you need a member variable in your CView-derived class. That member variable can then be accessed/changed in any of the methods of the derived class.


      Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

      C 1 Reply Last reply
      0
      • D David Crow

        If I understand your question, you need a member variable in your CView-derived class. That member variable can then be accessed/changed in any of the methods of the derived class.


        Five birds are sitting on a fence. Three of them decide to fly off. How many are left?

        C Offline
        C Offline
        coda_x
        wrote on last edited by
        #3

        yah something like that, do I add it as member variable to both view and all dialog classes using the "add member variable" in the class view tab and of type:boolean and public? Also , i have another problem: i need the current values of the dialog in order to draw to SDI view, but first i want to capture these values in the SDI doc class, how do i code that assumming the values needed are length, breadth from dialog A. The dialogs are modal.

        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