Click here to Skip to main content
15,920,828 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to make the cursor move to end of a multiline edit box ? Pin
kapardhi26-Nov-08 2:30
kapardhi26-Nov-08 2:30 
GeneralRe: How to make the cursor move to end of a multiline edit box ? Pin
Nibu babu thomas26-Nov-08 3:00
Nibu babu thomas26-Nov-08 3:00 
AnswerRe: How to make the cursor move to end of a multiline edit box ? Pin
fantasy121525-Nov-08 3:21
fantasy121525-Nov-08 3:21 
GeneralRe: How to make the cursor move to end of a multiline edit box ? Pin
kapardhi25-Nov-08 18:05
kapardhi25-Nov-08 18:05 
QuestionHow to::Timing mechanism and synronization in MFC? Pin
atillaselem25-Nov-08 2:12
atillaselem25-Nov-08 2:12 
AnswerRe: How to::Timing mechanism and synronization in MFC? Pin
Randor 25-Nov-08 3:43
professional Randor 25-Nov-08 3:43 
GeneralRe: How to::Timing mechanism and synronization in MFC? Pin
atillaselem25-Nov-08 4:25
atillaselem25-Nov-08 4:25 
GeneralRe: How to::Timing mechanism and synronization in MFC? Pin
Randor 25-Nov-08 6:25
professional Randor 25-Nov-08 6:25 
atillaselem wrote:

It will call my callback every 10ms in where i put all my frame processing like updating entities, states, create new geometries or kill some and draw my scene etc. What happens if my updating and drawing is getting longer than 10 ms?


Use of synchronization objects should be able solve this problem. When your variables are being updated by the socket class you should lock access to them, perhaps with a spinlock.


atillaselem wrote:
using OnIdle time makes sense in that perspective.


WM_IDLE has the lowest possible priority in the message que. You are not guaranteed to recieve this message at all. If your window is designed in such a way... in that the message que never reaches zero then your WindProc will never recieve a WM_IDLE message period. In fact a third party application using Send/PostMessage() could prevent your application from recieving WM_IDLE by continously posting/sending/broadcasting messages. In my opinion WM_IDLE cannot be reliably used for window updating/redrawing.

WM_TIMER is nearly the same in that it is also a low priority message. The only thing you can rely on with WM_TIMER is that your application will eventually get the message. Many other messages are higher priority and can potentially be inserted into the message que and processed ahead of the WM_TIMER. This can result in variable timer speed meaning that your update frequency will vary by a few milliseconds in a high volume messaging window.

Multimedia timers were designed for this very purpose where very accurate intervals were required.

Best Wishes,
-David Delaune
GeneralRe: How to::Timing mechanism and synronization in MFC? Pin
atillaselem25-Nov-08 7:12
atillaselem25-Nov-08 7:12 
GeneralRe: How to::Timing mechanism and synronization in MFC? Pin
Randor 25-Nov-08 8:17
professional Randor 25-Nov-08 8:17 
GeneralRe: How to::Timing mechanism and synronization in MFC? Pin
atillaselem25-Nov-08 20:51
atillaselem25-Nov-08 20:51 
QuestionTrying to create a log file using Notepad Pin
AnithaSubramani25-Nov-08 2:07
AnithaSubramani25-Nov-08 2:07 
AnswerRe: Trying to create a log file using Notepad Pin
Cedric Moonen25-Nov-08 2:26
Cedric Moonen25-Nov-08 2:26 
AnswerRe: Trying to create a log file using Notepad Pin
Nibu babu thomas25-Nov-08 2:55
Nibu babu thomas25-Nov-08 2:55 
QuestionCreate two files with the same name but different extention Pin
Member 198099925-Nov-08 2:05
Member 198099925-Nov-08 2:05 
AnswerRe: Create two files with the same name but different extention Pin
Nibu babu thomas25-Nov-08 2:24
Nibu babu thomas25-Nov-08 2:24 
GeneralRe: Create two files with the same name but different extention Pin
Member 198099925-Nov-08 2:30
Member 198099925-Nov-08 2:30 
AnswerRe: Create two files with the same name but different extention Pin
Iain Clarke, Warrior Programmer25-Nov-08 2:51
Iain Clarke, Warrior Programmer25-Nov-08 2:51 
AnswerRe: Create two files with the same name but different extention Pin
David Crow25-Nov-08 14:21
David Crow25-Nov-08 14:21 
GeneralRe: Create two files with the same name but different extention Pin
Member 198099926-Nov-08 0:30
Member 198099926-Nov-08 0:30 
Questionmultiple modaless dialogs Pin
josip cagalj25-Nov-08 1:56
josip cagalj25-Nov-08 1:56 
AnswerRe: multiple modaless dialogs Pin
Nibu babu thomas25-Nov-08 2:21
Nibu babu thomas25-Nov-08 2:21 
GeneralRe: multiple modaless dialogs Pin
josip cagalj25-Nov-08 2:56
josip cagalj25-Nov-08 2:56 
GeneralRe: multiple modaless dialogs Pin
Rick York25-Nov-08 10:19
mveRick York25-Nov-08 10:19 
GeneralVC6 on Vista 64-Bit Pin
hairy_hats25-Nov-08 1:24
hairy_hats25-Nov-08 1: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.