Click here to Skip to main content
15,911,711 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Filling of a rectangle with bitmap pattern Pin
Christian Graus7-Jun-01 13:12
protectorChristian Graus7-Jun-01 13:12 
GeneralIndenting in Chris Maunders Grid Ctrl Pin
7-Jun-01 4:24
suss7-Jun-01 4:24 
GeneralRe: Indenting in Chris Maunders Grid Ctrl Pin
7-Jun-01 5:15
suss7-Jun-01 5:15 
GeneralAccessing Instance & Resource Handle from an Extention DLL Pin
D.D. de Kerf7-Jun-01 4:16
D.D. de Kerf7-Jun-01 4:16 
General_beginthread and MFC Pin
7-Jun-01 4:06
suss7-Jun-01 4:06 
GeneralRe: _beginthread and MFC Pin
Ulf Öhlén7-Jun-01 5:23
Ulf Öhlén7-Jun-01 5:23 
GeneralRe: _beginthread and MFC Pin
Li Lirong7-Jun-01 16:06
Li Lirong7-Jun-01 16:06 
GeneralRe: _beginthread and MFC Pin
D.D. de Kerf7-Jun-01 20:47
D.D. de Kerf7-Jun-01 20:47 
I'd do the following:


1) Create a global function :
void ThePingThread(void * pDlg)
{
if (pDlg != NULL)
{
( (CMyAppDlg *) pDlg)->PingThread() );
}
}

2) ...calling the pingthread function in your thread

void CMyAppDlg::pingthread()
{
pParameter = m_pParamter;
// Do your pinging stuff!
}


3) Start the trhead as follows:
void CMyAppDlg::RunPingThread(void* pParameter)
{
m_pParameter = pParameter;
_beginthread(ThePingThread, 0, this);
}



It works for me!



Structured programming vs. chaotic mind boggling
GeneralRe: _beginthread and MFC Pin
8-Jun-01 4:32
suss8-Jun-01 4:32 
GeneralRe: _beginthread and MFC Pin
D.D. de Kerf10-Jun-01 20:50
D.D. de Kerf10-Jun-01 20:50 
GeneralMDI in MFC Pin
7-Jun-01 3:46
suss7-Jun-01 3:46 
GeneralRe: MDI in MFC Pin
Christian Graus7-Jun-01 13:15
protectorChristian Graus7-Jun-01 13:15 
GeneralRunning in the background Pin
GOW7-Jun-01 3:35
GOW7-Jun-01 3:35 
GeneralRe: Running in the background Pin
Chris Meech7-Jun-01 6:41
Chris Meech7-Jun-01 6:41 
GeneralRe: Running in the background Pin
Michael P Butler7-Jun-01 22:23
Michael P Butler7-Jun-01 22:23 
GeneralLinked list help?! Pin
7-Jun-01 3:32
suss7-Jun-01 3:32 
GeneralRe: Linked list help?! Pin
Ghazi H. Wadi7-Jun-01 12:26
Ghazi H. Wadi7-Jun-01 12:26 
GeneralRe: Linked list help?! Pin
Christian Graus7-Jun-01 13:23
protectorChristian Graus7-Jun-01 13:23 
GeneralNT compilation and linking time Pin
7-Jun-01 1:47
suss7-Jun-01 1:47 
GeneralAccessing records through Recordset Pointer Pin
yamini7-Jun-01 1:42
yamini7-Jun-01 1:42 
GeneralRe: Accessing records through Recordset Pointer Pin
Phil Boyd7-Jun-01 3:21
Phil Boyd7-Jun-01 3:21 
GeneralRe: Accessing records through Recordset Pointer Pin
yamini7-Jun-01 20:16
yamini7-Jun-01 20:16 
GeneralOpenGL Pin
7-Jun-01 0:53
suss7-Jun-01 0:53 
GeneralRe: OpenGL Pin
Michael P Butler7-Jun-01 1:30
Michael P Butler7-Jun-01 1:30 
GeneralRe: OpenGL Pin
Ulf Öhlén9-Jun-01 22:56
Ulf Öhlén9-Jun-01 22:56 

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.