Click here to Skip to main content
16,005,080 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
GeneralRe: how ?? Pin
AlexMarbus9-Jul-02 11:08
AlexMarbus9-Jul-02 11:08 
Hi Win,

In this line:
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])

is actually all you need. The 'argc' is the number of items specified on the commandline.
The array argv are all commandline arguments (including the name of the executable itself, printExcel.exe).

You can retrieve every argument by just using the index in the array:

int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
CString strArgument;
for (int i = 0; i < argc; i++)
strArgument = argv[i];

} // Not compiled, assuming it's correct


--
Alex Marbus
www.marbus.net
But then again, I could be wrong.
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 
GeneralRe: SelectObject() Rules Pin
Prem Kumar9-Jul-02 7:32
Prem Kumar9-Jul-02 7: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.