Click here to Skip to main content
16,010,231 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAbout bitmaps on dialog Pin
Eq9-Sep-00 17:39
Eq9-Sep-00 17:39 
GeneralUsing HOOKs Pin
Mustafa Demirhan9-Sep-00 0:44
Mustafa Demirhan9-Sep-00 0:44 
GeneralRe: Using HOOKs Pin
Sam Hobbs9-Sep-00 17:22
Sam Hobbs9-Sep-00 17:22 
GeneralRe: Using HOOKs Pin
Marcelo Guerra26-Dec-00 6:47
Marcelo Guerra26-Dec-00 6:47 
GeneralMoney 2000 Pin
pankaj8-Sep-00 21:07
pankaj8-Sep-00 21:07 
GeneralRe: Money 2000 Pin
David Wulff10-Sep-00 10:58
David Wulff10-Sep-00 10:58 
GeneralSetWindowLong Pin
Jamie Nordmeyer8-Sep-00 14:13
Jamie Nordmeyer8-Sep-00 14:13 
GeneralRe: SetWindowLong Pin
Michael Dunn8-Sep-00 20:57
sitebuilderMichael Dunn8-Sep-00 20:57 
I infer from your GetSafeHwnd() calls that you're using MFC. If so, there's an easier way to do this - CWnd::SubclassWindow().

But to answer your questions, you can't use CMyClass::NewWndProc() as the callback because that function has this as the first parameter (even though you don't write the function that way) which makes it not match the required prototype. If you make that member function static it will work, because static methods do not have a this pointer.

Also, to undo the subclassing, call SetWindowLong() again and set the wnd proc to m_OldWndProc.
GeneralRe: SetWindowLong Pin
Jamie Nordmeyer11-Sep-00 7:55
Jamie Nordmeyer11-Sep-00 7:55 
GeneralRe: SetWindowLong Pin
Michael Dunn11-Sep-00 8:16
sitebuilderMichael Dunn11-Sep-00 8:16 
GeneralRe: SetWindowLong Pin
Sam Hobbs11-Sep-00 17:50
Sam Hobbs11-Sep-00 17:50 
GeneralRich Edit Question Pin
Mihalcik8-Sep-00 8:25
sussMihalcik8-Sep-00 8:25 
GeneralMDI Child Window Pin
Jamie Nordmeyer8-Sep-00 7:46
Jamie Nordmeyer8-Sep-00 7:46 
GeneralRe: MDI Child Window Pin
Sam Hobbs8-Sep-00 8:34
Sam Hobbs8-Sep-00 8:34 
GeneralRe: MDI Child Window Pin
Jamie Nordmeyer8-Sep-00 8:44
Jamie Nordmeyer8-Sep-00 8:44 
GeneralRe: MDI Child Window Pin
Jamie Nordmeyer8-Sep-00 8:49
Jamie Nordmeyer8-Sep-00 8:49 
GeneralRe: MDI Child Window Pin
Sam Hobbs8-Sep-00 9:01
Sam Hobbs8-Sep-00 9:01 
GeneralDll programming... Linker Error Pin
thedogbear8-Sep-00 5:52
thedogbear8-Sep-00 5:52 
GeneralRe: Dll programming... Linker Error Pin
Chris Meech8-Sep-00 8:09
Chris Meech8-Sep-00 8:09 
GeneralCListViewCtrl (ATL) Pin
Chris B.8-Sep-00 5:00
Chris B.8-Sep-00 5:00 
GeneralRe: CListViewCtrl (ATL) Pin
Chris B.8-Sep-00 5:02
Chris B.8-Sep-00 5:02 
Generalsecond SelectObject crashs Pin
real name8-Sep-00 3:45
sussreal name8-Sep-00 3:45 
GeneralRe: second SelectObject crashs Pin
real name21-Sep-00 3:20
sussreal name21-Sep-00 3:20 
GeneralSendKeys Pin
Mustafa Demirhan8-Sep-00 2:07
Mustafa Demirhan8-Sep-00 2:07 
GeneralRe: SendKeys Pin
Remus Lazar8-Sep-00 2:54
Remus Lazar8-Sep-00 2:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.