Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Run MFC Program Without Dialog Showing Pin
Alan Balkany10-Sep-13 7:58
Alan Balkany10-Sep-13 7:58 
GeneralRe: Run MFC Program Without Dialog Showing Pin
Andraw11110-Sep-13 8:20
Andraw11110-Sep-13 8:20 
GeneralRe: Run MFC Program Without Dialog Showing Pin
Alan Balkany10-Sep-13 8:23
Alan Balkany10-Sep-13 8:23 
GeneralRe: Run MFC Program Without Dialog Showing Pin
Andraw11110-Sep-13 11:11
Andraw11110-Sep-13 11:11 
GeneralRe: Run MFC Program Without Dialog Showing Pin
Alan Balkany10-Sep-13 11:39
Alan Balkany10-Sep-13 11:39 
AnswerRe: Run MFC Program Without Dialog Showing Pin
Richard MacCutchan10-Sep-13 10:42
mveRichard MacCutchan10-Sep-13 10:42 
GeneralRe: Run MFC Program Without Dialog Showing Pin
Andraw11110-Sep-13 11:13
Andraw11110-Sep-13 11:13 
GeneralRe: Run MFC Program Without Dialog Showing Pin
Richard MacCutchan10-Sep-13 11:31
mveRichard MacCutchan10-Sep-13 11:31 
OK, so accept a parameter and if it's false do not show the dialog, something like:
C++
int APIENTRY WinMain(HINSTANCE hInstance,       // instance value of the invoked application
                     HINSTANCE hPrevInstance,   // no longer used
                     PSTR      pszCmdLine,      // pointer to the MS-DOS command line
                     int       nCmdShow         // value indicating initial state of the window
                     )
{
    BOOL myParameter;
    // get the parameter from the command line and convert to BOOL

    if (myParameter == TRUE)
    {
        DialogBoxParam(hInstance,
                       MAKEINTRESOURCE(IDD_DLG),
                       NULL,
                       (DLGPROC)DlgProc,
                       NULL
                       );
    }
    else
    {
        // call the function to calculate and write the file
    }

    return TRUE;
}

Where is the problem?
Veni, vidi, abiit domum

GeneralRe: Run MFC Program Without Dialog Showing Pin
digitalspace.xjtu10-Sep-13 22:50
digitalspace.xjtu10-Sep-13 22:50 
GeneralRe: Run MFC Program Without Dialog Showing Pin
Freak3010-Sep-13 23:21
Freak3010-Sep-13 23:21 
AnswerRe: Run MFC Program Without Dialog Showing Pin
Andraw11111-Sep-13 3:35
Andraw11111-Sep-13 3:35 
GeneralRe: Run MFC Program Without Dialog Showing Pin
digitalspace.xjtu11-Sep-13 23:41
digitalspace.xjtu11-Sep-13 23:41 
QuestionRe: Run MFC Program Without Dialog Showing Pin
David Crow11-Sep-13 10:36
David Crow11-Sep-13 10:36 
QuestionModbus Protocol Pin
Member 99906089-Sep-13 19:17
Member 99906089-Sep-13 19:17 
AnswerRe: Modbus Protocol Pin
Richard MacCutchan9-Sep-13 21:03
mveRichard MacCutchan9-Sep-13 21:03 
AnswerRe: Modbus Protocol Pin
CPallini9-Sep-13 22:15
mveCPallini9-Sep-13 22:15 
Questionis c++ outdated, why is there no refference to it in windows virtual academy ? Pin
A.U.K9-Sep-13 0:03
professionalA.U.K9-Sep-13 0:03 
AnswerRe: is c++ outdated, why is there no refference to it in windows virtual academy ? Pin
NotPolitcallyCorrect9-Sep-13 1:47
NotPolitcallyCorrect9-Sep-13 1:47 
QuestionUsing CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Don Guy6-Sep-13 12:37
Don Guy6-Sep-13 12:37 
AnswerRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Richard MacCutchan7-Sep-13 1:39
mveRichard MacCutchan7-Sep-13 1:39 
AnswerRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Richard Andrew x647-Sep-13 11:29
professionalRichard Andrew x647-Sep-13 11:29 
GeneralRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Don Guy8-Sep-13 9:31
Don Guy8-Sep-13 9:31 
GeneralRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
Richard Andrew x648-Sep-13 14:12
professionalRichard Andrew x648-Sep-13 14:12 
AnswerRe: Using CDHtmlDialog app, changing images (JPG,PNG) dynamically in the HTML Page Pin
SoMad8-Sep-13 15:38
professionalSoMad8-Sep-13 15:38 
QuestionReading Image (JPG) file as Binary to CString Pin
Don Guy6-Sep-13 6:03
Don Guy6-Sep-13 6:03 

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.