|
From: Yohaan H. <jsh...@ho...> - 2007-02-14 00:13:02
|
I am still learning C++ as well as the Dev-Cpp program. I got a little bit
confused at the beginning and am now able to perhaps ask the right
questions.
the first rather simple one is how would i call a second cpp program from
the first? as in if (a=1) then open second program?
the second regarding the main.c program
hwnd = CreateWindowEx(
0, /* Extended possibilites for variation */
szClassName, /* Classname */
"Windows Example", /* Title Text */
WS_OVERLAPPEDWINDOW, /* defaultwindow */
CW_USEDEFAULT, /* Windows decides the position */
CW_USEDEFAULT, /* where the window end up on the screen */
544, /* The programs width */
375, /* and height in pixels */
HWND_DESKTOP, /* The window is a childwindow to desktop */
NULL, /* No menu */
hThisInstance, /* Program Instance handler */
NULL /* No Window Creation data */
);
where NULL is what would i use to state that their is Window Creation data
would this qualify as a call to a second program?
_________________________________________________________________
Dont miss your chance to WIN 10 hours of private jet travel from Microsoft
Office Live http://clk.atdmt.com/MRT/go/mcrssaub0540002499mrt/direct/01/
|
|
From: Per W. <pw...@ia...> - 2007-02-14 00:24:45
|
Look at system, exec, spawn, ShellExecute, ShellExecuteEx or similar function calls, to start another application. By the way, M$ is trying to kill the old Win32 API. Are you really sure that you want to learn how to use it? Look into writing applications using a portable framework instead, such as wxWidgets. /Per W On Tue, 13 Feb 2007, Yohaan Hall wrote: > I am still learning C++ as well as the Dev-Cpp program. I got a little bi= t > confused at the beginning and am now able to perhaps ask the right > questions. > > the first rather simple one is how would i call a second cpp program from > the first? as in if (a=3D1) then open second program? > > the second regarding the main.c program > > hwnd =3D CreateWindowEx( > 0, /* Extended possibilites for variation */ > szClassName, /* Classname */ > "Windows Example", /* Title Text */ > WS_OVERLAPPEDWINDOW, /* defaultwindow */ > CW_USEDEFAULT, /* Windows decides the position */ > CW_USEDEFAULT, /* where the window end up on the screen = */ > 544, /* The programs width */ > 375, /* and height in pixels */ > HWND_DESKTOP, /* The window is a childwindow to desktop= */ > NULL, /* No menu */ > hThisInstance, /* Program Instance handler */ > NULL /* No Window Creation data */ > ); > > where NULL is what would i use to state that their is Window Creation dat= a > would this qualify as a call to a second program? > > _________________________________________________________________ > Don=92t miss your chance to WIN 10 hours of private jet travel from Micro= soft > Office Live http://clk.atdmt.com/MRT/go/mcrssaub0540002499mrt/direct/01/ > > > |
|
From: seb_kramm <seb...@ya...> - 2007-02-14 14:28:39
|
Per Westermark a écrit : > By the way, M$ is trying to kill the old Win32 API. Mmmh, I would'nt be so sure about that. Look what happened with the so-called "Dos Box". Started as command.com, moved up to cmd.exe with NT4, and I'm using it daily as a native scripting language on a XP machine. Why ? Just because many people are used to it, and that it doesn't cost anything to let it survive. (Not to say that many administrative tasks require some cmd.exe commands) I hav'nt had a Vista machine, but I think I read somewhere that cmd.exe was still there. IMHO, it'll be the same with the "good'ol" win32 api. So many applications rely on it, and can be easily rebuild from source with a couple of mods, I don't think MS will break it so sharply. And was Vista written from scratch ? It probably relies also on some win32 api code, or else, I got things wrong about MS... > Look into writing applications using a portable framework instead, such as > wxWidgets. Anyhow, good advice, I agree ! |
|
From: Per W. <pw...@ia...> - 2007-02-14 14:41:56
|
I didn't say they would have an easy task killing it. I just wrote that they are _trying_ :) If all existing Win32 applications suddenly have to be emulated, a lot of users will notice that they may just as well emulate it on Linux/Wine... /Per W On Wed, 14 Feb 2007, seb_kramm wrote: > Per Westermark a =E9crit : > > By the way, M$ is trying to kill the old Win32 API. > > Mmmh, I would'nt be so sure about that. > > Look what happened with the so-called "Dos Box". Started as command.com, = moved up to > cmd.exe with NT4, and I'm using it daily as a native scripting language o= n a XP > machine. Why ? Just because many people are used to it, and that it doesn= 't cost > anything to let it survive. (Not to say that many administrative tasks re= quire some > cmd.exe commands) > I hav'nt had a Vista machine, but I think I read somewhere that cmd.exe w= as still there. > > IMHO, it'll be the same with the "good'ol" win32 api. So many application= s rely on > it, and can be easily rebuild from source with a couple of mods, I don't = think MS > will break it so sharply. > And was Vista written from scratch ? It probably relies also on some win3= 2 api code, > or else, I got things wrong about MS... > > > Look into writing applications using a portable framework instead, such= as > > wxWidgets. > > Anyhow, good advice, I agree ! > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share y= our > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D= DEVDEV > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |