Posts: 1,006
Threads: 330
Joined: Mar 2007
Hi All,
Is there any way to make the cursor temporarily invisible (yet still functional). I am using curtain to hide some stuff I am doing in Excel but even through the curtain, I am seeing the cursor hop around.
Thanks,
Stuart
Posts: 12,141
Threads: 143
Joined: Dec 2002
Function ShowCursor can hide cursor in windows of current thread. Don't know how to hide it in all windows.
Posts: 31
Threads: 13
Joined: Jan 2007
Where can I find this function ShowCursor? I want to make the cursor invisible as soon as I start typing (using the keyboard). Just like in MS Word where the cursor disappears until you touch the mouse. I might use forementioned function as a starting point. It would also be nice if someone already has a solution for my humble request.
Thanks.
Posts: 12,141
Threads: 143
Joined: Dec 2002
[code deleted]
It hides cursor in the dialog. Don't know how to hide everywhere.
Posts: 31
Threads: 13
Joined: Jan 2007
Thank you Gintaras. It isn't quite the same as I requested, but it gives me a starting point. In your example the cursor does not re-appear after I move the mouse within the dialog. Like I said, just like the cursor behaviour in MS Word. After I managed to do this within a dialog I have to look furher to do this generically.
Regards.
Posts: 12,141
Threads: 143
Joined: Dec 2002
Function
Dialog90
\Dialog_Editor
function# hDlg message wParam lParam
if(hDlg) goto messages
str controls = "3"
str e3
if(!ShowDialog("Dialog90" &Dialog90 &controls)) ret
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 223 135 "Dialog"
;1 Button 0x54030001 0x4 120 116 48 14 "OK"
;2 Button 0x54030000 0x4 170 116 48 14 "Cancel"
;3 Edit 0x54231044 0x200 0 0 224 114 ""
;END DIALOG
;DIALOG EDITOR: "" 0x2030201 "*" "" ""
ret
;messages
int-- t_cursorHidden
sel message
,case WM_INITDIALOG
,case WM_DESTROY
,case WM_COMMAND goto messages2
,case WM_SETCURSOR
,if(t_cursorHidden) t_cursorHidden=0; ShowCursor 1
ret
;messages2
sel wParam
,case EN_CHANGE<<16|3
,if(!t_cursorHidden) t_cursorHidden=1; ShowCursor 0
,
,case IDOK
,case IDCANCEL
ret 1