winapi - Reset Open File Dialog Position in Windows -


i open open file dialog using getopenfilename function. i'm making handler function center dialog window inside owner window. center dialog on cdn_initdone notification.

currently, seems windows remembers last dialog position desktop apps , overrides dialog coordinates. how reset last remembered position can check centering work users?

i thought running test using different user or virtual machine isn't convenient. unfortunately, searching in registry myexecutable.exe returns nothing.

i'm running windows 8.

i'm year late, had deal issue. worked me supplying ofnhookproc getopenfilename(), subclassing parent of hwnd passed ofnhookproc.

after subclassing, handle wm_windowposchanged, , if coordinates aren't think should be, setwindowpos(), undo subclass , return 0.

edit: should other methods, such wm_initdialog in hook proc or cdn_initdone did not work me whatsoever.


Comments

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -