GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   Pause a program (https://gfy.com/showthread.php?t=648221)

KewinT 08-25-2006 04:33 AM

Pause a program
 
"I need to call a function every 1 second in my Windows (GUI) program. I have tried the following:


Code:
#include <windows.h>
...
while (true) {
Sleep(1000);
}This works, except it locks up the application between calls so nothing else can occur.

Does C++ (or the Windows API) have a built-in pause or timer function for this purpose? Thanks."

FuqALot 08-25-2006 05:03 AM

You need to execute a process message - you need to add a line in the while loop - telling the program to process all new input, so that it won't hang.

I have no idea how to do it in C++, in Delphi I would add: Application.Processmessages; -- I googled it and maybe you should try to add the following in the while loop: Application->ProcessMessages();

free4porn 08-25-2006 06:39 AM

bump for help

XMaster 08-25-2006 06:41 AM

please DO NOT post biz thread on GFY.

Thank you.


All times are GMT -7. The time now is 01:38 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123