Click here to Skip to main content
15,903,540 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionIntercepting Output from another application Pin
shatterstar645720-Feb-07 13:19
shatterstar645720-Feb-07 13:19 
AnswerRe: Intercepting Output from another application Pin
Stephen Hewitt20-Feb-07 13:27
Stephen Hewitt20-Feb-07 13:27 
AnswerRe: Intercepting Output from another application Pin
ThatsAlok21-Feb-07 6:10
ThatsAlok21-Feb-07 6:10 
QuestionUniversal Progress Dialog Pin
BuckBrown20-Feb-07 12:38
BuckBrown20-Feb-07 12:38 
AnswerRe: Universal Progress Dialog Pin
Stephen Hewitt20-Feb-07 12:41
Stephen Hewitt20-Feb-07 12:41 
GeneralRe: Universal Progress Dialog Pin
BuckBrown20-Feb-07 13:07
BuckBrown20-Feb-07 13:07 
GeneralRe: Universal Progress Dialog Pin
Stephen Hewitt20-Feb-07 13:09
Stephen Hewitt20-Feb-07 13:09 
GeneralRe: Universal Progress Dialog Pin
BuckBrown20-Feb-07 13:46
BuckBrown20-Feb-07 13:46 
ProgressDlgProc appears in only three places.

Here it is in the UPDialog.h file,
class CUPDialog
{
static struct _tagInitCommonControls
{
_tagInitCommonControls(); // Constructor to call the InitCommonControlsEx() function
}
m_InitCommonControls; // Static Variable
HWND m_hParentWnd; //The Window that Requested the Progress Operation; Needed to Create the DialogBox
bool m_bAllowCancel; //Should the Dialog allow PreEmtption by user before Completion?
HANDLE m_hThread; //Holds the Handle to the Created Thread
TCHAR m_szDialogCaption[256]; //Fill up with the Title of the DialogBox
CUPDUPDATA m_ThreadData;
friend INT_PTR CALLBACK ProgressDlgProc(HWND,UINT,WPARAM,LPARAM); //The Windows Message Procedure for the DialogBox
void Cleanup();

public:
enum { IDD = CUPDIALOG_DIALOG_ID };
CUPDialog(HWND hParentWnd,LP_CUPDIALOG_USERPROC lpUserProc,LPVOID lpUserProcParam,LPCTSTR lpszDlgTitle=_T("Please Wait.."),bool bAllowCancel=true);

virtual ~CUPDialog();

INT_PTR DoModal(); //Returns: IDOK => Sucessful; (IDCANCEL && HIWORD(wParam)==0) => Some Error in UserProc; (IDCANCEL && HIWORD(wParam)==1) =>User Cancelled the Dialog;
};


It also appears as the function itself,
INT_PTR CALLBACK ProgressDlgProc(HWND hDlg,UINT Message,WPARAM wParam,LPARAM lParam)
{
switch(Message)
{
case WM_INITDIALOG:
{
CUPDialog *pProgressDialog = (CUPDialog*) lParam;

if(pProgressDialog->m_bAllowCancel == false)

and also as a part of a return value which is what I posted and the compiler crashes on.

GeneralRe: Universal Progress Dialog Pin
Stephen Hewitt20-Feb-07 13:53
Stephen Hewitt20-Feb-07 13:53 
GeneralRe: Universal Progress Dialog Pin
BuckBrown21-Feb-07 5:35
BuckBrown21-Feb-07 5:35 
GeneralRe: Universal Progress Dialog Pin
Stephen Hewitt21-Feb-07 11:56
Stephen Hewitt21-Feb-07 11:56 
QuestionMultiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 10:55
Demosthenes Tecumseh20-Feb-07 10:55 
AnswerRe: Multiple list boxes in main window Pin
PJ Arends20-Feb-07 11:46
professionalPJ Arends20-Feb-07 11:46 
GeneralRe: Multiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 12:10
Demosthenes Tecumseh20-Feb-07 12:10 
JokeRe: Multiple list boxes in main window Pin
Mark Salsbery20-Feb-07 12:41
Mark Salsbery20-Feb-07 12:41 
AnswerRe: Multiple list boxes in main window Pin
Stephen Hewitt20-Feb-07 12:43
Stephen Hewitt20-Feb-07 12:43 
GeneralRe: Multiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 13:44
Demosthenes Tecumseh20-Feb-07 13:44 
GeneralRe: Multiple list boxes in main window Pin
PJ Arends20-Feb-07 15:29
professionalPJ Arends20-Feb-07 15:29 
AnswerRe: Multiple list boxes in main window Pin
Demosthenes Tecumseh20-Feb-07 14:01
Demosthenes Tecumseh20-Feb-07 14:01 
QuestionMemory Allocation/Deallocation issues?? Pin
pavanbabut20-Feb-07 9:42
pavanbabut20-Feb-07 9:42 
AnswerRe: Memory Allocation/Deallocation issues?? Pin
Mark Salsbery20-Feb-07 10:05
Mark Salsbery20-Feb-07 10:05 
AnswerRe: Memory Allocation/Deallocation issues?? Pin
Blake Miller20-Feb-07 10:21
Blake Miller20-Feb-07 10:21 
GeneralRe: Memory Allocation/Deallocation issues?? Pin
pavanbabut20-Feb-07 11:40
pavanbabut20-Feb-07 11:40 
AnswerRe: Memory Allocation/Deallocation issues?? Pin
Mark Salsbery20-Feb-07 12:17
Mark Salsbery20-Feb-07 12:17 
GeneralRe: Memory Allocation/Deallocation issues?? Pin
pavanbabut20-Feb-07 13:21
pavanbabut20-Feb-07 13:21 

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.