Click here to Skip to main content
15,918,889 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralHow to determine IPAdress's network(public or private) Pin
sasi8320-Jun-07 23:59
sasi8320-Jun-07 23:59 
QuestiontITLE bAR Pin
nitin320-Jun-07 21:50
nitin320-Jun-07 21:50 
AnswerRe: tITLE bAR Pin
Matthew Faithfull20-Jun-07 22:47
Matthew Faithfull20-Jun-07 22:47 
QuestionRandom Child Menus in the Desktop Application Pin
Vasudevan Deepak Kumar20-Jun-07 20:53
Vasudevan Deepak Kumar20-Jun-07 20:53 
AnswerRe: Random Child Menus in the Desktop Application [modified] Pin
zhang80060520-Jun-07 21:57
zhang80060520-Jun-07 21:57 
QuestionWindowProc Pin
nitin320-Jun-07 20:48
nitin320-Jun-07 20:48 
AnswerRe: WindowProc Pin
Cedric Moonen20-Jun-07 21:06
Cedric Moonen20-Jun-07 21:06 
AnswerRe: WindowProc Pin
Mark Salsbery21-Jun-07 6:30
Mark Salsbery21-Jun-07 6:30 
Basically, you can't.

The prototype for the window procedure is:

LRESULT CALLBACK WndProc( HWND hWnd,
UINT message,
WPARAM wParam,
LPARAM lParam)

There's no way you can make a non-static member function with the same prototype because non-
static member functions require an object of the class' type to call them. This object is
passed implicitly as the "this pointer" to all non-static methods. The Windows APIs
know nothing about our C++ objects so there's no way the system could properly call our
class methods.

In addition to Cedric's link, take a look at the MFC source code and see how MFC handles it.

Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

QuestionCFile vs FILE* vs FSTREAM Pin
GameProfessor20-Jun-07 18:56
GameProfessor20-Jun-07 18:56 
AnswerRe: CFile vs FILE* vs FSTREAM Pin
User 58385220-Jun-07 19:30
User 58385220-Jun-07 19:30 
AnswerRe: CFile vs FILE* vs FSTREAM Pin
Matthew Faithfull20-Jun-07 21:50
Matthew Faithfull20-Jun-07 21:50 
GeneralRe: CFile vs FILE* vs FSTREAM Pin
GameProfessor20-Jun-07 22:46
GameProfessor20-Jun-07 22:46 
GeneralRe: CFile vs FILE* vs FSTREAM Pin
Matthew Faithfull20-Jun-07 23:00
Matthew Faithfull20-Jun-07 23:00 
Questionvirtual function Pin
paper6720-Jun-07 18:43
paper6720-Jun-07 18:43 
AnswerRe: virtual function Pin
Nibu babu thomas20-Jun-07 18:51
Nibu babu thomas20-Jun-07 18:51 
GeneralRe: virtual function Pin
Mark Salsbery21-Jun-07 6:34
Mark Salsbery21-Jun-07 6:34 
QuestionCBrowseCtrl use Pin
Kryptech20-Jun-07 17:45
Kryptech20-Jun-07 17:45 
AnswerRe: CBrowseCtrl use Pin
Hamid_RT20-Jun-07 18:39
Hamid_RT20-Jun-07 18:39 
GeneralRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 2:22
Kryptech21-Jun-07 2:22 
AnswerRe: CBrowseCtrl use Pin
David Crow21-Jun-07 2:45
David Crow21-Jun-07 2:45 
GeneralRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 3:10
Kryptech21-Jun-07 3:10 
QuestionRe: CBrowseCtrl use Pin
David Crow21-Jun-07 3:18
David Crow21-Jun-07 3:18 
AnswerRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 3:21
Kryptech21-Jun-07 3:21 
GeneralRe: CBrowseCtrl use Pin
David Crow21-Jun-07 3:28
David Crow21-Jun-07 3:28 
GeneralRe: CBrowseCtrl use Pin
Kryptech21-Jun-07 3:38
Kryptech21-Jun-07 3:38 

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.