Click here to Skip to main content
15,921,840 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to know programatically that Windows has logged in/Logged Off/Shut Down occured etc? Pin
Rage20-Jan-06 3:09
professionalRage20-Jan-06 3:09 
AnswerRe: How to know programatically that Windows has logged in/Logged Off/Shut Down occured etc? Pin
David Crow20-Jan-06 4:09
David Crow20-Jan-06 4:09 
GeneralRe: How to know programatically that Windows has logged in/Logged Off/Shut Down occured etc? Pin
Toby Opferman20-Jan-06 7:54
Toby Opferman20-Jan-06 7:54 
QuestionRe: How to know programatically that Windows has logged in/Logged Off/Shut Down occured etc? Pin
David Crow20-Jan-06 8:08
David Crow20-Jan-06 8:08 
QuestionAccessing dialogue from global function Pin
Anu_Bala20-Jan-06 1:40
Anu_Bala20-Jan-06 1:40 
AnswerRe: Accessing dialogue from global function Pin
Cedric Moonen20-Jan-06 1:50
Cedric Moonen20-Jan-06 1:50 
AnswerRe: Accessing dialogue from global function Pin
Rage20-Jan-06 3:19
professionalRage20-Jan-06 3:19 
AnswerRe: Accessing dialogue from global function Pin
fat_boy20-Jan-06 4:22
fat_boy20-Jan-06 4:22 
Every time hte dialog is active, set a globla pointer to this. When the dialog closes, set the global pointer to NULL.

You can access this global pointer from anywhere in your code, and call any of the public members.


I do this alot in MFC when I use CreateThread.

eg:

	CreateThread(NULL, 0, <br />
		  &ConnectThread,    // thread function<br />
		  this,              // thread argument<br />
		  0,		     // creation option<br />
		  0);                // thread identifier<br />
<br />
DWORD WINAPI ConnectThread(LPVOID lpParameter)<br />
{<br />
	CNicCPAppDlg * dlg = (CNicCPAppDlg *) lpParameter;<br />
<br />
	AFX_MANAGE_STATE(AfxGetStaticModuleState());<br />
<br />
        while(dlg->stayalive)<br />
        {<br />
            // do some stuff<br />
        }<br />
        return 0;<br />
}


Nunc est bibendum
QuestionProblems printing with GDI+ Pin
Alberto_Canabal20-Jan-06 1:27
Alberto_Canabal20-Jan-06 1:27 
QuestionHow to recursively check the check boxes in CTreeCtrl? Pin
Vairamuthu. G.20-Jan-06 1:25
Vairamuthu. G.20-Jan-06 1:25 
AnswerRe: How to recursively check the check boxes in CTreeCtrl? Pin
Stephen Hewitt20-Jan-06 3:10
Stephen Hewitt20-Jan-06 3:10 
GeneralRe: How to recursively check the check boxes in CTreeCtrl? Pin
Vairamuthu. G.20-Jan-06 4:23
Vairamuthu. G.20-Jan-06 4:23 
GeneralRe: How to recursively check the check boxes in CTreeCtrl? Pin
Stephen Hewitt20-Jan-06 4:36
Stephen Hewitt20-Jan-06 4:36 
AnswerRe: How to recursively check the check boxes in CTreeCtrl? Pin
Rage20-Jan-06 3:15
professionalRage20-Jan-06 3:15 
GeneralRe: How to recursively check the check boxes in CTreeCtrl? Pin
Stephen Hewitt20-Jan-06 3:22
Stephen Hewitt20-Jan-06 3:22 
GeneralRe: How to recursively check the check boxes in CTreeCtrl? Pin
Rage20-Jan-06 4:24
professionalRage20-Jan-06 4:24 
QuestionGet IP address of computer Pin
waxie20-Jan-06 0:52
waxie20-Jan-06 0:52 
AnswerRe: Get IP address of computer Pin
Laxman920-Jan-06 17:44
Laxman920-Jan-06 17:44 
GeneralRe: Get IP address of computer Pin
Owner drawn22-Jan-06 17:16
Owner drawn22-Jan-06 17:16 
GeneralRe: Get IP address of computer Pin
waxie22-Jan-06 17:33
waxie22-Jan-06 17:33 
GeneralRe: Get IP address of computer Pin
Owner drawn22-Jan-06 17:36
Owner drawn22-Jan-06 17:36 
GeneralRe: Get IP address of computer Pin
waxie22-Jan-06 18:15
waxie22-Jan-06 18:15 
GeneralRe: Get IP address of computer Pin
Owner drawn22-Jan-06 18:22
Owner drawn22-Jan-06 18:22 
GeneralRe: Get IP address of computer Pin
waxie22-Jan-06 18:30
waxie22-Jan-06 18:30 
GeneralRe: Get IP address of computer Pin
waxie22-Jan-06 18:40
waxie22-Jan-06 18:40 

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.