Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar Mark Forums Read
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-25-2006, 04:33 AM   #1
KewinT
Registered User
 
Join Date: Aug 2006
Posts: 3
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."
__________________
Content hosting - Fixed rate loans
KewinT is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-25-2006, 05:03 AM   #2
FuqALot
Confirmed User
 
Join Date: Dec 2001
Location: Malibu
Posts: 3,817
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();
FuqALot is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-25-2006, 06:39 AM   #3
free4porn
Confirmed User
 
Join Date: Jun 2005
Posts: 4,654
bump for help
__________________
Switch To Fling Now! I'm on 1:201 paid signups sending little traffic! Make $$$
Free Porn
free4porn is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-25-2006, 06:41 AM   #4
XMaster
Poker Player
 
XMaster's Avatar
 
Industry Role:
Join Date: Jul 2003
Posts: 2,945
please DO NOT post biz thread on GFY.

Thank you.
__________________
iStripper 50% revshare since 1998

You missed out on Bitcoin! Don't miss DOLZ.
XMaster is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks
Thread Tools



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.