PC Review


Reply
Thread Tools Rate Thread

Accessing lParam in WndProc in c#

 
 
joe_g99@yahoo.co.uk
Guest
Posts: n/a
 
      13th Aug 2005
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.

 
Reply With Quote
 
 
 
 
joe_g99@yahoo.co.uk
Guest
Posts: n/a
 
      14th Aug 2005
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);

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OFNOTIY Struct from lParam pointer SpotNet Microsoft C# .NET 5 7th Jan 2006 10:46 PM
Ned help with marshaling (SendMessage, lparam, WM_MOUSEMOVE) Ryan Ross Microsoft C# .NET 2 10th Sep 2005 04:13 PM
Problems extracting Mouse position from LParam in WndProc crafuse Microsoft VB .NET 4 13th Jul 2005 09:29 PM
Handling WM_DEVICECHANGE message in C#; how to handle LPARAM? Jason Seeley Microsoft Dot NET Framework Forms 6 8th Mar 2004 09:22 PM
Returning data in LParam to Unmanaged Code BruceR Microsoft C# .NET 3 17th Nov 2003 05:54 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:45 AM.