Getting WM_LBUTTONUP, WM_LBUTTONDOWN etc messages in a custom dlgproc

Getting WM_LBUTTONUP, WM_LBUTTONDOWN etc messages in a custom dlgproc

Anonymous
Not applicable
371 Views
1 Reply
Message 1 of 2

Getting WM_LBUTTONUP, WM_LBUTTONDOWN etc messages in a custom dlgproc

Anonymous
Not applicable
I have tried all sorts of things, but for the life of me i can't get max to pass me these winapi messages.
I am working on a custom map type, where the UI is kinda interactive, so i have to be able to track where the user clicks. The UI is created using the:

IAutoMParamDlg* masterDlg = myMapDesc.CreateParamDlgs(hwMtlEdit, imp, this);

call in CreateParamDlg. I suspect that that's where the problem is. I attach my dlgProc properly:

mymap_param_blk.SetUserDlgProc(dlgProc);

and i get all sorts of messages including WM_INITDIALOG, WM_PAINT, WM_COMMANDS, but not the mouse down / up ...

Anyone know why? or how i could trick it to pass those messages to me? I am going crazy already, i am sure it's possible.


cheers,
laszlo
0 Likes
372 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Ok, it seems that I can get the same messages from the WM_SETCURSOR message. It's lParam's high word has the mousedown/up messages, then you can get the cursor positions using winapi calls like GetCursorPos


Problem solved i suppose


cheers,
laszlo
0 Likes