DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   C++ (http://www.daniweb.com/forums/forum8.html)
-   -   Popup Menu displays as very thin box (http://www.daniweb.com/forums/thread80386.html)

dougy83 Jun 8th, 2007 2:26 am
Popup Menu displays as very thin box
 
Hi everyone,

I'm a newbie here, and have a newbie question.

I'm trying to get a popup menu to show just above my system tray icon/notifyIcon. I'm using TrackPopupMenuEx to display the menu, loaded from my application. The problem is that menu is displayed as a really thin menu, so that no text is visible. The id values 4001 or 4002 come in WM_COMMAND msgs to my window. How do I get my menu to display properly??

PS I'm using dev-c++.

Thanks for any help!
-Doug

The menu in the .rc file is:
popupmenu MENU
BEGIN
  MENUITEM "&Config",4001
  MENUITEM SEPARATOR
  MENUITEM "E&xit",4002
END

bops Jun 8th, 2007 9:24 am
Re: Popup Menu displays as very thin box
 
You should really post some code to show what you are doing so people can pick out what you are doing wrong and help correct it. I have no idea on this one, but if you post some code, surely a more experienced member will be able to help you out.

WolfPack Jun 8th, 2007 10:49 pm
Re: Popup Menu displays as very thin box
 
Doug,

I don't think it is a problem with the resource file. Show the code where you are displaying the menu.

dougy83 Jun 10th, 2007 5:49 am
Re: Popup Menu displays as very thin box
 
Quote:

Originally Posted by WolfPack (Post 385097)
Doug,

I don't think it is a problem with the resource file. Show the code where you are displaying the menu.

Thanks for the reply bops & WolfPack. I found that both the resource file needed changing to have a dummy MENU containing a POPUP that I wanted to display, and the trackpopupmenu fn needed the submenu extracted with GetSubMenu(Menu, 0).

Silly me, thanks for your time though.

-Doug


All times are GMT -4. The time now is 10:19 am.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC