Help with system beep on listbox

BlitzMax Forums/MaxGUI Module/Help with system beep on listbox

ima747(Posted 2010) [#1]
Problem: on windows (but not on mac) when you click on an item in a listbox in my current project the system plays it's beep sound. If you click in the listbox in the empty space with no items there's no beep. Doesn't happen on mac. Isn't caused by any of my code in EVENT_GADGETSELECT (I've commented the whole event out to confirm). And nothing seems to be going wrong (everything functions as it should despite the mystery beep). Logging un-captured events has nothing I don't expect to see.

I've tried to make a test app but I can't create the problem again so I know it's something I'm doing SOMEWHERE but I can't figure out where it could possibly be coming from.

Any ideas on where else I can look? I've tried to duplicate anything I thought could be affecting it in my test app (gadgets have an extra object attached, matched all font styles, added a canvas incase it was related to a draw of some kind...) but it won't beep on me.

Of note, the tooltips for the listbox items on my project are yellow and flat, where as the tooltips on listbox items in my non beeping test app are matching the system tooltip style (beveled and grey blue).


SebHoll(Posted 2010) [#2]
My first guess would be to check to see if any event hooks are catching the EVENT_GADGETSELECTs generated for listboxes. If so, maybe try changing them over to event queue logic.

Does the CreateListbox() example beep too?


ima747(Posted 2010) [#3]
Example does not beep, just like my attempts to recreate the beep.

I tried not attaching my event hook at all so nothing was being hook, and there is no specific hook for gadgetselect.

I suspect it has something to do with the fact that the tooltips look different, that would imply to me that it's using something different at a maxgui driver level perhaps... I am using setting the graphics driver to OpenGL on windows, but doing that on my test resulted in no beep and no change in tooltip style...

Any ideas why the tooltips might look different? maybe that will direct me to something I'm setting weird somewhere else that I'm overlooking.


SebHoll(Posted 2010) [#4]
Any ideas why the tooltips might look different? maybe that will direct me to something I'm setting weird somewhere else that I'm overlooking.

I haven't seen this appear in MaxGUI for ages, not since I first compiled my Max'dGUI project with the then development version of the Windows driver.

Do you have Process Monitor installed? Can you report how many active handles and objects your process has open when the listbox tooltip fonts go mangled?


SebHoll(Posted 2010) [#5]
Also, just to check, make sure that you are only calling MaxGUI commands from the main-thread. Manipulating Windows controls from other threads may have undesired effects, and might cause such behavior that you are describing.


ima747(Posted 2010) [#6]
emailed you some screen snippets to show what they look like.

Don't have process monitor installed but I just tried my test app having it load an absolute minimum to get up and running (no user content, etc. just minimum gui graphics) and it doesn't affect it.

I know it's something I'm doing in my setup because if it was just maxgui and my system it would happen in the test, so it's something app specific that I'm doing to cause maxgui to get a little mad... but I still have no idea what it could be. Could it be related to graphics calls specifically? a background image attached to a panel that's not related to the list box? too many canvases with GLShareContext enabled? I've tried the test with 1 canvas, but I didn't put it through any draw commands...


SebHoll(Posted 2010) [#7]
emailed you some screen snippets to show what they look like.

Kk, cool - btw, which e-mail address are you using? I just checked now and I haven't received this one, or the one you sent a few days ago either.

Edit: Ok, that's worrying - my Blitz e-mail address doesn't appear to be receiving any mail, and hasn't done for a while. Try my personal address: <removed> .


ima747(Posted 2010) [#8]
eep, hosting trouble? it hasn't bounced back to me, perhaps they're getting stuck in a que on the server waiting to be delivered.

re-sent to gmail


SebHoll(Posted 2010) [#9]
Cool - got it. Thanks. Hmmm... As you can imagine, it's pretty hard to debug without having the code to test against. Ermmm... How many ancestors does the broken listbox have?

Also, this is a shot in the dark, but it might give us a few ideas. Can you comment out line 4363 of maxgui.mod/win32maxguiex.mod/win32maxguiex.bmx:
						PostGuiEvent EVENT_GADGETPAINT
...build modules, and then tell me whether the listbox tooltip fonts are still strange.

Remember to change it back though once you've tested, otherwise none of your canvases will know to update. :-)


SebHoll(Posted 2010) [#10]
You got mail! :-)


ima747(Posted 2010) [#11]
the listbox is inside a panel, that is inside a split panel pane, that is inside the window. I didn't do much testing on windows before I put the split panel in, but I'm 99% sure it was doing the same beeping and tooltip before I added it. Can probably dig up an older copy of the source to test if you think it's worth it. The test app list box is inside a panel as well to try to simulate the same conditions.

Apologies for a lack of code to post. Basically I'd have to post my whole program to reproduce it at this point and that's just too much and I can't share some of the code... That's why I was trying to make a test app to reproduce it but the tests all work fine.

I'll try the gadget paint hack and report back.


ima747(Posted 2010) [#12]
Issue is resolved thanks to Seb via email.

Long story short it was the custom icon causing windows to mess itself. check http://www.blitzbasic.com/Community/posts.php?topic=71485#801572 for details on how to fix/prevent.