Large-ish project, Pop-up Menus work fine all day long, if you always make a selection from the pop-up. If you pop it up but then do not make a selection (hit the Esc key or click elsewhere), then mouse clicks are no longer detected anywhere by the app.
When I create a small snippet to test, the problem never occurs........... anyone else ever seen this happen?
PopupMenu crash
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
PopupMenu crash
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
jesperbrannmark
- Enthusiast

- Posts: 536
- Joined: Mon Feb 16, 2009 10:42 am
- Location: sweden
- Contact:
Re: PopupMenu crash
Yep.
It happens when I
1. Do my enumuration wrong (reuse the same number)
2. Forget to write declarec instead of declare on mac
3. Use openwindowedscreen on some graphic cards (workaround - make sure you do IF startdrawing(xxx) instead of just startdrawing, before drawing your loop do a if iswindow() and dont allow minimize)
4. When my images in the popupmenu is wrong (open them in a paint program, save again.. might be a jpg or png problem) (especially mac)
It happens when I
1. Do my enumuration wrong (reuse the same number)
2. Forget to write declarec instead of declare on mac
3. Use openwindowedscreen on some graphic cards (workaround - make sure you do IF startdrawing(xxx) instead of just startdrawing, before drawing your loop do a if iswindow() and dont allow minimize)
4. When my images in the popupmenu is wrong (open them in a paint program, save again.. might be a jpg or png problem) (especially mac)
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PopupMenu crash
Thanks for replying. 2 - 4 do not apply in my case but I'm very curious about 1. I have three Popup Menus, one with a short fixed list and two others whose menu items are dynamically loaded and changed. All three have fixed ID names e.g. #Pop01 (the names are more meaningful in the code).
I have replaced/beautified them with Gonzal's PureCOLOR lib. They look and work fantastic but the 'no pick' issue remains - for now, I have added a ' ** Cancel Pick **' option at the end of each menu, which works fine of course but should not be necessary.........
Edit: When I say the mouse click detection is lost, it is lost for the entire app, cannot click on a button or anything else except tabs. Keyboard input remains fine.
I have replaced/beautified them with Gonzal's PureCOLOR lib. They look and work fantastic but the 'no pick' issue remains - for now, I have added a ' ** Cancel Pick **' option at the end of each menu, which works fine of course but should not be necessary.........
Edit: When I say the mouse click detection is lost, it is lost for the entire app, cannot click on a button or anything else except tabs. Keyboard input remains fine.
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.
-
IdeasVacuum
- Always Here

- Posts: 6426
- Joined: Fri Oct 23, 2009 2:33 am
- Location: Wales, UK
- Contact:
Re: PopupMenu crash
OK, if the User hits the escape key instead of selecting from the menu pop-up, that is an accelerator keystroke - the pop-up is taken down but the event loop is still running - so detecting #WM_COMMAND to trigger a break does the trick!
IdeasVacuum
If it sounds simple, you have not grasped the complexity.
If it sounds simple, you have not grasped the complexity.