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

C / C++ / MFC

 
GeneralRe: I'm new and i need help with html and all Pin
Philip Nicoletti10-Sep-00 12:56
Philip Nicoletti10-Sep-00 12:56 
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 
OK, next question. I know how to subclass a window using SetWindowLong. No prob. However, the only way that I can find to do it, is to define a function outside of any class. Is there a way to use a function belonging to a class as the callback procedure, and if so, how do I declare it? Would it be:

m_OldWndProc=(WNDPROC)::SetWindowLong(m_ControlToSubclass.GetSafeHwnd(), GWL_WNDPROC, (LONG)CMyClass::NewWndProc);

Or, would it be

m_OldWndProc=(WNDPROC)::SetWindowLong(m_ControlToSubclass.GetSafeHwnd(), GWL_WNDPROC, (LONG)NewWndProc);

And, how do I properly cast the function point to the LONG that SetWindowLong requires for its 3rd parameter?
Also, what's the proper method of UN subclassing the window?

Thanks in advance for any help.
GeneralRe: SetWindowLong Pin
Michael Dunn8-Sep-00 20:57
sitebuilderMichael Dunn8-Sep-00 20:57 
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 

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.