?
Solved

Deleting owner window of popup menu when popup menu is displayed

Posted on 1997-11-26
1
Medium Priority
?
485 Views
Last Modified: 2013-12-03
I am using TrackPopupMenu to display a popup menu. When "inside" TrackPopupMenu, a timer is running (remember that a TrackPopupMenu has an internal message loop). The WM_TIMER event will cause me to destroy the window that I sent as owner window to TrackPopUpMenu. This will also cause a DestroyMenu of the popped up menu.
Amazingly, Windows will not hide the menu and if I click on a menuitem my application will crash.
How can I hide the menu before destroying it and thus overcome Win32's bug? I have heard of an undocumented "EndMenu" Win32 function but a look at User32.dll of win95 does not show me that function (NT's user32.dll does).
0
Comment
Question by:giltayar
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 7

Accepted Solution

by:
galkin earned 600 total points
ID: 1408922
Send WM_CANCELMODE message to menu owner window before thos window is actually destroyed.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

With most software applications trying to cater to multiple user needs nowadays, the focus is to make them as configurable as possible. For e.g., when creating Silverlight applications which will connect to WCF services, the service end point usuall…
Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
This is Part 3 in a 3-part series on Experts Exchange to discuss error handling in VBA code written for Excel. Part 1 of this series discussed basic error handling code using VBA. http://www.experts-exchange.com/videos/1478/Excel-Error-Handlin…
In this video, Percona Solution Engineer Rick Golba discuss how (and why) you implement high availability in a database environment. To discuss how Percona Consulting can help with your design and architecture needs for your database and infrastr…

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question