Click here to Skip to main content
15,910,886 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionErasing a button Pin
DanYELL2-Oct-07 13:19
DanYELL2-Oct-07 13:19 
QuestionRe: Erasing a button Pin
Mark Salsbery2-Oct-07 13:29
Mark Salsbery2-Oct-07 13:29 
AnswerRe: Erasing a button Pin
DanYELL2-Oct-07 13:38
DanYELL2-Oct-07 13:38 
GeneralRe: Erasing a button Pin
Mark Salsbery2-Oct-07 13:44
Mark Salsbery2-Oct-07 13:44 
GeneralRe: Erasing a button Pin
Mark Salsbery2-Oct-07 13:58
Mark Salsbery2-Oct-07 13:58 
GeneralRe: Erasing a button Pin
cp98762-Oct-07 16:42
cp98762-Oct-07 16:42 
Questionfunction pointers part 2 Pin
Mustafa Ismail Mustafa2-Oct-07 10:59
Mustafa Ismail Mustafa2-Oct-07 10:59 
AnswerRe: function pointers part 2 Pin
Chris Losinger2-Oct-07 11:15
professionalChris Losinger2-Oct-07 11:15 
is fncSame a static member function ? (it should be. if you're going to use it with fn pointers)

Mustafa Ismail Mustafa wrote:
Where would I use function pointers?


you use them all the time when interacting with C-style interfaces (ex. qsort, EnumChildWindows, EnumFonts, WndProcs, etc). you find them often in C-interfaced libraries, where library authors add hooks to let you override library functionality without having to change any of the library's source code - just set the "errorOutput" function pointer (or whatever) to your own function instead of the built-in function.

C++ reduces their importance, though. since a lot of what they were used for in C is handled by the ability to override functions in base classes, you don't need to use function pointers - just derive from the base class and override a virtual function.




GeneralRe: function pointers part 2 Pin
Mustafa Ismail Mustafa2-Oct-07 11:28
Mustafa Ismail Mustafa2-Oct-07 11:28 
GeneralRe: function pointers part 2 Pin
Stephen Hewitt2-Oct-07 17:27
Stephen Hewitt2-Oct-07 17:27 
AnswerRe: function pointers part 2 [modified] Pin
Stephen Hewitt2-Oct-07 13:25
Stephen Hewitt2-Oct-07 13:25 
AnswerRe: function pointers part 2 Pin
Cedric Moonen2-Oct-07 20:15
Cedric Moonen2-Oct-07 20:15 
GeneralRe: function pointers part 2 Pin
Stephen Hewitt2-Oct-07 21:40
Stephen Hewitt2-Oct-07 21:40 
QuestionSorting a value from file Pin
Herboren2-Oct-07 10:23
Herboren2-Oct-07 10:23 
AnswerRe: Sorting a value from file Pin
Stephen Hewitt2-Oct-07 13:46
Stephen Hewitt2-Oct-07 13:46 
AnswerRe: Sorting a value from file Pin
zakkas24832-Oct-07 19:14
zakkas24832-Oct-07 19:14 
AnswerRe: Sorting a value from file [modified] Pin
David Crow3-Oct-07 3:07
David Crow3-Oct-07 3:07 
GeneralRe: Sorting a value from file Pin
Herboren3-Oct-07 6:21
Herboren3-Oct-07 6:21 
Questionwhat is the difference between macro, pragma, and inline? Pin
Gofur Halmurat2-Oct-07 10:18
Gofur Halmurat2-Oct-07 10:18 
AnswerRe: what is the difference between macro, pragma, and inline? Pin
Mark Salsbery2-Oct-07 10:38
Mark Salsbery2-Oct-07 10:38 
Questionva_copy? Pin
DQNOK2-Oct-07 7:32
professionalDQNOK2-Oct-07 7:32 
AnswerRe: va_copy? Pin
Mark Salsbery2-Oct-07 8:19
Mark Salsbery2-Oct-07 8:19 
AnswerRe: va_copy? Pin
David Crow2-Oct-07 8:20
David Crow2-Oct-07 8:20 
GeneralRe: va_copy? Pin
DQNOK2-Oct-07 8:57
professionalDQNOK2-Oct-07 8:57 
QuestionHaving a the processID how to get the application instance (HINSTANCE) ? Pin
carabutnicolae12342-Oct-07 7:22
carabutnicolae12342-Oct-07 7:22 

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.