Hey @all,

in my program i use a Popup Menu with this code:
Code:
HMENU  hSubMenu2;

function set_sub_menus()
{
	long menu;
	long hSubMenu;
	
	menu=CreateMenu();
	hSubMenu=CreateMenu();
	hSubMenu2=CreatePopupMenu();

	InsertMenu(hSubMenu,1,MF_BYPOSITION|MF_STRING,1,"Neu");
	InsertMenu(hSubMenu,2,MF_BYPOSITION|MF_STRING,2,"Öffnen");
	InsertMenu(hSubMenu,3,MF_BYPOSITION|MF_STRING,3,"Speichern");
	InsertMenu(hSubMenu,5,MF_BYPOSITION|MF_STRING,4,"Beenden");

//Popupmenu!!
InsertMenu(hSubMenu2,1,MF_BYPOSITION|MF_STRING,5,"Test");

	InsertMenu(menu,0,MF_BYPOSITION|MF_STRING|MF_POPUP,hSubMenu,"Datei");

	SetMenu(hWnd,menu);
}


but if I want to open the Menu with:
Code:
	TrackPopupMenuEx(hSubMenu2, TPM_LEFTBUTTON,mouse_cursor.x,mouse_cursor.y,hWnd,NULL);

the menu will create on the wrong position (a few pixels above the mouse)


here is a screenshot of the problem.

Is it possible that gamestudio sets the mouse_coursor var wrong? And how I fix the problem?

sry for the bad english...


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com