Click here to Skip to main content
15,907,687 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: the C/C++/MFC forum of all places Pin
Luc Pattyn19-Nov-10 2:07
sitebuilderLuc Pattyn19-Nov-10 2:07 
AnswerRe: the C/C++/MFC forum of all places [modified] Pin
CPallini19-Nov-10 2:21
mveCPallini19-Nov-10 2:21 
AnswerRe: How to Load Tiff File using LoadImage? Pin
Sarath C18-Nov-10 18:50
Sarath C18-Nov-10 18:50 
QuestionCallback Function for Timers in VC6......?? Pin
AmbiguousName18-Nov-10 8:43
AmbiguousName18-Nov-10 8:43 
AnswerRe: Callback Function for Timers in VC6......?? Pin
David Crow18-Nov-10 8:52
David Crow18-Nov-10 8:52 
AnswerRe: Callback Function for Timers in VC6......?? Pin
Chris Losinger18-Nov-10 8:52
professionalChris Losinger18-Nov-10 8:52 
AnswerRe: Callback Function for Timers in VC6......?? Pin
«_Superman_»18-Nov-10 8:57
professional«_Superman_»18-Nov-10 8:57 
GeneralRe: Callback Function for Timers in VC6......?? Pin
AmbiguousName18-Nov-10 9:03
AmbiguousName18-Nov-10 9:03 
GeneralRe: Callback Function for Timers in VC6......?? Pin
«_Superman_»18-Nov-10 9:11
professional«_Superman_»18-Nov-10 9:11 
AnswerRe: Callback Function for Timers in VC6......?? Pin
CPallini18-Nov-10 9:28
mveCPallini18-Nov-10 9:28 
GeneralRe: Callback Function for Timers in VC6......?? Pin
AmbiguousName18-Nov-10 9:45
AmbiguousName18-Nov-10 9:45 
GeneralRe: Callback Function for Timers in VC6......?? Pin
CPallini18-Nov-10 9:59
mveCPallini18-Nov-10 9:59 
GeneralRe: Callback Function for Timers in VC6......?? Pin
Stephen Hewitt18-Nov-10 17:49
Stephen Hewitt18-Nov-10 17:49 
GeneralRe: Callback Function for Timers in VC6......?? Pin
«_Superman_»18-Nov-10 10:11
professional«_Superman_»18-Nov-10 10:11 
AnswerRe: Callback Function for Timers in VC6......?? Pin
Stephen Hewitt18-Nov-10 17:47
Stephen Hewitt18-Nov-10 17:47 
overloaded Name wrote:
SetTimer(ID_CLOCK_TIMER,1000,(CALLBACK)&Timer1);


Firstly, drop the (CALLBACK) cast, it won't help. In fact such "optimistic casting" (ignoring what something is and just pretending it's what it should be) often just makes things worse by turning compile-time errors into runtime errors. Only use casts when you know exactly what you're doing.

In your case the problem is that the callback can't be a non-static member function.

overloaded Name wrote:
I read somewhere that callback function works better than the WM_TIMER in vc6


I can't see why. In your case the exact opposite is true as not using a callback means MFC does all the non-member-function to member-function thunking for you.
 
Steve

QuestionMAPISendMail fails with error 2 on Microsoft Outlook 2003 with Win XP Pin
Rajesh_Parameswaran18-Nov-10 3:54
Rajesh_Parameswaran18-Nov-10 3:54 
QuestionRe: MAPISendMail fails with error 2 on Microsoft Outlook 2003 with Win XP Pin
David Crow18-Nov-10 5:31
David Crow18-Nov-10 5:31 
QuestionGet Port Banner? Pin
ALLERSLIT18-Nov-10 3:17
ALLERSLIT18-Nov-10 3:17 
AnswerRe: Get Port Banner? Pin
Richard MacCutchan18-Nov-10 3:21
mveRichard MacCutchan18-Nov-10 3:21 
GeneralRe: Get Port Banner? Pin
ALLERSLIT18-Nov-10 3:22
ALLERSLIT18-Nov-10 3:22 
GeneralRe: Get Port Banner? Pin
Richard MacCutchan18-Nov-10 3:33
mveRichard MacCutchan18-Nov-10 3:33 
GeneralRe: Get Port Banner? Pin
ALLERSLIT18-Nov-10 3:53
ALLERSLIT18-Nov-10 3:53 
GeneralRe: Get Port Banner? Pin
Richard MacCutchan18-Nov-10 5:00
mveRichard MacCutchan18-Nov-10 5:00 
GeneralRe: Get Port Banner? Pin
Moak18-Nov-10 7:11
Moak18-Nov-10 7:11 
QuestionHow to set keyboard focus to the other windows in the z-order? Pin
Joseph Marzbani18-Nov-10 3:14
Joseph Marzbani18-Nov-10 3:14 

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.