Click here to Skip to main content
15,902,935 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionConversion from int to char Pin
Kuroro Rucilful18-Jul-06 15:57
Kuroro Rucilful18-Jul-06 15:57 
AnswerRe: Conversion from int to char Pin
charlieg18-Jul-06 16:09
charlieg18-Jul-06 16:09 
GeneralRe: Conversion from int to char Pin
Kuroro Rucilful18-Jul-06 16:15
Kuroro Rucilful18-Jul-06 16:15 
GeneralRe: Conversion from int to char Pin
ThatsAlok18-Jul-06 18:37
ThatsAlok18-Jul-06 18:37 
AnswerRe: Conversion from int to char Pin
toxcct18-Jul-06 21:22
toxcct18-Jul-06 21:22 
AnswerRe: Conversion from int to char Pin
Hamid_RT18-Jul-06 21:24
Hamid_RT18-Jul-06 21:24 
Questionthe parameter of CreateThread problem Pin
missiles18-Jul-06 15:23
missiles18-Jul-06 15:23 
AnswerRe: the parameter of CreateThread problem Pin
Stephen Hewitt18-Jul-06 15:36
Stephen Hewitt18-Jul-06 15:36 
The CreateThread takes a pointer to a global (non-member or static member) function, not a pointer to a member function.

You'll have to do something like this:

class CVfw_receiver_July_18Dlg : ...
{
// ...
    void OnButtonStare()
    {
       DWORD dwThreadId;
       HANDLE h = CreateThread(
                         NULL,
                         0,
                         &CVfw_receiver_July_18Dlg::RawThreadProc,
                         this,
                         0,
                         &dwThreadId
                         );
       if (h)
       {
          CloseHandle(h); // If you don't need it close it or you'll leak HANDLEs.
       }
    }
 
    DWORD ThreadProc()
    {
       // Do stuff here.
    }
 
    static DWORD WINAPI RawThreadProc(LPVOID lpParameter)
    {
       CVfw_receiver_July_18Dlg *pThis = static_cast<CVfw_receiver_July_18Dlg *>(lpParameter);
       return pThis->ThreadProc();
    }
// ...
};


Steve

PS: Unless you know what you're doing you shoudn't use CreateThread. Use beginthread or beginthreadex instead.
GeneralRe: the parameter of CreateThread problem Pin
led mike18-Jul-06 17:24
led mike18-Jul-06 17:24 
GeneralRe: the parameter of CreateThread problem Pin
Stephen Hewitt18-Jul-06 17:54
Stephen Hewitt18-Jul-06 17:54 
GeneralRe: the parameter of CreateThread problem Pin
led mike18-Jul-06 18:08
led mike18-Jul-06 18:08 
GeneralRe: the parameter of CreateThread problem Pin
missiles20-Jul-06 16:04
missiles20-Jul-06 16:04 
QuestionDoes any one know something about usbzip boot? Pin
momer18-Jul-06 14:56
momer18-Jul-06 14:56 
QuestionProblem using RegEx (boost) Pin
Mark F.18-Jul-06 14:25
Mark F.18-Jul-06 14:25 
AnswerRe: Problem using RegEx (boost) Pin
Stephen Hewitt18-Jul-06 14:31
Stephen Hewitt18-Jul-06 14:31 
GeneralRe: Problem using RegEx (boost) Pin
Mark F.18-Jul-06 16:21
Mark F.18-Jul-06 16:21 
GeneralRe: Problem using RegEx (boost) Pin
Stephen Hewitt18-Jul-06 16:39
Stephen Hewitt18-Jul-06 16:39 
GeneralRe: Problem using RegEx (boost) Pin
led mike18-Jul-06 17:49
led mike18-Jul-06 17:49 
Questionerror LNK2019 Pin
LCI18-Jul-06 11:08
LCI18-Jul-06 11:08 
AnswerRe: error LNK2019 Pin
NrmMyth18-Jul-06 11:17
NrmMyth18-Jul-06 11:17 
GeneralRe: error LNK2019 Pin
LCI18-Jul-06 11:25
LCI18-Jul-06 11:25 
GeneralRe: error LNK2019 Pin
LCI18-Jul-06 12:00
LCI18-Jul-06 12:00 
GeneralRe: error LNK2019 Pin
NrmMyth18-Jul-06 15:01
NrmMyth18-Jul-06 15:01 
Questionoverloading a variable argument list function Pin
psasidisrcum18-Jul-06 10:40
psasidisrcum18-Jul-06 10:40 
AnswerRe: overloading a variable argument list function Pin
led mike18-Jul-06 11:05
led mike18-Jul-06 11:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.