Click here to Skip to main content
16,005,080 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Stack Overflow - Urgent Pin
Matthew Faithfull16-Dec-07 23:08
Matthew Faithfull16-Dec-07 23:08 
QuestionHow to use iLBC codec Pin
programmer8116-Dec-07 22:09
programmer8116-Dec-07 22:09 
Questionmfc dialog application problem Pin
zengkun10016-Dec-07 21:58
zengkun10016-Dec-07 21:58 
GeneralRe: mfc dialog application problem Pin
CPallini16-Dec-07 22:12
mveCPallini16-Dec-07 22:12 
GeneralRe: mfc dialog application problem Pin
pierre_ribery16-Dec-07 22:37
pierre_ribery16-Dec-07 22:37 
GeneralWhy? Pin
CPallini16-Dec-07 22:47
mveCPallini16-Dec-07 22:47 
GeneralRe: Why? Pin
pierre_ribery16-Dec-07 22:58
pierre_ribery16-Dec-07 22:58 
GeneralRe: Why? [modified] Pin
CPallini16-Dec-07 23:04
mveCPallini16-Dec-07 23:04 
pierre_ribery wrote:
THe dialog might be closed before the timer elapses (lets say 200-300ms).


Provided you know such a feature it may be not a problem.


pierre_ribery wrote:
also, you have to remember to kill the timer as the first thing in the WM_TIMER handler.

Of course. one-shot has to be one-shot, after all!



pierre_ribery wrote:
The timer approach is a possibility, but not the BEST


pierre_ribery wrote:
rom MSDN: The WM_TIMER message is a low-priority message. The GetMessage and PeekMessage functions post this message only when no other higher-priority messages are in the thread's message queue.


To both points applies: Provided you've to immediatly execute code.

Smile | :)

pierre_ribery wrote:
Another point is that it uses significantly more system resources to simply post a message. Why create a timer which will post a message, when you can directly post the message? Timers are limited system resources.


Oh, there are two possibilities here:
(1) You already have such a timer (for different purposes) and you're just using its first call (in such a case, no performance loss).
(2) You haven't such a timer and hence make a one-shot timer that is a low resource waster.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.


modified on Monday, December 17, 2007 5:11:51 AM

GeneralRe: Why? Pin
pierre_ribery16-Dec-07 23:08
pierre_ribery16-Dec-07 23:08 
GeneralRe: Why? Pin
CPallini16-Dec-07 23:17
mveCPallini16-Dec-07 23:17 
GeneralRe: Why? Pin
pierre_ribery16-Dec-07 23:29
pierre_ribery16-Dec-07 23:29 
GeneralRe: Why? Pin
CPallini16-Dec-07 23:34
mveCPallini16-Dec-07 23:34 
GeneralRe: Why? Pin
pierre_ribery16-Dec-07 23:37
pierre_ribery16-Dec-07 23:37 
JokeRe: Why? Pin
CPallini17-Dec-07 0:00
mveCPallini17-Dec-07 0:00 
GeneralRe: mfc dialog application problem Pin
zengkun10016-Dec-07 23:06
zengkun10016-Dec-07 23:06 
GeneralRe: mfc dialog application problem Pin
Nelek16-Dec-07 22:41
protectorNelek16-Dec-07 22:41 
GeneralRe: mfc dialog application problem Pin
zengkun10016-Dec-07 23:14
zengkun10016-Dec-07 23:14 
QuestionCode to detect clicking the minimize icon? Pin
fantasy121516-Dec-07 21:40
fantasy121516-Dec-07 21:40 
GeneralRe: Code to detect clicking the minimize icon? Pin
Naveen16-Dec-07 22:04
Naveen16-Dec-07 22:04 
GeneralMSDN const_cast sample Pin
George_George16-Dec-07 21:34
George_George16-Dec-07 21:34 
GeneralRe: MSDN const_cast sample Pin
CPallini16-Dec-07 22:05
mveCPallini16-Dec-07 22:05 
GeneralRe: MSDN const_cast sample Pin
George_George16-Dec-07 22:28
George_George16-Dec-07 22:28 
GeneralRe: MSDN const_cast sample Pin
CPallini16-Dec-07 22:40
mveCPallini16-Dec-07 22:40 
GeneralRe: MSDN const_cast sample Pin
toxcct16-Dec-07 22:49
toxcct16-Dec-07 22:49 
GeneralRe: MSDN const_cast sample Pin
CPallini16-Dec-07 22:56
mveCPallini16-Dec-07 22:56 

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.