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. project problem

project problem

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestionc++graphicslearning
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 created an SDI with several dialogs within for my project. Each time user input data into certain dialog, my Onpaint() in view class will show the image in the main window. It is more of like reading in user inputs and visualizing images at every dialog stage. Problem is, how do i control when to show the image? ie, i only want the Onpaint() to draw when dialog is receiving inputs instead of at beginning of program where of course my dialog is not activated yet. Also, i intend to put my drawing code in the various dialog.cpp files and call my those drawing fucntions in the onpaint(), is it the right approach? will appreciate if anyone can help

    T 1 Reply Last reply
    0
    • C coda_x

      i created an SDI with several dialogs within for my project. Each time user input data into certain dialog, my Onpaint() in view class will show the image in the main window. It is more of like reading in user inputs and visualizing images at every dialog stage. Problem is, how do i control when to show the image? ie, i only want the Onpaint() to draw when dialog is receiving inputs instead of at beginning of program where of course my dialog is not activated yet. Also, i intend to put my drawing code in the various dialog.cpp files and call my those drawing fucntions in the onpaint(), is it the right approach? will appreciate if anyone can help

      T Offline
      T Offline
      Terry ONolley
      wrote on last edited by
      #2

      Within your OnPaint handler, you can test for the existence of the dialog boxes before executing your drawing code.


      Have you answered an MTQ? Check out the stats!

      C 1 Reply Last reply
      0
      • T Terry ONolley

        Within your OnPaint handler, you can test for the existence of the dialog boxes before executing your drawing code.


        Have you answered an MTQ? Check out the stats!

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

        i am not very proficient in programming so can tell me how can i code that supposing my dialog is called dialog A? thank you

        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