Gamestudio Links
Zorro Links
Newest Posts
Executing Trades on Next Bar Open
by vicknick. 06/13/24 08:51
Zorro Beta 2.61: PyTorch
by jcl. 06/10/24 14:42
New FXCM FIX Plugin
by flink. 06/04/24 07:30
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (mciwjd545, 1 invisible), 774 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19058 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
pop up menu window? #302084
12/16/09 14:13
12/16/09 14:13
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline OP
Member
Nicholas  Offline OP
Member

Joined: Aug 2002
Posts: 164
Houston
I have a windows style menu in the following code, but I need to make a pop up window similar to the "Options->Preferences" menu in SED.
I think it has something to do with CreatePopupMenu() but I can't seem to figure it out.


Black holes are where God divided by zero.
Re: pop up menu window? [Re: Nicholas] #302113
12/16/09 18:26
12/16/09 18:26
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
'CreatePopupMenu' is used for a context menu (shortcut menu) like the one that apperas when you right-click and you get 'copy','cut','paste' etc.

What you're describing is a 'modal' window. You just create a window the standard win32 way, with WNDCLASSEX/CreateWindow()/RegisterWindow(), but to make sure that the window is modal you have to do a little bit more tweaking.

You can either temporary disable the parent window with eg, EnableWindow(), or block messages in the message loop, while the modal window is open.

There may be a specialised function for modal windows, something like Dialog() or DialogBox().

I haven't worked with modal windows in native win32 myself, so this is just my theory, but it should work. Google 'modeless vs modal' and similar terms to find some standard C++.

Re: pop up menu window? [Re: DJBMASTER] #302163
12/17/09 02:26
12/17/09 02:26
Joined: Aug 2002
Posts: 164
Houston
Nicholas Offline OP
Member
Nicholas  Offline OP
Member

Joined: Aug 2002
Posts: 164
Houston
I tried looking at a few samples and I can't seem to get it to work with 3DGS. I'm pretty green with the windows api stuff.


Black holes are where God divided by zero.
Re: pop up menu window? [Re: Nicholas] #302166
12/17/09 04:04
12/17/09 04:04
Joined: Nov 2007
Posts: 1,143
United Kingdom
DJBMASTER Offline
Serious User
DJBMASTER  Offline
Serious User

Joined: Nov 2007
Posts: 1,143
United Kingdom
Ok, i'll have a go later on, I'm messing about quite a bit with win32 and 3DGS.
I think building a Dialog template and then using DialogBox() is the way...


Moderated by  HeelX, Lukas, rayp, Rei_Ayanami, Superku, Tobias, TWO, VeT 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1