non ActX com dlg GetOpenFilename
Posted on 1998-11-17
I want to use the common dialog box GetOpenFileName. It will not be possible to distribute the ActiveX version, so I have to use the api calls (I want to do it this way, and I'm forced to. COmpany rules: No ActiveX distributions AT ALL, etc).
I have no problem calling up the dialog box, but it isn't centered. How can I center it? I tried writing a hook and using OFN_EABLEHOOK, but the best that happened is that I could change the height of the box, but not move it (this happend with the MoveWindow api call).
I have successfully centered the browse for folder dialog (shell32) via it's callback to start at a preselected path, but the GetOpenFilename Dialog box doesn't seem to work the same.
(I'm using VB 5)