Re: WinSetWindowPtr() for WinFileDlg ?



None of this looks correct. As Cornelis noted, you don't subclass
a file dialog. Instead, you supply your "subclass" proc in the
'pfnDlgProc' member of the FILEDLG struct - i.e., the address of
GlobalFileDlgWindowProcedure(). Any messages that it doesn't
handle should be passed to WinDefFileDlgProc().

Yes, I know. In my initial post I left out an important thing.
I'm not using the file dialog directly but rather an already
subclassed file dialog, the GBM file dialog. It is already
using the provided pfnDlgProc and is in a separate DLL.

And as I tried to put my window procedure in, I found out
that the already released GBM file dialog versions don't
export their window procedure. I could fix this in a new
release but the code I'm writing should also run with
the old dialog. That's why this hacking around with
WinSubclassWindow() to get its window procedure.
.



Relevant Pages

  • Re: SubClassWindow, a big confusion for me
    ... When you subclass a window, all you are doing is inserting by inserting ... a window procedure ahead of whatever proc is currently present. ... gives you opportunity to respond to selected messages as you want. ...
    (microsoft.public.vc.mfc)
  • Re: WindowProc: combobox messages problem
    ... > window procedure." ... > so I will have to subclass the CComboBox anyway to be able to handle ... > Another question about the message map (I couldn't find on MSDN, ...
    (microsoft.public.vc.mfc)
  • Re: CComboxbox , dropdown
    ... subclass it nicely in MFC? ... I need to provide my own window procedure so that I can handle the F6 ... Derive a class from CEdit, map the WM_KEYDOWN message, add a member ... edit member's SubclassWindow with the HWND of the combo's child edit. ...
    (microsoft.public.vc.mfc)
  • Re: my own mfc, per window instance data?
    ... Will it work with new NX protection bit? ... > dynamically allocated assembly code that is used to subclass the window. ... > This new window procedure calls a member function of the corresponding ...
    (microsoft.public.win32.programmer.kernel)