Common Save Dialogs and DX 7

Started by
4 comments, last by shdaga 22 years, 7 months ago
Hello all. Is there a way to use the common save,save as and open file dialogs with a full screen direct X program. I need to implement a more robust save and open file system in my map editor. I have looked through the msvc 6 docs but they arent musch help (and are rather confusing).
Here's a new dance everyone can do, do the Kirby:<(*.*<) <(^.^)> (>*.*)> <(^.^)> <(*.*<) (>^.^)>
Advertisement
You probably can, but I don''t know of a way since I''ve never needed to. You rarely find a commercial game or any type of full-screen DirectX application using the common Windows dialogs. I would suggest implementing your own Open and Save and drawing it within the program itself. To get a list of all files in a directory, just use the FindFirstFile() and FindNextFile() (using a for loop makes this easy).
Alright, ill take a look into these functions...
Here's a new dance everyone can do, do the Kirby:<(*.*<) <(^.^)> (>*.*)> <(^.^)> <(*.*<) (>^.^)>
Since my last reply probably didn''t help you a whole lot, I''ll give you an example of how you would do this (untested):

  int DrawOpenWindow(void){   WIN32_FIND_DATA win32_find_data;   HANDLE hFindFile;   int x, y;   //First you have to draw the save or open window (not   //the actual file listing). You can do this however you   //want. If you want it to be similar to the Windows dialogs,   //then just draw something that looks like a window.   DrawWhatever();   x = 0;   y = 0;   //Now you have to get the list of files in the directory.   //You can do so like this:   hFindFile = FindFirstFile("*.*", &win32_find_data);   do   {       DrawGameText(win32_find_data.cFileName, x, y);       y += 32; //Whatever, just draw your text after                //the last line   } while(FindNextFile(hFindFile, &win32_find_data);   FindClose(hFindFile);}  


Also, I would recommend taking a look at the game ''Cave Diver'' in the GDNet Showcase. Aside from being a good game, it comes with a map editor which demonstrates the use of a custom file listing for open and save. No source code, but take a look at it.
Thanks bro, I''ve been looking through all the msvc docs..and its not that helpfull, I apreciate your help, and its just in time too! I was just about to start bangin on the save code again.
Well, here goes nothing...


start coding....


now
Here's a new dance everyone can do, do the Kirby:<(*.*<) <(^.^)> (>*.*)> <(^.^)> <(*.*<) (>^.^)>
I just DL''d that cave diver game and it locked up my system when i tried to open a map...but only when I tried clicking on the down arrow of the scroll button...These are the things that I''m afraid of having to code myself(scroll bars and and stuff)..Anyway, Ill try that code you sent me, and see how it goes. -out-
Here's a new dance everyone can do, do the Kirby:<(*.*<) <(^.^)> (>*.*)> <(^.^)> <(*.*<) (>^.^)>

This topic is closed to new replies.

Advertisement