Hooks
-
Hi All, I have a very large application that creates many dialogs. I have a CDialog derived class that skins dialogs. I would like to automatically make EVERY dialog in my application use this class - even message boxes, TWAIN interfaces etc etc. I was hoping I could simply use SetWindowsHookEx to do this but the problem that I'm having is that my dialogs are already 'CWnd' objects - when I try to subclass them as another CWnd (i.e. my Skinned Dialog class) I get assertations. Is there any way to safely subclass a CDialog object with another CDialog object? Thanks in advance, Dave
-
Hi All, I have a very large application that creates many dialogs. I have a CDialog derived class that skins dialogs. I would like to automatically make EVERY dialog in my application use this class - even message boxes, TWAIN interfaces etc etc. I was hoping I could simply use SetWindowsHookEx to do this but the problem that I'm having is that my dialogs are already 'CWnd' objects - when I try to subclass them as another CWnd (i.e. my Skinned Dialog class) I get assertations. Is there any way to safely subclass a CDialog object with another CDialog object? Thanks in advance, Dave
You could use the
CWnd::Detach
method to detach the existing CWnd object and then useCWnd::Attach
on the returned window handle to attach your CDialog derived class.«_Superman_» I love work. It gives me something to do between weekends.