Hey,
I'm fairly new to this PInvoke stuff. Could anyone tell me how to get whether a window is being resized with the WH_CALLWNDPROC method? A description would be great too.
Thanks a lot
bbman 12 Junior Poster
Recommended Answers
Jump to PostTake a look at - http://www.pinvoke.net/
Jump to PostYou should override the WndProc method in your form. Then check for the message.
Jump to PostYou really don't want to use hooks unless they are absolutely necessary.
The Windows.Forms class actually allows you to override the WndProc message pump. So all messages sent to that window can be intercepted.
The signature is
protected override void WndProc(ref Message msg)
You can get the message …
Jump to PostOk firstly. Don't Hook, seriously...don't! :D
You don't need to use P/Invoke for this. You can do it using your current WndProc section.
Use a switch-case block and check for the WM_SIZE (0x0005) message and your keyboard short-cut.
Could you not possibly do this using the Form …
All 16 Replies
kvprajapati 1,826 Posting Genius Team Colleague
bbman 12 Junior Poster
Ketsuekiame 860 Master Poster Featured Poster
bbman 12 Junior Poster
Ketsuekiame 860 Master Poster Featured Poster
bbman 12 Junior Poster
Ketsuekiame 860 Master Poster Featured Poster
bbman 12 Junior Poster
Ketsuekiame 860 Master Poster Featured Poster
bbman 12 Junior Poster
Ketsuekiame 860 Master Poster Featured Poster
bbman 12 Junior Poster
Ketsuekiame 860 Master Poster Featured Poster
bbman 12 Junior Poster
Ketsuekiame 860 Master Poster Featured Poster
bbman 12 Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.