 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Guest
|
Posted: Sun Feb 12, 2006 2:03 pm Post subject: problem with InsertMenuItem |
|
|
I am creating a system tray icon that shows up a bunch of menus on
right click.
I try to populate a pop-up menu with the following function.
void CPimonTray::populatePopupMenu(HMENU hPopMenu)
{
MENUITEMINFO menuItem;
menuItem.cbSize = sizeof(MENUITEMINFO);
menuItem.fMask =
IIM_FTYPE|MIIM_STRING|MIIM_TYPE|MIIM_STATE|MIIM_ID ;
menuItem.fType = MFT_STRING;
menuItem.fState = MFS_ENABLED;
menuItem.wID = ID_LAUNCH_PI;
std::string menuName = "Sign In";
menuItem.dwTypeData = menuName.c_str();
menuItem.cch = menuName.length() + 1;
bool res = InsertMenuItem(hPopMenu,0xFFFFFFFF,true,&menuItem);
DWORD errorcode = GetLastError();
}
When i do this I always get an error code:87 [ Invalid parameters ]
Can someone please help me out of this?
Thanks in advance!
-manojna |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|