Click here to Skip to main content
15,899,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
AnswerRe: How to set keyboard focus to the other windows in the z-order? Pin
Richard MacCutchan18-Nov-10 3:24
mveRichard MacCutchan18-Nov-10 3:24 
QuestionLook of GUI Layout depending on Unicode or not. Pin
Arv Carsen17-Nov-10 21:42
Arv Carsen17-Nov-10 21:42 
AnswerRe: Look of GUI Layout depending on Unicode or not. Pin
KingsGambit17-Nov-10 23:19
KingsGambit17-Nov-10 23:19 
AnswerRe: Look of GUI Layout depending on Unicode or not. Pin
krmed18-Nov-10 0:42
krmed18-Nov-10 0:42 
GeneralRe: Look of GUI Layout depending on Unicode or not. Pin
Arv Carsen15-Dec-10 1:13
Arv Carsen15-Dec-10 1:13 
GeneralRe: Look of GUI Layout depending on Unicode or not. Pin
«_Superman_»18-Nov-10 9:09
professional«_Superman_»18-Nov-10 9:09 
Questionwhere can download the emule source code with the reliant library? Pin
yu-jian17-Nov-10 20:26
yu-jian17-Nov-10 20:26 

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.