I have a simple combobox with a dropdown list (CBS_DROPDOWN), and a notification handler (WM_COMMAND) that may programmatically show or hide the dropbox, with the CB_SHOWDROPDOWN message.

However when I do this, the mouse cursor hides immediately, in all areas covered by the combobox+list, as well as the parent window.

It doesn't come back until the dropbox is hidden again or when the parent window is clicked.

Is there anything I can do about it?

Thomas
Posted on 2002-04-20 10:58:46 by Thomas
The first *maybe wrong) thing that comes into my mind is:

Are u using it in order to skin the combo with bitmaps?

If so please hide/show the mouse yourself as appropiate for a system draw operation ;)
Posted on 2002-04-20 17:53:08 by BogdanOntanu
No that's not it, the only thing I do is open the dropbox... It's really strange. :confused:

Thomas
Posted on 2002-04-21 03:39:58 by Thomas
there is no such effect known with comboboxes, so you likely have another error with the mouse cursor.

Did you check if
- there is a proper cursor handle during RegisterClass
- some handling of WM_SETCURSOR is wrong
- a wrong call to SetClassLong with cursor handle?
Posted on 2002-04-22 08:24:16 by beaster
Here's an example of the problem. I've just used prostart and added a combobox with handlers to show the problem.
Open the program, type something in the combobox, the droplist will appear and the mouse cursor will hide. At least on my PC (win2kSP2), I haven't tested it on others.

Thomas
Posted on 2002-04-22 11:27:11 by Thomas
No problem on NT4SP5.
Posted on 2002-04-22 11:39:14 by bitRAKE
I've tested it on another machine with XP, and it didn't even open the droplist. It did hide the mouse cursor.
Even when I push the button, nothing happens.

Thomas
Posted on 2002-04-22 12:09:48 by Thomas
Thomas,
Win2k SP2 = same problem as you described. if I type something my cursor disappears until I hit enter.Wierd...
Posted on 2002-04-22 14:35:31 by emonk
this IS wicked :)

gratulation to Thomas, you found a new undocumentated combobox bug... you should tell Microschrott.

I had a deeper look at the problem, so here is my conclusion: the listbox captures all events from mouse, so if the listbox is opened,
the parent window does not receive WM_SETCURSOR or mouse moves anymore. So the last active cursor stays unchanged. If you hold the cursor under the edit, it will be removed (why ever) and stays removed.
If you hold the cursor on the edit, the cursor stays an edit-cursor (I-beam).

The workaround:
call a SetCursor directly after CB_SHOWDROPDOWN with your arrow cursor. So you'll get back the cursor for the whole window.
Posted on 2002-04-22 15:13:59 by beaster
Had the same problem here (WinXP)... until I disabled the "Hide mouse cursor while typing" option in my Intelli Mouse Driver :grin:

You should check your settings, too! (Logitech driver's offer the same option)


Screenshot from German version (at least helpfull for beaster ;) ):
Posted on 2002-04-22 15:34:36 by bazik
Beaster: that works but the mouse cursor wouldn't be an I-beam where it should be.
I wonder if something else is wrong with the program. I've had weird problems before when I forgot to handle WM_NOTIFY properly for example.

bAZiK: I have a logitech mouse but I don't use the logitech software and I couldn't find such an option in the default configurations..

Thomas
Posted on 2002-04-22 16:12:15 by Thomas
Works fine if you click the down arrow to open the dropdown, but hides the mouse if you click in the edit box and the dropdown comes down when you type. Now I understand what you mean. :) Maybe, activating the combobox dropdown button, instead of just showing the dropdown?
Posted on 2002-04-22 17:46:11 by bitRAKE
Strange... the problem completly disappeared, after I deactivated the option in my mouse driver settings. Don't have any problems now, like you and bitRAKE described :confused:
Posted on 2002-04-23 11:03:38 by bazik
Did you set moron_dork mode before creating the combo box? If so, try setting it afterwards. ;)
Posted on 2002-04-23 11:26:00 by iblis
Sorry to say, I rebooted on XP (because I use 98se and XP on the same PC so as to test app), and I've got the same problem as Thomas (well still not me;) ): the droplist didn't open (but it's due to the fact that the list is empty), but for the hiding of the cursor, well, I've no problem about that... (I use a microsoft Wheel mouse with Intellipoint software).

well, maybe Microsoft will make another update of WinXP (I've heard about a certain XP SE)
Posted on 2002-04-23 15:58:20 by Vom-bonjour:-()
well, I've just seen something like Bazik mentionned:
(it's in French, so... --> 'hide cursor while writting')
but I use Microsoft software (=Intellipoint 4.1)

--> it's funny, maybe someone will post the English one :tongue:
Posted on 2002-04-23 16:03:16 by Vom-bonjour:-()