Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

More win32 help

Options
  • 25-06-2004 12:21pm
    #1
    Registered Users Posts: 1,365 ✭✭✭


    ok guys,

    I'm new to win32 programming,

    Have isolated the problem.

    I want to draw initially in my window, so I place the code in the main windowProc under the WM_PAINT and the code works fine.

    Next a dialog box pops up and the user inputs some settings data, the data is acquired.

    After it is acquired, I set a flag variable and from the dialog box's proc code, call sendMessage(hwnd,WM_PAINT, 0,0),

    but this seems to call the WM_PAINT function within the dialog proc, rather than the WM_PAINT within the main windows PROC code.

    My plan was to set the data_acquired flag, call WM_PAINT in the main window proc again, but this time draw the contents of the acquired data.

    Has anyone any ideas (or preferably some code ;-) ) to help me out,
    thanks,
    king


Comments

  • Registered Users Posts: 1,421 ✭✭✭Merrion


    You don't need to send the WM_PAINT message. use InvalidateRect to mark the main window as needing repainting and the system will send your window a WM_PAINT message.


  • Registered Users Posts: 1,365 ✭✭✭king_of_inismac


    Thanks for the help man,

    still just getting my head around this messaging system,

    But that sorted the problem,

    cheers :D


Advertisement