Handling menus through API

Just starting out? Need help? Post your questions and find answers here.
halo
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Jan 26, 2004 2:49 am

Handling menus through API

Post 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.
lexvictory
Addict
Addict
Posts: 1027
Joined: Sun May 15, 2005 5:15 am
Location: Australia
Contact:

Post by lexvictory »

try createmenu_() :wink:
Demonio Ardente

Currently managing Linux & OS X Tailbite
OS X TailBite now up to date with Windows!
halo
Enthusiast
Enthusiast
Posts: 104
Joined: Mon Jan 26, 2004 2:49 am

Post 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.
GreenGiant
Enthusiast
Enthusiast
Posts: 252
Joined: Fri Feb 20, 2004 5:43 pm

Post 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)
PB
PureBasic Expert
PureBasic Expert
Posts: 7581
Joined: Fri Apr 25, 2003 5:24 pm

Post 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!
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
Post Reply