Announcement

Collapse
No announcement yet.

open/savefile dialog

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Michael Mattias
    replied
    The one thing I was unable to pull off with those hook procedures was resizing the dialog to a desired size... specifically, the size it was when the user last called "GetOpenFileName".

    While it's nice that the dialog is resizeable, I find it a bit tacky that the user has to resize it each time it is called... I think it would be better to 'remember' the last size and position used and start there the next time the function is called.

    When I tried re-sizing, I did get the "main" screen to open up in the new size, but all the controls on the GetOpenFileName dialog were in the default position, meaning the screen may as well been allowed to open at the default size.

    I am absolutely open to ideas as to how to do this. I'll even update the demo to include a "remember last size and position" if someone can help me figure out how to do it.

    MCM

    Leave a comment:


  • Walt Decker
    replied
    Thanks, Michael.

    After trying a variety of methods I decided, after looking at Win32API.INC, to write my own procedure. Later I found that the console box was covering the common dialog only when running in the IDE.

    However, your hook procedure will be handy for a number of other things.

    Leave a comment:


  • Michael Mattias
    replied
    Just this week I had a similar problem with a dialog I called from within a third-party application.

    I solved that by on WM_INITDIALOG posting a private message to the window, then on receipt of that message I "SetForegroundWindow" (or maybe it was "SetFocus") to the dialog (or the control to get focus, as GetFocus automatically makes that window the Foreground window).

    To control that on the open/save file dialog, I think you'd have to add a hook procedure to the open/save dialog (demo: Explorer-Style hook Procedures for OpenFileDialog and SaveFileDialog 3-31-07)..

    . and post the message on CDN_INITDONE in the hook procedure.

    Worth a try?

    MCM

    Leave a comment:


  • Walt Decker
    started a topic open/savefile dialog

    open/savefile dialog

    When using the open/save file dialog in comdlg32.inc, is there a way to make it topmost so that it isn't hidden by the console box?
Working...
X