Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.

Win32 & WM_NCLBUTTONUP

ahasan
Beginner
909 Views
In a CVF6 Win32 Dlg Proc I can capture and process the WM_NCLBUTTONDOWN message, but I can not capture the WM_NCLBUTTONUP message.
DFWinty defines WM_NCLBUTTONUP as #00A2 and the WinUser.h filefor IVF8 also defines WM_NCLBUTTONUP as 0x00A2.Is0x00A2 correct,if not how can I find the correct value, or is there something else that I am missing about WM_NCLBUTTONUP?
Thanks for anyreplies.
0 Kudos
4 Replies
Jugoslav_Dujic
Valued Contributor II
909 Views
It looks like a system problem ("feature"?):

http://groups.google.com/groups?q=WM_NCLBUTTONUP+Dialog&hl=en


Jugoslav
0 Kudos
ahasan
Beginner
909 Views
Thanks, JugoSlavDujic.
0 Kudos
Jugoslav_Dujic
Valued Contributor II
909 Views
If you're doing it for purpose of detection of movement, look up WM_ENTERSIZEMOVE/WM_EXITSIZEMOVE.

Otherwise, you could overcome the problem by subclassing the dialog. Namely, every dialog has DefDlgProc as its window procedure; DefDlgProc calls your dialog-proc and continues default processing if you return FALSE, and otherwise exits. You can, however, insert another procedure in the subclassing chain using normal technique (SetWindowLong(GWL_WNDPROC), write an "ordinary" WndProc, catch the WM_NCLBUTTONUP there and call DefDlgProc otherwise). See MenuDialog sample on my home page.

Jugoslav
0 Kudos
ahasan
Beginner
909 Views

Thanks for the additional info. I will take at good look at your work arounds!.

There is another possible work around:

Set a flag, say bLBtnDn = .TRUE. in case (WM_NCLBUTTONDOWN)

Then in case (WM_NCHITTEST) test the bLBtnDn flag. If it is true,
then test to see if the L mouse button is still down with the function
GetAsyncKeyState(VK_LBUTTON). If it is still down just return, if it is up process/executeassociated code, and setbLBtnDn = .FALSE..

There may be some issues with doing it this way that I am not aware of, but it seems to work, and the amount of processing needed to determine if the L mouse buttonhas been released in the NCarea (in my case the Caption area)appears to beminimal.

Message Edited by halcyong@fcc.net on 09-21-2005 06:27 AM

Message Edited by halcyong@fcc.net on 09-21-2005 06:32 AM

0 Kudos
Reply