Click here to Skip to main content
15,915,600 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralOutLook Bar Control Pin
14-Sep-01 8:19
suss14-Sep-01 8:19 
GeneralRe: OutLook Bar Control Pin
Matt Philmon14-Sep-01 8:22
Matt Philmon14-Sep-01 8:22 
GeneralRe: OutLook Bar Control Pin
Chris Maunder14-Sep-01 14:35
cofounderChris Maunder14-Sep-01 14:35 
GeneralRe: OutLook Bar Control Pin
15-Sep-01 18:15
suss15-Sep-01 18:15 
GeneralMAKE CODE SLOWER Pin
14-Sep-01 8:17
suss14-Sep-01 8:17 
GeneralRe: MAKE CODE SLOWER Pin
14-Sep-01 8:21
suss14-Sep-01 8:21 
GeneralRe: MAKE CODE SLOWER Pin
Carlos Antollini14-Sep-01 8:49
Carlos Antollini14-Sep-01 8:49 
GeneralRe: MAKE CODE SLOWER Pin
14-Sep-01 8:56
suss14-Sep-01 8:56 
Sleep(ms to sleep for) or: Suspicious | :suss:

void SleepAndPump(DWORD dwMSecs)
{
MSG Msg;
DWORD dwTime = GetTickCount() + dwMSecs;
while (GetTickCount() < dwTime)
{
if(PeekMessage(&Msg, 0,0, PM_REMOVE)) Confused | :confused:
DispatchMessage(&Msg);
Sleep(500);
}

Which works in a GUI to allow move, paints etc messages to still execute, and will also slow things down for you for the number of msecconds. Check on PeekMessage though - this was all out of memory, and I'm not sure if PeekMessage's parameters are correct. Just don't call this function with any sleep time larger than 2 billion msecs, or the GetTickCount clock will wrap around, and you may never get out.


Darin Rousseau
http://www.rinlex.com/fssi/development/
darin@rinlex.com
GeneralRe: MAKE CODE SLOWER Pin
14-Sep-01 9:53
suss14-Sep-01 9:53 
GeneralRe: MAKE CODE SLOWER Pin
Alvaro Mendez18-Sep-01 12:09
Alvaro Mendez18-Sep-01 12:09 
GeneralRe: MAKE CODE SLOWER Pin
Tomasz Sowinski14-Sep-01 9:16
Tomasz Sowinski14-Sep-01 9:16 
GeneralRe: MAKE CODE SLOWER Pin
Carlos Antollini14-Sep-01 9:22
Carlos Antollini14-Sep-01 9:22 
Questionwhat is a good requirement/specification for... Pin
14-Sep-01 7:40
suss14-Sep-01 7:40 
AnswerRe: what is a good requirement/specification for... Pin
Carlos Antollini14-Sep-01 8:53
Carlos Antollini14-Sep-01 8:53 
GeneralRe: what is a good requirement/specification for... Pin
14-Sep-01 10:22
suss14-Sep-01 10:22 
GeneralRe: what is a good requirement/specification for... Pin
Carlos Antollini14-Sep-01 11:00
Carlos Antollini14-Sep-01 11:00 
Generalmailto: question Pin
RobJones14-Sep-01 6:34
RobJones14-Sep-01 6:34 
GeneralRe: mailto: question Pin
J Patel14-Sep-01 6:41
J Patel14-Sep-01 6:41 
GeneralRe: mailto: question Pin
J Patel14-Sep-01 6:45
J Patel14-Sep-01 6:45 
GeneralRe: mailto: question Pin
RobJones14-Sep-01 7:06
RobJones14-Sep-01 7:06 
GeneralRichEdit text always selected when page becomes Active Pin
Bryan Anslow14-Sep-01 6:20
Bryan Anslow14-Sep-01 6:20 
GeneralRe: RichEdit text always selected when page becomes Active Pin
Bryan Anslow14-Sep-01 9:41
Bryan Anslow14-Sep-01 9:41 
QuestionHow can I do create a dll? Pin
14-Sep-01 6:08
suss14-Sep-01 6:08 
AnswerRe: How can I do create a dll? Pin
Nemanja Trifunovic14-Sep-01 6:26
Nemanja Trifunovic14-Sep-01 6:26 
GeneralVisual C Wizards Pin
14-Sep-01 5:58
suss14-Sep-01 5:58 

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.