|
Use this API SetTimer, instead of providing a window handle you provided a call back function.
This callback function can be a static function in ur class, But i dont know how you can use it for multiple instances of ur object.
-prakash
|
|
|
|
|
As Mr Prakash points out, you could use:
class CMyObject : public CObject
{
...
void SetMyTimer ()
{
....
SetTimer (NULL, 0, m_dwDelayInMilliseconds, MyTimerCallBack);
....
}
static VOID CALLBACK MyTimerCallBack ( HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime )
{
}
);
but if you read the docs, you'll find none of the parameters can be used to identify *which* CMyObject
needs to be dealt with.
The other option is to use SetWaitableTimer...
class CMyObject : public CObject
{
CMyObject ()
{
m_hTimer = CreateWaitableTimer (NULL, TRUE, NULL);
}
~CMyObject ()
{
CancelWaitableTimer (m_hTimer);
CloseHandle (m_hTimer);
}
...
void SetMyTimer ()
{
....
SetWaitableTimer (m_hTimer, &lintDelay, 0, &MyTimerCallBack, this, FALSE);
....
}
VOID CALLBACK MyTimerCallBack( LPVOID lpArgToCompletionRoutine, DWORD dwTimerLowValue, DWORD dwTimerHighValue)
{
CMyObject *pThis = (CMyObject *)lpArgToCompletionRoutine;
pThis->MyTimerCallback ();
}
void MyTimerCallBack ()
{
...
}
);
Tada!
Just as well I'm avoiding doing real work, eh?
Iain.
|
|
|
|
|
Nice one.
Thanks.
-prakash
|
|
|
|
|
Hello people,
I was wandering if you could give me some advice which collection to use.
In my MFC application I'm reading a CSV file, but I don't know how many columns a row has got. I would also like to store different datatypes in my collection.
In C# I realised this with a 2 dimensional Arraylist, but I don't think there is an MFC equivalent, is there?
Regards,
Paul
I would like to have a funny signature
|
|
|
|
|
|
You're asking me?
I can try.
|
|
|
|
|
I think it was presented as a confirmation rather than an outright question. Sort of like asking "How about a list of lists?"
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hai ...everybody can any body help me for socket programming using multithread.
shan
|
|
|
|
|
<title>
this is a simple html file. must be specified a file url.so the file must be found at local drive or a remote url.
my question is that if I load an image file into memory,how can I show the html correctly in the browser with the image src loaded from momeory?
Thank you all very much.
Thank you all very much.
Thank you all very much.
Thank you all very much.
|
|
|
|
|
if you are generating the html and giving it to the browser, one suggestion is that you write the image to a file and put it in the src attribute.
What is that ?
-prakash
|
|
|
|
|
Do you have to display the bitmap in a browser? Or are you using an embedded web browser control?
If it's the latter, consider using Eugene Pustovoyt's excellent CPPHtmlStatic[^] control instead and use the <bmp handle=""> tag to display your bitmap.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thank you.
But I mean this is a html file. must be specified a file url.
Actually, the file must be found at local drive or a remote url.
but now,
my question is that if I already have the img file loaded in memory,
how can I show the html correctly in the browser(microsoft webbrowser control) which load the image directly from memory not the file on local drive?
|
|
|
|
|
Anyone plz help me out with how to decrypt a string in vc++ urgently?
|
|
|
|
|
|
hai Alok Sir
actually if i enter into the text box a string like 'a' and press the encrypt button..
the output i get is 113.
so if i enter 113 for decryption i should get back the result as 'a' itself...
if i give something like 'asd' as string for encryption..
i am not getting it back while decrypting.
Neha
|
|
|
|
|
Some things:
1: What encryption algorithm do you use?
2: Are you entering all the values / strings in one edit box?
3: Smells like homework!
4: If you do enter all the values / strings in one edit box, the algorithm will never work unless you restrict to alphabetical characters and no numerical characters.
I also got the blogging virus..[^]
|
|
|
|
|
Hallo Bob
I am using the RSA Algorithm...
i want to encrypt and decrypt the alphabetical characters and numerical characters to and from the database.
Regards,
Neha
|
|
|
|
|
Hello,
As I recall from my Encryption classes at school, you need 2 numbers:
1: Prime number 1 (q)
2: Prime number 2 (p)(different than q)
With these numbers you have to do some magic and voila public key encryption and decryption...
The algorithm can be found here[^]
With this information, you have to implement you own encryption and decryption functions. Hope this helps.
I also got the blogging virus..[^]
|
|
|
|
|
|
hai Alok
I am using the RSA Algorithm...
i want to encrypt and decrypt the alphabetical characters and numerical characters to and from the database.
Regards,
Neha
|
|
|
|
|
|
Hai Alok,
Actually I got an RSA pgm from the internet for encrypting and decrypting into a file.But what actually i need is to encrypt and decrypt to and from the Access database.
Regards,
Neha
|
|
|
|
|
Simple Logic:-
Retriving Text
Get data from Access--> Apply Decryption --> show Text
Saving Text
Text->Apply encryption ->save data.
Now tell me at which point you facing problem!!!! and what
[Vote One Here, Complete my Survey....]
Alok Gupta visit me at http://www.thisisalok.tk
"I Think Believe this Will Help"
|
|
|
|
|
Alok,
I am not getting the decrypted part.
|
|
|
|
|