Click here to Skip to main content
15,919,245 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MDI Question... Pin
RobJones4-Feb-04 3:17
RobJones4-Feb-04 3:17 
GeneralGetPrivateProfileString() Pin
Goh Hui Beng3-Feb-04 6:24
Goh Hui Beng3-Feb-04 6:24 
GeneralRe: GetPrivateProfileString() Pin
Rickard Andersson203-Feb-04 6:50
Rickard Andersson203-Feb-04 6:50 
GeneralRe: GetPrivateProfileString() Pin
Goh Hui Beng3-Feb-04 7:07
Goh Hui Beng3-Feb-04 7:07 
GeneralRe: GetPrivateProfileString() Pin
Rickard Andersson203-Feb-04 7:10
Rickard Andersson203-Feb-04 7:10 
GeneralRe: GetPrivateProfileString() Pin
Goh Hui Beng3-Feb-04 7:21
Goh Hui Beng3-Feb-04 7:21 
GeneralRe: GetPrivateProfileString() Pin
RobJones3-Feb-04 7:25
RobJones3-Feb-04 7:25 
GeneralRe: GetPrivateProfileString() Pin
Rickard Andersson203-Feb-04 7:39
Rickard Andersson203-Feb-04 7:39 
GeneralRe: GetPrivateProfileString() Pin
Goh Hui Beng3-Feb-04 7:48
Goh Hui Beng3-Feb-04 7:48 
GeneralRe: GetPrivateProfileString() Pin
Rickard Andersson203-Feb-04 8:32
Rickard Andersson203-Feb-04 8:32 
GeneralLinker error in VC 7 Pin
PrashantJ3-Feb-04 6:24
PrashantJ3-Feb-04 6:24 
GeneralQuestion about movewindow Pin
doctorpi3-Feb-04 5:13
doctorpi3-Feb-04 5:13 
GeneralRe: Question about movewindow Pin
Joe Woodbury3-Feb-04 8:06
professionalJoe Woodbury3-Feb-04 8:06 
GeneralHowTo write multiple lines to edit box Pin
Caoimh3-Feb-04 5:10
Caoimh3-Feb-04 5:10 
GeneralRe: HowTo write multiple lines to edit box Pin
RobJones3-Feb-04 6:22
RobJones3-Feb-04 6:22 
GeneralRe: HowTo write multiple lines to edit box Pin
Caoimh3-Feb-04 6:40
Caoimh3-Feb-04 6:40 
GeneralRe: HowTo write multiple lines to edit box Pin
RobJones3-Feb-04 6:47
RobJones3-Feb-04 6:47 
QuestionHow to trigger an event at a specified time Pin
Salvador Dali3-Feb-04 5:03
Salvador Dali3-Feb-04 5:03 
AnswerRe: How to trigger an event at a specified time Pin
calhuskerfan3-Feb-04 6:10
calhuskerfan3-Feb-04 6:10 
Take a look at CreateWaitableTimer and SetWaitableTimer. Below is the example from MSDN. Create a Thread to monitor for your event and then use SetWaitableTimer. When the the timer is signalled you can do what you need. SetWaitableTimer can either be set for an absolute time or a relative time(as in the example). If you use absolute time pay attention to your time local time offset.

#include <windows.h>
#include <stdio.h>

int main()
{
HANDLE hTimer = NULL;
LARGE_INTEGER liDueTime;

liDueTime.QuadPart=-100000000;

// Create a waitable timer.
hTimer = CreateWaitableTimer(NULL, TRUE, "WaitableTimer");
if (!hTimer)
{
printf("CreateWaitableTimer failed (%d)\n", GetLastError());
return 1;
}

printf("Waiting for 10 seconds...\n");

// Set a timer to wait for 10 seconds.
if (!SetWaitableTimer(
hTimer, &liDueTime, 0, NULL, NULL, 0))
{
printf("SetWaitableTimer failed (%d)\n", GetLastError());
return 2;
}

// Wait for the timer.

if (WaitForSingleObject(hTimer, INFINITE) != WAIT_OBJECT_0)
printf("WaitForSingleObject failed (%d)\n", GetLastError());
else printf("Timer was signaled.\n");

return 0;
}




GeneralRe: How to trigger an event at a specified time Pin
Salvador Dali4-Feb-04 0:33
Salvador Dali4-Feb-04 0:33 
GeneralRe: How to trigger an event at a specified time Pin
calhuskerfan4-Feb-04 9:46
calhuskerfan4-Feb-04 9:46 
GeneralSerialize C++ class Pin
Anonymous3-Feb-04 4:50
Anonymous3-Feb-04 4:50 
GeneralRe: Serialize C++ class Pin
Selvam R3-Feb-04 6:59
professionalSelvam R3-Feb-04 6:59 
GeneralRe: Serialize C++ class Pin
John M. Drescher3-Feb-04 7:58
John M. Drescher3-Feb-04 7:58 
GeneralExporting diagrams to DXF Pin
Anonymous3-Feb-04 4:12
Anonymous3-Feb-04 4:12 

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.