Click here to Skip to main content
15,909,539 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to use this Code? Pin
NickOne9-Jul-02 10:58
NickOne9-Jul-02 10:58 
GeneralHelp on WMF/EMF to file Pin
Jim Crafton9-Jul-02 10:26
Jim Crafton9-Jul-02 10:26 
GeneralRe: Help on WMF/EMF to file Pin
Shog99-Jul-02 15:46
sitebuilderShog99-Jul-02 15:46 
Generalworksheets::printpreview() Pin
pnpfriend9-Jul-02 9:53
pnpfriend9-Jul-02 9:53 
Questionhow dialog base application calls dos base application? Pin
pnpfriend9-Jul-02 9:48
pnpfriend9-Jul-02 9:48 
AnswerRe: how dialog base application calls dos base application? Pin
S van Leent9-Jul-02 10:12
S van Leent9-Jul-02 10:12 
GeneralRe: how ??? Pin
pnpfriend9-Jul-02 10:25
pnpfriend9-Jul-02 10:25 
GeneralRe: how ?? Pin
pnpfriend9-Jul-02 10:43
pnpfriend9-Jul-02 10:43 
This is how I had tried but it is not working!Cry | :((

the following code is in the dialog based application
<br />
void DialogBasedApp::OnTesting()<br />
{<br />
   SHELLEXECUTEINFO lpExecInfo;<br />
   const char* verb = "open";<br />
    lpExecInfo.cbSize  = sizeof(SHELLEXECUTEINFO);<br />
    lpExecInfo.lpFile = "c:\\printExcel\\Debug\\printExcel.exe";<br />
    lpExecInfo.fMask=SEE_MASK_DOENVSUBST|SEE_MASK_NOCLOSEPROCESS ;     <br />
    lpExecInfo.hwnd = NULL;<br />
    lpExecInfo.lpVerb = verb; <br />
    lpExecInfo.lpParameters = "c:\\testing.xls";<br />
    lpExecInfo.lpDirectory = NULL;<br />
    lpExecInfo.nShow = SW_SHOW ; <br />
    lpExecInfo.hInstApp = (HINSTANCE) SE_ERR_DDEFAIL ;   //WINSHELLAPI BOOL WINAPI result; <br />
   ShellExecuteEx(&lpExecInfo);  <br />
   if(lpExecInfo.hProcess != NULL)<br />
   {<br />
      ::WaitForSingleObject(lpExecInfo.hProcess, INFINITE);<br />
      ::CloseHandle(lpExecInfo.hProcess);<br />
   }<br />
   MessageBox("Finished Printing Excel");<br />
}<br />


my dos based application, which is called printExcel.cpp, is right below
<br />
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])<br />
{ <br />
  AfxMessageBox(argv[0]);<br />
  return 1;<br />
<br />
}<br />


Honestly, i don't even know how to get the argument so no doubt that i have no idea where the program got wrong.
Cry | :((

can you tell me what and where it got wrong and how to fix it, please.
GeneralRe: how ?? Pin
AlexMarbus9-Jul-02 11:08
AlexMarbus9-Jul-02 11:08 
GeneralRe: how ?? Pin
Rick York9-Jul-02 19:02
mveRick York9-Jul-02 19:02 
GeneralRe: how ?? Pin
pnpfriend10-Jul-02 2:21
pnpfriend10-Jul-02 2:21 
GeneralRe: how ?? Pin
S van Leent9-Jul-02 23:06
S van Leent9-Jul-02 23:06 
GeneralRe: how ?? Pin
pnpfriend10-Jul-02 2:53
pnpfriend10-Jul-02 2:53 
GeneralRe: how ?? Pin
pnpfriend10-Jul-02 3:57
pnpfriend10-Jul-02 3:57 
GeneralSafe way of passing WNDPROC through functions Pin
S van Leent9-Jul-02 8:51
S van Leent9-Jul-02 8:51 
GeneralRe: Safe way of passing WNDPROC through functions Pin
Joaquín M López Muñoz9-Jul-02 13:06
Joaquín M López Muñoz9-Jul-02 13:06 
GeneralRe: Safe way of passing WNDPROC through functions Pin
S van Leent9-Jul-02 23:08
S van Leent9-Jul-02 23:08 
General'asynchronous' version of _access() Pin
Srini Kella9-Jul-02 8:08
Srini Kella9-Jul-02 8:08 
GeneralRe: 'asynchronous' version of _access() Pin
Joaquín M López Muñoz9-Jul-02 12:57
Joaquín M López Muñoz9-Jul-02 12:57 
GeneralRTF to XML Pin
AlexMarbus9-Jul-02 6:58
AlexMarbus9-Jul-02 6:58 
GeneralRe: RTF to XML Pin
Joaquín M López Muñoz9-Jul-02 13:26
Joaquín M López Muñoz9-Jul-02 13:26 
GeneralRe: RTF to XML Pin
AlexMarbus10-Jul-02 7:41
AlexMarbus10-Jul-02 7:41 
GeneralCalling Access File Pin
TommyKnocker9-Jul-02 6:37
TommyKnocker9-Jul-02 6:37 
GeneralRe: Calling Access File Pin
Prem Kumar9-Jul-02 7:34
Prem Kumar9-Jul-02 7:34 
GeneralSelectObject() Rules Pin
Obliterator9-Jul-02 6:32
Obliterator9-Jul-02 6:32 

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.