Click here to Skip to main content
15,902,114 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: CListCtrl, How to see only some column Pin
David Crow7-Sep-06 4:25
David Crow7-Sep-06 4:25 
QuestionIs windproc special function and callback question. Pin
sawerr6-Sep-06 20:40
sawerr6-Sep-06 20:40 
AnswerRe: Is windproc special function and callback question. Pin
Cedric Moonen6-Sep-06 20:49
Cedric Moonen6-Sep-06 20:49 
AnswerRe: Is windproc special function and callback question. Pin
Waldermort6-Sep-06 21:31
Waldermort6-Sep-06 21:31 
GeneralRe: Is windproc special function and callback question. Pin
Cedric Moonen6-Sep-06 21:39
Cedric Moonen6-Sep-06 21:39 
GeneralRe: Is windproc special function and callback question. Pin
sawerr6-Sep-06 21:59
sawerr6-Sep-06 21:59 
GeneralRe: Is windproc special function and callback question. [modified] Pin
Waldermort6-Sep-06 22:09
Waldermort6-Sep-06 22:09 
AnswerRe: Is windproc special function and callback question. Pin
m.dietz6-Sep-06 23:37
m.dietz6-Sep-06 23:37 
I think the main problem you have is to understand WHO calls the Callbackfunction. You give the pointer to a function to windows and Windows will call this function when it gets a message for that window (or did you implement you own GetMessage, TranslateMessage and DispatchMessage functions?)

The usual way to program it is having the loop in WinMain repeat GetMessage TranslateMessage and DispatchMessage calls these functions get one message from the global queue, translate it to make something useful with it and call the WndProc. And exactly that call cannot be influenced by you, it is programmed in the Windows API.

Giving the function pointer at registering is like telling a friend "if anything happens send a mail to this address". When you alter the signature of the function (by changing count, type or order of the parameters) this function is definitely not of the same type that Windows can call as Windows needs a function with 4 parameters. It's comparable like giving out a mobile phone number instead of the expected email adress.

I don't know C#, but i I think there too exist rules for defining event routines, so I don't think you can assign a function that needs 5 arguments to a button click event, or can you do that?

Greetings
Martin Dietz
QuestionConsole question Pin
alex.barylski6-Sep-06 20:33
alex.barylski6-Sep-06 20:33 
AnswerRe: Console question Pin
Waldermort6-Sep-06 21:17
Waldermort6-Sep-06 21:17 
GeneralRe: Console question Pin
alex.barylski7-Sep-06 9:30
alex.barylski7-Sep-06 9:30 
AnswerRe: Console question Pin
toxcct6-Sep-06 21:23
toxcct6-Sep-06 21:23 
GeneralRe: Console question Pin
benjymous6-Sep-06 21:31
benjymous6-Sep-06 21:31 
GeneralRe: Console question Pin
toxcct6-Sep-06 21:44
toxcct6-Sep-06 21:44 
AnswerRe: Console question Pin
vinclaro0017-Sep-06 15:35
vinclaro0017-Sep-06 15:35 
AnswerRe: writing data in txt file Pin
Programm3r6-Sep-06 20:43
Programm3r6-Sep-06 20:43 
JokeRe: writing data in txt file Pin
Hamid_RT6-Sep-06 21:39
Hamid_RT6-Sep-06 21:39 
QuestionPointer to function with variable argument list Pin
Crazy Joe Devola6-Sep-06 17:26
Crazy Joe Devola6-Sep-06 17:26 
AnswerRe: Pointer to function with variable argument list Pin
prasad_som6-Sep-06 19:36
prasad_som6-Sep-06 19:36 
QuestionHow to uninstall cleanly a oem driver? Pin
linshi6-Sep-06 15:44
linshi6-Sep-06 15:44 
QuestionEvent handling in dynaically created control Pin
Mohammad A Gdeisat6-Sep-06 9:18
Mohammad A Gdeisat6-Sep-06 9:18 
AnswerRe: Event handling in dynaically created control Pin
David Crow6-Sep-06 10:26
David Crow6-Sep-06 10:26 
QuestionC++ Global data structures Pin
Polity4h6-Sep-06 9:04
Polity4h6-Sep-06 9:04 
AnswerRe: C++ Global data structures Pin
Jun Du6-Sep-06 9:17
Jun Du6-Sep-06 9:17 
GeneralRe: C++ Global data structures Pin
Polity4h6-Sep-06 11:07
Polity4h6-Sep-06 11: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.