LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Mouse cursor during pressing a questionmark button

Hello,

i have included a questionmark button at the titlebar of a panel. I have used the following function from the Windows SDK for this:
...
SetWindowLong((HWND)Handle, GWL_EXSTYLE, WS_EX_CONTEXTHELP );
...

When i click on the questionmark button the mouse cursor should change to the questionmark cursor form the windows sdk, but i have still the normal mouse cursor!
When i move the mouse very fast, i see that the cursor is changed for very short time. I think LabWindows is rechanging the cursor to the default mouse cursor of the panel.

Is there a way to avoid LabWindows from changing my mouse cursor?

Thank you
stefan
0 Kudos
Message 1 of 4
(3,056 Views)
You'll have to change the panel's cursor yourself whenever the user clicks on the button. You can do this using the following function call:

SetPanelAttribute (yourPanel, ATTR_MOUSE_CURSOR, VAL_QUESTION_MARK_CURSOR);

Luis
NI
0 Kudos
Message 2 of 4
(3,056 Views)
Hello,

thank you for your Answer. I have already tried this but there is a little problem:
I can only catch WM_Messages from the Windows SDK. In the CONTEXT_HELP-style of a window the Windows SDK sends only a message (the WM_HELP message) when i click with the modified mouse cursor somewhere in my window. So the problem i can not catch the event clicking on the questionmark button self. Or is there a way or a WM-Message to catch this event too? (I haven't found anything in the MSDN)

Stefan
0 Kudos
Message 3 of 4
(3,056 Views)
Stefan,

I haven't tried it myself, but according to MSDN, you should be able to catch that event. Check out the WM_NCLBUTTONDOWN message (with HTHELP as the wParam). If not, try the WM_NCHITTEST message. One of those should result in something.

Luis
0 Kudos
Message 4 of 4
(3,056 Views)