Click here to Skip to main content
15,896,111 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralINTERNAL COMPILER ERROR Pin
aguest8-May-03 15:29
aguest8-May-03 15:29 
GeneralRe: INTERNAL COMPILER ERROR Pin
Maxwell Chen8-May-03 16:39
Maxwell Chen8-May-03 16:39 
GeneralRe: INTERNAL COMPILER ERROR Pin
jhwurmbach9-May-03 2:05
jhwurmbach9-May-03 2:05 
GeneralRe: INTERNAL COMPILER ERROR Pin
Roger Allen9-May-03 2:20
Roger Allen9-May-03 2:20 
GeneralRe: INTERNAL COMPILER ERROR Pin
Erik Juhl9-May-03 5:25
Erik Juhl9-May-03 5:25 
QuestionCan a window Pin
RuchikaDhingra8-May-03 15:10
RuchikaDhingra8-May-03 15:10 
AnswerRe: Can a window Pin
John R. Shaw8-May-03 16:49
John R. Shaw8-May-03 16:49 
GeneralBackground thread Pin
basementman9-May-03 5:18
basementman9-May-03 5:18 
You can do something like this:

Init fcn:

{
...

theApp.m_sAlertParamStruct.hThread = ::CreateThread(NULL,0,BackgroundAlertThread,(LPVOID)&theApp.m_sAlertParamStruct,0,&dwThreadID);
...
}



DWORD WINAPI BackgroundAlertThread(LPVOID pParams)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

BACKGROUNDPARAMSTRUCT *pParamStruct = (BACKGROUNDPARAMSTRUCT *)pParams;

char caBuf[21];

if (pParamStruct->pApplication->GetUserTagValue("AlertBackgroundThreadRunFrequency",caBuf))
iRunFrequency = atoi(caBuf);

// check not more frequent than every 30 seconds..
if (iRunFrequency < 30)
iRunFrequency = 30;

int iSeconds = 0;

while (!pParamStruct->bTerminateThread)
{
iSeconds++;
if (iSeconds >= iRunFrequency)
{
// do your thing here......

iSeconds = 0;
}

Sleep(1000);
}

if (!pParamStruct->bTerminateThread)
pParamStruct->hThread = NULL;

return 0;
}

GeneralRe: Background thread Pin
RuchikaDhingra9-May-03 6:27
RuchikaDhingra9-May-03 6:27 
GeneralRe: Background thread Pin
John R. Shaw9-May-03 8:19
John R. Shaw9-May-03 8:19 
QuestionHow to launch application into background using ShellExecuteEx Pin
bluntagain8-May-03 14:10
bluntagain8-May-03 14:10 
AnswerRe: How to launch application into background using ShellExecuteEx Pin
John R. Shaw8-May-03 16:43
John R. Shaw8-May-03 16:43 
GeneralIE CDhtmlDialog PBm Pin
RaajaOfSelf8-May-03 13:05
RaajaOfSelf8-May-03 13:05 
GeneralRe: IE CDhtmlDialog PBm Pin
Joan M8-May-03 23:52
professionalJoan M8-May-03 23:52 
GeneralRe: IE CDhtmlDialog PBm Pin
RaajaOfSelf9-May-03 0:00
RaajaOfSelf9-May-03 0:00 
GeneralGDI+ OnPaint Pin
Hammerfall8-May-03 12:38
Hammerfall8-May-03 12:38 
GeneralIntegrating MapPoint into MFC application Pin
Sridhar Sanikommu8-May-03 11:20
Sridhar Sanikommu8-May-03 11:20 
GeneralPrint margins for RichEditView Pin
C Turtle8-May-03 10:49
C Turtle8-May-03 10:49 
GeneralRe: Print margins for RichEditView Pin
G. Steudtel9-May-03 1:20
G. Steudtel9-May-03 1:20 
GeneralRe: Print margins for RichEditView Pin
C Turtle9-May-03 5:30
C Turtle9-May-03 5:30 
GeneralRe: Print margins for RichEditView Pin
G. Steudtel12-May-03 1:35
G. Steudtel12-May-03 1:35 
GeneralRe: Print margins for RichEditView Pin
C Turtle13-May-03 3:17
C Turtle13-May-03 3:17 
QuestionCString to int ? Pin
Dominik Reichl8-May-03 8:37
Dominik Reichl8-May-03 8:37 
AnswerRe: CString to int ? Pin
Heiko20038-May-03 8:40
sussHeiko20038-May-03 8:40 
GeneralRe: CString to int ? Pin
Dominik Reichl8-May-03 8:57
Dominik Reichl8-May-03 8:57 

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.