|
You last visited: Today at 03:27
Advertisement
Waiting function
Discussion on Waiting function within the C/C++ forum part of the Coders Den category.
07/04/2012, 16:36
|
#16
|
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
|
Quote:
Originally Posted by Neeya Nanaa
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)) )
|
|
|
07/04/2012, 17:27
|
#17
|
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
|
Quote:
Originally Posted by Krasti
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.
|
|
|
07/04/2012, 17:41
|
#18
|
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
|
Quote:
Originally Posted by Neeya Nanaa
Code:
if(IsDlgButtonChecked(DlgHwnd,IDC_BUTTON01) == BST_CHECKED)
{
//do ur stuff here
}
^
it should work with this.
|
Exactly
that i'm doing
|
|
|
07/04/2012, 18:14
|
#19
|
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
|
Quote:
Originally Posted by Krasti
Exactly
that i'm doing
|
Well then i think your Dialoghwnd is wrong.
Could you post a snippet of ur source?
|
|
|
07/04/2012, 18:29
|
#20
|
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
|
Quote:
Originally Posted by Neeya Nanaa
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?
|
|
|
07/04/2012, 21:20
|
#21
|
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
|
Quote:
Originally Posted by Krasti
You mean the Events?(funcs etc)
or the the thread?
|
post a snippet of the Events.
|
|
|
07/04/2012, 21:34
|
#22
|
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
|
|
|
07/04/2012, 21:43
|
#23
|
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
|
Quote:
Originally Posted by Krasti
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;
^
|
|
|
07/04/2012, 22:09
|
#24
|
elite*gold: 4
Join Date: Aug 2011
Posts: 2,169
Received Thanks: 7,917
|
Quote:
Originally Posted by Neeya Nanaa
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
|
|
|
07/05/2012, 13:26
|
#25
|
elite*gold: 93616
Join Date: Apr 2010
Posts: 13,737
Received Thanks: 14,990
|
Quote:
Originally Posted by Krasti
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;
}
|
|
|
07/05/2012, 14:34
|
#26
|
elite*gold: 5
Join Date: Sep 2006
Posts: 385
Received Thanks: 218
|
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
|
|
|
|
|
|
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.
|
|