Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
If we do not hit our goal we will be forced to close the site.

Current status: https://keepboardsalive.com/

Annual subs are best for most impact. If you are still undecided on going Ad Free - you can also donate using the Paypal Donate option. All contribution helps. Thank you.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.

More win32 help

  • 25-06-2004 12:21PM
    #1
    Registered Users, Registered Users 2 Posts: 1,368 ✭✭✭


    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, Registered Users 2 Posts: 1,432 ✭✭✭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, Registered Users 2 Posts: 1,368 ✭✭✭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