Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 03:27

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Waiting function

Discussion on Waiting function within the C/C++ forum part of the Coders Den category.

Reply
 
Old 07/04/2012, 16:36   #16
 
Krasti's Avatar
 
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
Quote:
Originally Posted by Neeya Nanaa View Post
Did your programm freez or what ?
It shouldn't freeze if you do ur stuff in a thread.
No,the program isn't freeze,but the function which check if a button is on,isn't work ( if(IsDlgButtonChecked(blabla)) )
Krasti is offline  
Old 07/04/2012, 17:27   #17




 
Omdi's Avatar
 
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
Quote:
Originally Posted by Krasti View Post
No,the program isn't freeze,but the function which check if a button is on,isn't work ( if(IsDlgButtonChecked(blabla)) )
Code:
if(IsDlgButtonChecked(DlgHwnd,IDC_BUTTON01) == BST_CHECKED)
{
//do ur stuff here
}
^
it should work with this.
Omdi is offline  
Old 07/04/2012, 17:41   #18
 
Krasti's Avatar
 
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
Quote:
Originally Posted by Neeya Nanaa View Post
Code:
if(IsDlgButtonChecked(DlgHwnd,IDC_BUTTON01) == BST_CHECKED)
{
//do ur stuff here
}
^
it should work with this.
Exactly
that i'm doing
Krasti is offline  
Old 07/04/2012, 18:14   #19




 
Omdi's Avatar
 
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
Quote:
Originally Posted by Krasti View Post
Exactly
that i'm doing
Well then i think your Dialoghwnd is wrong.

Could you post a snippet of ur source?
Omdi is offline  
Old 07/04/2012, 18:29   #20
 
Krasti's Avatar
 
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
Quote:
Originally Posted by Neeya Nanaa View Post
Well then i think your Dialoghwnd is wrong.

Could you post a snippet of ur source?
You mean the Events?(funcs etc)
or the the thread?
Krasti is offline  
Old 07/04/2012, 21:20   #21




 
Omdi's Avatar
 
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
Quote:
Originally Posted by Krasti View Post
You mean the Events?(funcs etc)
or the the thread?
post a snippet of the Events.
Omdi is offline  
Old 07/04/2012, 21:34   #22
 
Krasti's Avatar
 
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
Just a snippet

Code:
      case WM_INITDIALOG:
         return true;
      case WM_COMMAND:
      {
		 case IDC_BUTTON1:
			 CreateThread(0,0,(LPTHREAD_START_ROUTINE)Thread,0,0,0);
			break;
			}

         return true;
I did Thread as void,cause i get same result with the script you post
Krasti is offline  
Old 07/04/2012, 21:43   #23




 
Omdi's Avatar
 
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
Quote:
Originally Posted by Krasti View Post
Just a snippet

Code:
      case WM_INITDIALOG:
         return true;
      case WM_COMMAND:
      {
		 case IDC_BUTTON1:
			 CreateThread(0,0,(LPTHREAD_START_ROUTINE)Thread,0,0,0);
			break;
      }

         return true;
I did Thread as void,cause i get same result with the script you post
Code:
      case WM_INITDIALOG:
         return true;
      case WM_COMMAND:
      {
		 case IDC_BUTTON1:
if(isDlgButtonChecked(hwndDlg, IDC_BUTTON1) == BST_CHECKED)
			 CreateThread(0,0,(LPTHREAD_START_ROUTINE)Thread,0,0,0);
			break;
			}

         return true;
^
Omdi is offline  
Old 07/04/2012, 22:09   #24
 
Krasti's Avatar
 
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
Quote:
Originally Posted by Neeya Nanaa View Post
Code:
      case WM_INITDIALOG:
         return true;
      case WM_COMMAND:
      {
		 case IDC_BUTTON1:
if(isDlgButtonChecked(hwndDlg, IDC_BUTTON1) == BST_CHECKED)
			 CreateThread(0,0,(LPTHREAD_START_ROUTINE)Thread,0,0,0);
			break;
			}

         return true;
^
Well,the point is that after it check if S4 is on,the checkbox func isn't get work :/

Code:
void Thread()
{
        Sleep(100);
	while(isRunning("S4Client.exe")==false){}
	MessageBoxA(Dlg,"Test","Test1",MB_OK);
	if(IsDlgButtonChecked(Dlg,IDC_CHECK1))
	{
		MessageBoxA(Dlg,"Test","Test2",MB_OK);
	}
}
The first one works,but when i click CHECK1 no msg :/
I've use it for a Dll also,and it pretty worked,but it was in the loop
Krasti is offline  
Old 07/05/2012, 13:26   #25




 
Omdi's Avatar
 
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
Quote:
Originally Posted by Krasti View Post
Well,the point is that after it check if S4 is on,the checkbox func isn't get work :/

Code:
void Thread()
{
        Sleep(100);
    while(isRunning("S4Client.exe")==false){}
    MessageBoxA(Dlg,"Test","Test1",MB_OK);
    if(IsDlgButtonChecked(Dlg,IDC_CHECK1))
    {
        MessageBoxA(Dlg,"Test","Test2",MB_OK);
    }
}
The first one works,but when i click CHECK1 no msg :/
I've use it for a Dll also,and it pretty worked,but it was in the loop
Code:
DWORD WINAPI Thread(LPVOID lpParam)
{
        Sleep(100);
    while(isRunning("S4Client.exe")==false){}
    MessageBoxA(Dlg,"Test","Test1",MB_OK);
    if(IsDlgButtonChecked(Dlg,IDC_CHECK1) == BST_CHECKED)
    {
        MessageBoxA(Dlg,"Test","Test2",MB_OK);
    }

return TRUE;
}
Omdi is offline  
Old 07/05/2012, 14:34   #26
 
elite*gold: 5
Join Date: Sep 2006
Posts: 385
Received Thanks: 218
Code:
void Thread()
Quote:
Originally Posted by msdn
Do not declare this callback function with a void return type and cast the function pointer to LPTHREAD_START_ROUTINE when creating the thread

Nightblizard is offline  
Thanks
1 User
Reply


Similar Threads Similar Threads
[VIP-function] ToxicSYS [VIP-function]
08/14/2010 - WarRock Hacks, Bots, Cheats & Exploits - 1 Replies
heeeey E-pvpers :pimp: this is a new hack by TSYS Status : UNDETECTED Functions (VIDEO) : YouTube - WarRock - Bikini event VIP hack
[FRIENDLY WAITING ROOM]Cheat Engine waiting updates here..
07/06/2009 - Grand Chase - 49 Replies
Since,many of us are really craving for teh updated MLE or other Engine. I would like to create this thread to fix and clean this GC Area section..As we could see..Many threads are being revived and some are fake threads.. At this thread..We all are working as one.I promise..If i got and hunt the new engine i'll be updating this thread soon..This thread will be permanent in case of losing Engine again. TAKE NOTE: We are all taking this engines for granted. We are enjoying games because of...
We are all waiting!!!
10/18/2007 - WarRock - 3 Replies
Hi all!!! We are all waiting for the new GST tool hack!!! i think was one of the best, or the best, public hack i used!!! no bugs at all!! please update it!!!! thanks all!!!
im waiting for the ban
04/28/2006 - Conquer Online 2 - 1 Replies
when will you ban my acc?



All times are GMT +2. The time now is 03:27.


Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2024 elitepvpers All Rights Reserved.