|
Open/browse dialog
#270467
06/08/09 12:53
06/08/09 12:53
|
Joined: Nov 2007
Posts: 1,032 Croatia
croman
OP
Serious User
|
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
Senior Expert
|
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
OP
Serious User
|
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: Quad]
#270551
06/08/09 17:46
06/08/09 17:46
|
Joined: Mar 2008
Posts: 2,247 Baden Württemberg, Germany
Espér
Expert
|
Expert
Joined: Mar 2008
Posts: 2,247
Baden Württemberg, Germany
|
just include windows.h and use this 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);
}
|
|
|
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
Expert
|
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
|
|
|
|