Click here to Skip to main content
15,913,854 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Maximising CMDIChildWnd Pin
Jawache16-May-03 3:37
Jawache16-May-03 3:37 
General[CLOSED] Re: Maximising CMDIChildWnd Pin
Jawache16-May-03 3:45
Jawache16-May-03 3:45 
GeneralRe: [CLOSED] Re: Maximising CMDIChildWnd Pin
basementman16-May-03 4:36
basementman16-May-03 4:36 
Generalnetwork data security Pin
_Theo_16-May-03 1:48
_Theo_16-May-03 1:48 
GeneralRe: network data security Pin
Joseph Dempsey16-May-03 2:16
Joseph Dempsey16-May-03 2:16 
GeneralProperty page font change Pin
Arungs16-May-03 0:50
Arungs16-May-03 0:50 
General_beginthread( GetIPAddress), 0, NULL); Pin
Bonnie215-May-03 23:43
Bonnie215-May-03 23:43 
GeneralRe: _beginthread( GetIPAddress), 0, NULL); Pin
geo_m15-May-03 23:57
geo_m15-May-03 23:57 
normally you cannot put a member function of your class to the _beginthread as a parameter. It is because the members of your class have calling convention __thiscall, but as compiler reminds you, he needs __cdecl.

solution - make your function static and put a this as a parameter (what you have as a dummy). Then you can cast the parameter from void* to ClassName* and call required method.

<br />
class ClassName<br />
{<br />
  public:<br />
    static void stGetIPAddress( void* dummy )<br />
    {<br />
       ((ClassName*)dummy)->GetIPAddress();<br />
    }<br />
 <br />
  void GetIPAddress( void *dummy )<br />
  {<br />
   m_IPAddress = do_Something(); /* _endthread implied */<br />
  }<br />
<br />
};<br />
<br />
<br />
// ...<br />
_beginthread( stGetIPAddress, 0, this); //or any other valid ptr to instance of ClassName<br />

GeneralRe: _beginthread( GetIPAddress), 0, NULL); Pin
Raphael Kindt16-May-03 0:20
Raphael Kindt16-May-03 0:20 
GeneralRe: _beginthread( GetIPAddress), 0, NULL); Pin
geo_m16-May-03 0:33
geo_m16-May-03 0:33 
Generalencoding data Pin
vancuver15-May-03 22:30
vancuver15-May-03 22:30 
GeneralRe: encoding data Pin
Trollslayer15-May-03 23:00
mentorTrollslayer15-May-03 23:00 
QuestionMACRO which give me the line number of a cpp file?!? Pin
Raphael Kindt15-May-03 22:27
Raphael Kindt15-May-03 22:27 
AnswerRe: MACRO which give me the line number of a cpp file?!? Pin
Martyn Pearson15-May-03 22:40
Martyn Pearson15-May-03 22:40 
GeneralRe: MACRO which give me the line number of a cpp file?!? Pin
Raphael Kindt15-May-03 23:40
Raphael Kindt15-May-03 23:40 
Generaldownloading file by URL Pin
Ares215-May-03 22:18
Ares215-May-03 22:18 
GeneralRe: downloading file by URL Pin
Ares216-May-03 1:11
Ares216-May-03 1:11 
Generaltab control help!!!! Pin
summo15-May-03 20:40
summo15-May-03 20:40 
GeneralSetting Dialog Tab Order With Propertysheet Pin
John Clump15-May-03 20:25
John Clump15-May-03 20:25 
GeneralRe: Setting Dialog Tab Order With Propertysheet Pin
Martyn Pearson15-May-03 21:39
Martyn Pearson15-May-03 21:39 
GeneralRe: Setting Dialog Tab Order With Propertysheet Pin
John Clump16-May-03 22:14
John Clump16-May-03 22:14 
GeneralRe: Setting Dialog Tab Order With Propertysheet Pin
Gary R. Wheeler17-May-03 4:55
Gary R. Wheeler17-May-03 4:55 
GeneralDisplay mirror drivers Pin
vikramlinux15-May-03 19:15
vikramlinux15-May-03 19:15 
GeneralDestructor Order Pin
Andrew Walker15-May-03 17:20
Andrew Walker15-May-03 17:20 
GeneralRe: Destructor Order Pin
Taka Muraoka15-May-03 18:58
Taka Muraoka15-May-03 18:58 

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.