Advertisement
Help Keep Boards Alive. Support us by going ad free today. See here: https://subscriptions.boards.ie/.
https://www.boards.ie/group/1878-subscribers-forum

Private Group for paid up members of Boards.ie. Join the club.
Hi all, please see this major site announcement: https://www.boards.ie/discussion/2058427594/boards-ie-2026

More win32 help

  • 25-06-2004 11:21AM
    #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,433 ✭✭✭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