Page 1 of 1

Handling menus through API

Posted: Sat Sep 10, 2005 6:53 am
by halo
I would like to add menus to my windows using the API commands, instead of PureBasic commands. API lets you insert menus anywhere, and you can remove menu items.

I found some examples that modify and add to existing menus. I don't know how to create the window menu to start with. Getmenu_() only returns a handle after I create a PB menu and add one menutitle.

Posted: Sat Sep 10, 2005 9:07 am
by lexvictory
try createmenu_() :wink:

Posted: Sat Sep 10, 2005 3:18 pm
by halo
Sonofa! That's not in API-Guide 3.7!

Okay, so CreateMenu_(VOID).

I don't see a parameter for hwnd, so how do I attach this to the window?

Ooohhhh....Setmenu(). Another command missing from API-Guide.

Time to uninstall API-Guide.

Posted: Sat Sep 10, 2005 8:47 pm
by GreenGiant
There's a help file you can download that covers most of the api commands, which seems pretty good. I think its the one *here* (if I'm right then the help file is in English)

Posted: Sun Sep 11, 2005 1:06 am
by PB
Thanks GreenGiant, that Win32.hlp file is a later version than the one that
I currently have (it's 23.6 MB compared to my current 19.1 MB). Awesome!