Click here to Skip to main content
15,914,281 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalhelp Pin
12-Jun-02 8:09
suss12-Jun-02 8:09 
GeneralRe: help Pin
Michael P Butler12-Jun-02 11:16
Michael P Butler12-Jun-02 11:16 
GeneralReadFile from Comm port Pin
JohnnyG12-Jun-02 7:19
JohnnyG12-Jun-02 7:19 
GeneralRe: ReadFile from Comm port Pin
JohnnyG12-Jun-02 10:16
JohnnyG12-Jun-02 10:16 
GeneralWindows Messaging Timing and Threads Pin
SanShou12-Jun-02 6:41
SanShou12-Jun-02 6:41 
GeneralRe: Windows Messaging Timing and Threads Pin
NormDroid12-Jun-02 9:40
professionalNormDroid12-Jun-02 9:40 
GeneralCallbakc Functions Pin
arthivjii12-Jun-02 6:36
arthivjii12-Jun-02 6:36 
GeneralRe: Callbakc Functions Pin
Chris Losinger12-Jun-02 6:55
professionalChris Losinger12-Jun-02 6:55 
a callback function is really just a plain C function (not a C++ member function). you give its address (ie. the adress of your function) to another function which will then call your function when it needs to do something (like compare two items in qsort, store info about a font in EnumFonts, etc.) . but there's nothing special about them in general.

here's how you get font info:
BOOL CALLBACK EnumFontCallBack(LPLOGFONT lplf, LPTEXTMETRIC lptm, DWORD dwType, LPARAM lpData)	
{	
   TRACE("Get font: %s\n", lplf->lfFaceName);
   return TRUE;
}

///

void CMyDialog::DumpFonts()
{		
   CClientDC dc(this);		

   EnumFonts (dc, 0,(FONTENUMPROC) EnumFontCallBack, 0); //Enumerate font
}


-c


shh! the audience (and the NSA) is listening
GeneralRe: Callbakc Functions Pin
Alexandru Savescu12-Jun-02 8:43
Alexandru Savescu12-Jun-02 8:43 
GeneralRe: Callbakc Functions Pin
Chris Losinger12-Jun-02 9:00
professionalChris Losinger12-Jun-02 9:00 
GeneralInstallshield questions... Pin
Mike Zinni12-Jun-02 5:36
Mike Zinni12-Jun-02 5:36 
GeneralRe: Installshield questions... Pin
Navin12-Jun-02 8:33
Navin12-Jun-02 8:33 
QuestionHi! everybody! How about "graph line printing"? Pin
12-Jun-02 5:41
suss12-Jun-02 5:41 
QuestionHow to fill a vector or a list with data from a file! Pin
JMajors9812-Jun-02 4:50
JMajors9812-Jun-02 4:50 
AnswerRe: How to fill a vector or a list with data from a file! Pin
Chris Losinger12-Jun-02 5:39
professionalChris Losinger12-Jun-02 5:39 
AnswerRe: How to fill a vector or a list with data from a file! Pin
Joaquín M López Muñoz12-Jun-02 11:57
Joaquín M López Muñoz12-Jun-02 11:57 
AnswerRe: How to fill a vector or a list with data from a file! Pin
Mike Nordell13-Jun-02 3:23
Mike Nordell13-Jun-02 3:23 
GeneralParseCommandLine Pin
Anthony988712-Jun-02 4:45
Anthony988712-Jun-02 4:45 
GeneralRe: ParseCommandLine Pin
Le centriste12-Jun-02 5:37
Le centriste12-Jun-02 5:37 
GeneralRe: ParseCommandLine Pin
Navin12-Jun-02 8:39
Navin12-Jun-02 8:39 
GeneralITaskBarList2::MarkFullScreenWindow Pin
12-Jun-02 4:20
suss12-Jun-02 4:20 
QuestionCan Library Files be Modified Pin
Steve Thresher12-Jun-02 4:23
Steve Thresher12-Jun-02 4:23 
AnswerRe: Can Library Files be Modified Pin
Chris Losinger12-Jun-02 5:41
professionalChris Losinger12-Jun-02 5:41 
GeneralRe: Can Library Files be Modified Pin
Steve Thresher12-Jun-02 6:15
Steve Thresher12-Jun-02 6:15 
GeneralRe: Can Library Files be Modified Pin
Chris Losinger12-Jun-02 6:24
professionalChris Losinger12-Jun-02 6:24 

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.