I was late for a year, but I just had to solve this problem. For me, worked with OFNHookProcbefore GetOpenFileName(), and then subclassing the HWND parent passed to OFNHookProc.
After the subclass, I process WM_WINDOWPOSCHANGED, and if the coordinates are not where I think they should be, I do a SetWindowPos(), cancel the subclass and return 0.
Edit: I have to say that other methods, such as WM_INITDIALOGin hook proc or CDN_INITDONEdid not work for me at all.
source
share