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

C / C++ / MFC

 
AnswerRe: About how many weeks are needed for a Simplified Version of Skype? Pin
led mike3-Mar-08 7:53
led mike3-Mar-08 7:53 
GeneralRe: About how many weeks are needed for a Simplified Version of Skype? Pin
Mark Salsbery3-Mar-08 9:29
Mark Salsbery3-Mar-08 9:29 
AnswerRe: About how many weeks are needed for a Simplified Version of Skype? Pin
David Crow3-Mar-08 10:23
David Crow3-Mar-08 10:23 
GeneralCall CMainFrame methold from dialog Pin
ptr_Electron3-Mar-08 4:39
ptr_Electron3-Mar-08 4:39 
GeneralRe: Call CMainFrame methold from dialog Pin
Randor 3-Mar-08 4:46
professional Randor 3-Mar-08 4:46 
GeneralRe: Call CMainFrame methold from dialog Pin
ptr_Electron3-Mar-08 22:12
ptr_Electron3-Mar-08 22:12 
GeneralRe: Call CMainFrame methold from dialog Pin
ptr_Electron3-Mar-08 22:52
ptr_Electron3-Mar-08 22:52 
GeneralRe: Call CMainFrame methold from dialog Pin
Randor 4-Mar-08 3:59
professional Randor 4-Mar-08 3:59 
It would be better programming practice to use ::PostMessage() to post a WM_USER+ message back to the CMainFrame. You could define a user message such as:

#define WM_INC_PROGRESS WM_USER + 0x10

and then do something like:

int iProgressVal = 50;
CMainFrame* pFrame = (CMainFrame*)AfxGetMainWnd();
if(NULL != pFrame && ::IsWindow(pFrame->GetSafeHwnd()))
{
    ::PostMessage(pFrame->GetSafeHwnd(),WM_INC_PROGRESS,(WPARAM)iProgressVal,0);
}


And in the CMainFrame class you would need to add a handler for this custom message which changed the progress bar to the specified amount. Your code will work just fine like it is. The window message system is a valuable tool and can be used for basic cross-thread communication.

Best Wishes,
-Randor (David Delaune)
GeneralRe: Call CMainFrame methold from dialog Pin
ptr_Electron4-Mar-08 5:16
ptr_Electron4-Mar-08 5:16 
GeneralCursor Pointers Pin
duta3-Mar-08 4:24
duta3-Mar-08 4:24 
GeneralRe: Cursor Pointers Pin
Mark Salsbery3-Mar-08 6:11
Mark Salsbery3-Mar-08 6:11 
GeneralCreating a graphic control within a DLL Pin
ilgale3-Mar-08 3:07
ilgale3-Mar-08 3:07 
GeneralRe: Creating a graphic control within a DLL Pin
CPallini3-Mar-08 3:23
mveCPallini3-Mar-08 3:23 
GeneralDebugBreak continue issue Pin
George_George3-Mar-08 2:58
George_George3-Mar-08 2:58 
Generaldifference between CComPtr <ipin> and IPin*</ipin> Pin
hanlei00000000093-Mar-08 2:56
hanlei00000000093-Mar-08 2:56 
GeneralRe: difference between CComPtr and IPin* Pin
CPallini3-Mar-08 3:12
mveCPallini3-Mar-08 3:12 
GeneralRe: difference between CComPtr and IPin* Pin
Alexander M.,3-Mar-08 3:27
Alexander M.,3-Mar-08 3:27 
GeneralRe: difference between CComPtr and IPin* Pin
CPallini3-Mar-08 3:47
mveCPallini3-Mar-08 3:47 
QuestionProblem while convesion from Float to int using VC++ 6.0 Pin
Kishore JP3-Mar-08 2:55
Kishore JP3-Mar-08 2:55 
GeneralRe: Problem while convesion from Float to int using VC++ 6.0 Pin
David Crow3-Mar-08 3:02
David Crow3-Mar-08 3:02 
GeneralRe: Problem while convesion from Float to int using VC++ 6.0 Pin
CPallini3-Mar-08 3:06
mveCPallini3-Mar-08 3:06 
GeneralRe: Problem while convesion from Float to int using VC++ 6.0 Pin
jhwurmbach3-Mar-08 3:09
jhwurmbach3-Mar-08 3:09 
AnswerRe: Problem while convesion from Float to int using VC++ 6.0 Pin
Kishore JP16-Mar-08 1:20
Kishore JP16-Mar-08 1:20 
GeneralRe: Problem while convesion from Float to int using VC++ 6.0 Pin
jhwurmbach16-Mar-08 22:19
jhwurmbach16-Mar-08 22:19 
Generalprocesses Pin
duta3-Mar-08 2:16
duta3-Mar-08 2:16 

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.