|
Hi,
I used KillTimer(ELAPSED_TIMER);
i got
error C2660: 'KillTimer' : function does not take 1 parameters
Error executing cl.exe.
then i used KillTimer(NULL,ELAPSED_TIMER);
then no error but timer is not stoping please give me some solution.
|
|
|
|
|
from within the thread:
status->KillTimer(ELAPSED_TIMER);
or
KillTimer(status->m_hWnd, ELAPSED_TIMER);
Michel Wassink
We must make user friendly software. Where are friendly users?
|
|
|
|
|
Hi Michel Wassink,
KillTimer(status->m_hWnd, ELAPSED_TIMER);
is working thank you very much..................
|
|
|
|
|
Hi Michel Wassink,
i tryed using
KillTimer(ELAPSED_TIMER);
error C2660: 'KillTimer' : function does not take 1 parameters
Error executing cl.exe.
can u please tell how to stop ....
|
|
|
|
|
vinaycool wrote: status->SetTimer(NULL,ELAPSED_TIMER, 1000, NULL);
do this :-
status->SetTimer(ELAPSED_TIMER, 1000, NULL);
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
This is working fine for me
SetTimer(status->m_hWnd,ELAPSED_TIMER, 1000, NULL);
i want to know how to stop the timer ....
|
|
|
|
|
vinaycool wrote: This is working fine for meSetTimer(status->m_hWnd,ELAPSED_TIMER, 1000, NULL);i want to know how to stop the timer ....
Ok, KillTimer(..) will stop the timer
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
hi,
I tryed using
KillTimer(ELAPSED_TIMER);
but i am getting error
error C2660: 'KillTimer' : function does not take 1 parameters
Error executing cl.exe.
|
|
|
|
|
Since you're using the raw API call, you have to provide it with the window handle the same way you called ::SetTimer().
It's supposed to be hard, otherwise anybody could do it!
Regarding CodeProject: "resistance is pointless; you will be assimilated"
|
|
|
|
|
Hi,
Thanks for the information it will be usefull for me.
|
|
|
|
|
vinaycool wrote: KillTimer(ELAPSED_TIMER);but i am getting error
what about KillTImer(status->m_hWnd,ELAPSED_TIMER)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
vinaycool wrote: hr = CreateThread(NULL,0,(unsigned long (__stdcall *)(void *))WorkerThreadProc,this,0,0);
Since this is an MFC application, why are you not using AfxBeginThread() here.
"The largest fire starts but with the smallest spark." - David Crow
|
|
|
|
|
HI all
I have a main application in VC++ and have a dll called AdminXA.dll (which is not part of the main project but .sln is available)
The main application calls functions from this AdminXA.dll . How can I debug the functions available in AdminXA.dll from the main app?
Note : AdminXA.dll is COM based and i can see AdminXA.tlh , .tli in Main Application's debug folder . And am able to debug till .tli file
Please help me
redindian
-- modified at 6:27 Thursday 18th May, 2006
|
|
|
|
|
This code works perfect without exceptions when calling it from the main appthread, but when called on a working thread (AfxBeginThread) httpOpenRequest gives a valid handle and the function works but a bunch of exception occures during the call and afterwards GetLastError returns ERROR_INSUFFICIENT_BUFFER.
I know I shouldn't be worried if I get a valid handle but anyway....
Any ideas?
code:
CONST TCHAR *szAcceptType = TEXT(HTTP_ACCEPT_TYPE);
HINTERNET hHTTPRequest = NULL;
CHECK_BOOL(NULL != (hHTTPRequest=::httpOpenRequest(hSession, // HTTP session handle
HTTP_VERB_HEAD, // HTTP Verb szURI, // Object Name
HTTP_VERSION, // Version
NULL, // Reference
&szAcceptType, // Accept Type
INTERNET_FLAG_NO_CACHE_WRITE | INTERNET_FLAG_KEEP_CONNECTION,
NULL))); // context call-back point
CHECK_BOOL(hHTTPRequest != INVALID_HANDLE_VALUE);
// REPLACE HEADER
CHECK_BOOL(::HttpAddRequestHeaders( hHTTPRequest, HTTP_ACCEPT, _tcslen(HTTP_ACCEPT), HTTP_ADDREQ_FLAG_REPLACE));
// SEND REQUEST
CHECK_BOOL(::HttpSendRequest( hHTTPRequest, // handle by returned HttpOpenRequest
NULL, // additional HTTP header
0, // additional HTTP header length
NULL, // additional data in HTTP Post or HTTP Put 0)); // additional data length
return hHTTPRequest;
CLEANUP:
m_dwError=::GetLastError();
#ifdef _DEBUG
LPVOID lpMsgBuffer;
DWORD dwRet=FormatMessage( FORMAT_MESSAGE_FROM_HMODULE | FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_IGNORE_INSERTS,
GetModuleHandle("wininet.dll"),
m_dwError,
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
reinterpret_cast<lptstr>(&lpMsgBuffer),
0,
NULL);
// Display the string.
MessageBox( NULL, (LPCTSTR)lpMsgBuffer, "Error", MB_OK | MB_ICONINFORMATION );
LocalFree(lpMsgBuffer);
#endif
if (hHTTPRequest)
InternetCloseHandle(hHTTPRequest);
hHTTPRequest = NULL;
return hHTTPRequest;
|
|
|
|
|
I have interview at Tata Consultance services on VB/C++/VC++ tomorrow.Any body has link where I can find good tricky question and answers about this subject
|
|
|
|
|
NiLeSh KoRpE wrote: I have interview at Tata Consultance services on VB/C++/VC++ tomorrow.Any body has link where I can find good tricky question and answers about this subject
try this http://groups.yahoo.com/group/crscem_coolz[^] group files section, atleast then you stop posting interview question here
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
arre Bhai aap to bura maan gaye,lekin iske kabhi kabhi jarurat padti hain.....
|
|
|
|
|
NiLeSh KoRpE wrote: arre Bhai aap to bura maan gaye,lekin iske kabhi kabhi jarurat padti hain...
thick hai bhai, bura nahin manata , tention mat le... araram se hoin jayege tere TCS main, they have hell lot of requirement! BEST of LUCK... aur ish forum paar hindi dekh kar ache laga ...
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
|
ThatsAlok wrote: thick hai bhai, bura nahin manata , tention mat le
Is this for real ? I mean do you understand this ? Seems like Klingon to me...
~RaGE();
|
|
|
|
|
Rage wrote: ThatsAlok wrote:
thick hai bhai, bura nahin manata , tention mat le
Is this for real ? I mean do you understand this ? Seems like Klingon to me...
Hey rage, let me do it for you...
"It's ok bro, I won't mind, don't get angry."
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Nibu thomas wrote: don't get angry."
I havn't said that in hindi
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
ThatsAlok wrote: I havn't said that in hindi
ok then it's "don't take tension..." Right?
Nibu thomas
Software Developer
Faqs by Michael dunn
|
|
|
|
|
Nibu thomas wrote: ok then it's "don't take tension..." Right?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Rage wrote: Seems like Klingon to me...
.. thats Hindi, My Mother Tounge
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|