Archived

This topic is now archived and is closed to further replies.

Windows Save Dialogue Madness

This topic is 5669 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I''ve got a Windows API/DirectX question. This one involves the standard Windows save dialogue box. When I run this code in a fullscreen DirectX program, it knocks the program out of fullscreen mode and to the desktop where the save dialogue is displayed. When it''s done, it doesn''t even return focus to the program! Is there any way to make the save dialogue box appear in fullscreen mode, without having to make it switch to the desktop? I''ve seen it done in Starcraft (try hitting print-screen), so it must be possible somehow ...
void saveFile()
{
  OPENFILENAME openfilename;
  char filename[1024];
  char lpSPath[1024];

  sprintf(lpSPath,"%s\\saved",lpPath);
  memset(&openfilename, 0, sizeof(OPENFILENAME));
  openfilename.lStructSize = sizeof(OPENFILENAME);
  openfilename.hwndOwner = win_get_window();
  openfilename.lpstrFilter = "Image (*.png)\0*.png\0";
  openfilename.lpstrFile = filename;
  openfilename.nMaxFile = sizeof(filename);
  openfilename.lpstrInitialDir=lpSPath;
  openfilename.Flags = OFN_HIDEREADONLY | OFN_OVERWRITEPROMPT;

  filename[0] = 0;

  GetSaveFileName(&openfilename);

  ...
 

Share this post


Link to post
Share on other sites
There are a lot of additional members to the OPENFILENAME structure including user defined templates and callback procs. Maybe some combination of those items will provide the functionality you seek.

Share this post


Link to post
Share on other sites
Hi
I confirm that trying to display dialog boxes in fullscreen mode is NOT a good idea. The SDK framework itself switches back to windowed mode before displaying the change device dialog. The fullscreen mode is quite different of the windowed one: you cannot display the system cursor, context menus, ... So dialogs may not be allowed.

If Microsoft can''t do fullscreen dialogs, then I think you might not even try

Good luck anyway

Share this post


Link to post
Share on other sites
I have managed to display dialog boxes if fullscreen with a bit of messing with device contexts. You can still capture window events if the mouse is created with the non-exclusive flag.

Try looking here, it may help

http://msdn.microsoft.com/archive/default.asp?url=/archive/en-us/ddraw7/directdraw7/ddover_5ygn.asp

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Do you have DirectX 7? Look at SDK "samples" directory, I know there is sample programm about displaying GUI dialogs in fullscreen mode . Named "Fullscreen" or something like that..

Share this post


Link to post
Share on other sites