Click here to Skip to main content
15,502,020 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionToolBar ToolTip is blocked by whom? Pin
rajan.msmy2-Jan-06 4:36
rajan.msmy2-Jan-06 4:36 
AnswerRe: ToolBar ToolTip is blocked by whom? Pin
Owner drawn2-Jan-06 17:45
Owner drawn2-Jan-06 17:45 
GeneralRe: ToolBar ToolTip is blocked by whom? Pin
rajan.msmy2-Jan-06 18:59
rajan.msmy2-Jan-06 18:59 
GeneralRe: ToolBar ToolTip is blocked by whom? Pin
Owner drawn2-Jan-06 19:08
Owner drawn2-Jan-06 19:08 
QuestionHow to delay about 1/20 milisecond ? Pin
quangpk2-Jan-06 2:43
quangpk2-Jan-06 2:43 
AnswerRe: How to delay about 1/20 milisecond ? Pin
kakan2-Jan-06 4:18
professionalkakan2-Jan-06 4:18 
AnswerRe: How to delay about 1/20 milisecond ? Pin
babuprasath2-Jan-06 5:01
babuprasath2-Jan-06 5:01 
AnswerRe: How to delay about 1/20 milisecond ? Pin
nde_plume2-Jan-06 7:02
nde_plume2-Jan-06 7:02 
You probably can't reliably without going to extrodinary means. This is because Windows is not a Real time operating system, and at any stage your process could be preempted. However, the closest you can get is by calling

::Sleep(20)

In reality this will sleep more than twenty milliseconds quite often, because it relinquishes your timeslice in the process scheduler, but it is the best you can do without doing something really hard.

Despite what my mis-spelling co-poster tells you, going to assembly language will not offer you any benefit over the above, because it is no less subject to pre-emption than anything else. He/she might argue that you do not relinquish your timeslice as above, however the same can be accomplished in C++ too.

For example:

class Timer
{
public:
Timer();
void wait(DWORD ms);
private:
static int cyclesPerMs; // Number of loop iterations per millisecond
};

int Timer::cyclesPerMs = -1;

Timer::Timer()
{
const CALIBRATION_TICKS = 100000;
if(cyclesPerMs == -1)
{
// Calibrate timer
clock_t start = clock();
for(int i=0; i
AnswerRe: How to delay about 1/20 milisecond ? Pin
Alexander M.,3-Jan-06 8:43
Alexander M.,3-Jan-06 8:43 
QuestionHow to change parents Text prperty label from child dialog box Pin
RamL2-Jan-06 1:54
RamL2-Jan-06 1:54 
AnswerRe: How to change parents Text prperty label from child dialog box Pin
Owner drawn2-Jan-06 1:57
Owner drawn2-Jan-06 1:57 
GeneralRe: How to change parents Text prperty label from child dialog box Pin
RamL2-Jan-06 2:04
RamL2-Jan-06 2:04 
GeneralRe: How to change parents Text prperty label from child dialog box Pin
Owner drawn2-Jan-06 2:07
Owner drawn2-Jan-06 2:07 
GeneralRe: How to change parents Text prperty label from child dialog box Pin
RamL2-Jan-06 2:14
RamL2-Jan-06 2:14 
GeneralRe: How to change parents Text prperty label from child dialog box Pin
Owner drawn2-Jan-06 2:28
Owner drawn2-Jan-06 2:28 
GeneralRe: How to change parents Text prperty label from child dialog box Pin
RamL2-Jan-06 2:44
RamL2-Jan-06 2:44 
AnswerRe: How to change parents Text prperty label from child dialog box Pin
Prakash Nadar2-Jan-06 4:21
Prakash Nadar2-Jan-06 4:21 
GeneralRe: How to change parents Text prperty label from child dialog box Pin
RamL2-Jan-06 20:00
RamL2-Jan-06 20:00 
QuestionHow to read value at address 0000:0408 ? Pin
quangpk2-Jan-06 0:23
quangpk2-Jan-06 0:23 
AnswerRe: How to read value at address 0000:0408 ? Pin
kakan2-Jan-06 4:04
professionalkakan2-Jan-06 4:04 
GeneralRe: How to read value at address 0000:0408 ? Pin
Prakash Nadar2-Jan-06 4:23
Prakash Nadar2-Jan-06 4:23 
GeneralRe: How to read value at address 0000:0408 ? Pin
kakan2-Jan-06 4:28
professionalkakan2-Jan-06 4:28 
QuestionRe: How to read value at address 0000:0408 ? Pin
Prakash Nadar2-Jan-06 4:25
Prakash Nadar2-Jan-06 4:25 
QuestionDifference between CToolbar and CDialogBar Pin
Identity Undisclosed1-Jan-06 23:56
Identity Undisclosed1-Jan-06 23:56 
AnswerRe: Difference between CToolbar and CDialogBar Pin
Owner drawn1-Jan-06 23:59
Owner drawn1-Jan-06 23:59 

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.