Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (degenerate_762, AbrahamR, AndrewAMD, ozgur), 667 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
Open/browse dialog #270467
06/08/09 12:53
06/08/09 12:53
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline OP
Serious User
croman  Offline OP
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
How can i make an open/browse dialog in lite-c? Dialog like: File->Open dialog in sed, wed, med...



Ubi bene, ibi Patria.
Re: Open/browse dialog [Re: croman] #270470
06/08/09 13:02
06/08/09 13:02
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
winapi openfiledialog

there is an example in the samples folder.


3333333333
Re: Open/browse dialog [Re: Quad] #270483
06/08/09 13:49
06/08/09 13:49
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline OP
Serious User
croman  Offline OP
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
thnx


wait, is it possible to do that in pure lite-c or do i need to work in legacy mode?

Last edited by croman; 06/08/09 13:53.


Ubi bene, ibi Patria.
Re: Open/browse dialog [Re: croman] #270493
06/08/09 14:21
06/08/09 14:21
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
you can do it in both modes. just add windows.h


3333333333
Re: Open/browse dialog [Re: Quad] #270551
06/08/09 17:46
06/08/09 17:46
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
Espér Offline
Expert
Espér  Offline
Expert

Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
just include windows.h

and use this code:
Code:
        STRING* filename = "#25";

        [...]

	OPENFILENAME ofd;
	char buf[256];
	FillMemory(&ofd,sizeof(ofd),0);
	FillMemory(buf,256,0);
	
	ofd.Flags=OFN_PATHMUSTEXIST|OFN_FILEMUSTEXIST|OFN_NOCHANGEDIR;
	ofd.lStructSize=sizeof(ofd);
	ofd.hwndOwner=hWnd;
	ofd.lpstrFilter	="Portable Network Graphic\0*.png\0\0";
	ofd.lpstrInitialDir = _chr(""); //work_dir
	ofd.lpstrFile=buf;
	ofd.nMaxFile=255;	
	ofd.lpstrTitle="Lade eine Levelbitmap";
	if (GetOpenFileName(&ofd))
	{
		str_cpy(filename, ofd.lpstrFile);
	}



Selling my Acknex Engine Editions (A7 Com & A8 Pro):
>> click here if you are interested <<
Re: Open/browse dialog [Re: Espér] #270589
06/08/09 21:39
06/08/09 21:39
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline OP
Serious User
croman  Offline OP
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
thnx



Ubi bene, ibi Patria.
Re: Open/browse dialog [Re: croman] #270604
06/09/09 00:38
06/09/09 00:38
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
I'm very glad you asked this question, and very glad you guys answered it. I was going to ask the other day, but forgot. Thanks!

Any other goodies in windows.h that could be useful? smile

Re: Open/browse dialog [Re: Jaeger] #270633
06/09/09 06:22
06/09/09 06:22
Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
Quad Offline
Senior Expert
Quad  Offline
Senior Expert

Joined: Oct 2007
Posts: 5,210
Ä°stanbul, Turkey
nearly all winapi functions?


3333333333
Re: Open/browse dialog [Re: Quad] #270650
06/09/09 09:10
06/09/09 09:10
Joined: Feb 2008
Posts: 3,232
Australia
EvilSOB Offline
Expert
EvilSOB  Offline
Expert

Joined: Feb 2008
Posts: 3,232
Australia
Only problem is that Ive never gotten any "window" type functions to be
"on-top" when 3DGS is in full-screen mode.

Unless someone has found a workaround for that???


"There is no fate but what WE make." - CEO Cyberdyne Systems Corp.
A8.30.5 Commercial
Re: Open/browse dialog [Re: EvilSOB] #270654
06/09/09 09:47
06/09/09 09:47
Joined: May 2009
Posts: 258
Chicago
J
Jaeger Offline
Member
Jaeger  Offline
Member
J

Joined: May 2009
Posts: 258
Chicago
Seems like there should be some way to decide which window is active. I just don't know how. If there's no Lite-C command, then I guess we could use something like window_active(STRING* window_name); That would be cool, if a comparable counterpart doesn't already exist somewhere in Acknexland...

Page 1 of 2 1 2

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