I have buffer in WinMain which i need inside WndProc. How to pass pointer to it?

112 views Asked by At

When i process WM_PAINT in WndProc, i need data from WinMain. In this case, pointer to char[], but the type of the data is irrelevent actually. The problem is, how to pass something from WinMain to WndProc.

To make it global is not preferable, but if i need to, i will live with it. I really don't want to attach it to the extra window memory. I can process WM_PAINT in WinMain directly, but i don't know if Windows ever send this message instead of posting it in the queue, if it does, then what?

0

There are 0 answers