Accessing lParam in WndProc in c#

J

joe_g99

Hi

I would like to be able to use the Win32API to send a WM_PAINT message
to another application, does anyone know how I set the lParam I send in
my c# code, and how I then extract data from this lParam in my WndProc?

Cheers

Joe.
 
J

joe_g99

Just incase anyone else needs to do this, WM_PAINT doesnt take a
lParam, the reason my form wasnt repainting was because i wasnt
invalidating anythong before sending the pain message, to invalidate I
had to use

RECT r = new RECT();
GetWindowRect( hWnd, ref r);
r.right -= r.left;
r.left = 0;
r.bottom -= r.top;
r.top = 0;
InvalidateRect( hWnd, ref r, 1);
SendMessage( hWnd, WM_PAINT, 0, 0);
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top