LaunchingIE from within a c++ program

LaunchingIE from within a c++ program

Post by James Rab » Thu, 05 Jun 2003 11:09:38



Hello - I would like to launch IE from within a C++
program and have it work across all Microsoft OS's (95,
98, 2000, XP).  I tried this:

WinExec("cmd /c start http://www.microsoft.com", SW_HIDE);

Which works on XP but not on other OS's.  I tried using
command instead of cmd and that did not work either.

Any suggestions would be appreciated.  Thanks

 
 
 

LaunchingIE from within a c++ program

Post by rlfin » Thu, 05 Jun 2003 11:51:30


James --

Use the ShellExecute -- it works on Win95 and up and WinNt4 and up.  here is an example:

/* ******************************************* */
int main(int argc, char* argv[]){
HINSTANCE  ss = ShellExecute(NULL,"open","C:\\Program Files\\Microsoft Visual Studio\\READMEDN.HTM",NULL,NULL,SW_SHOW);

return 0;

Quote:}

/* ******************************************* */

regards
roy fine


> Hello - I would like to launch IE from within a C++
> program and have it work across all Microsoft OS's (95,
> 98, 2000, XP).  I tried this:

> WinExec("cmd /c start http://www.microsoft.com", SW_HIDE);

> Which works on XP but not on other OS's.  I tried using
> command instead of cmd and that did not work either.

> Any suggestions would be appreciated.  Thanks


 
 
 

1. Compiling programmes within programmes.

Hello All,
   I looked at the previous posts where people had similar
problems like I do now: how do you compile a programme within
another. Here is the error message

IDL> make_roi
% LOADCT: Loading table RAINBOW
% Attempt to call undefined procedure/function: 'RECONKERNEL'.

So I first tried adding this to make_roi.pro
!path = !path+':/home/karthik/ROI/30Apr2003'

That did not work. And then I added:
  Resolve_routine, 'FileMenu.pro' and
  Resolve_routine, 'Reconkernel.pro'
Still no luck.

Then tried David's method (from an earlier post)
PRO make_roi_make
   Resolve_Routine, 'backproject.pro'
   Resolve_Routine, 'display_resize.pro'
   Resolve_Routine, 'FileMenu.pro'
   Resolve_Routine, 'forward_project.pro'
   Resolve_Routine, 'interactivedraw.pro'
   Resolve_Routine, 'make_roi.pro'
   Resolve_Routine, 'plot_tac.pro'
   Resolve_Routine, 'project1.pro'
   Resolve_Routine, 'ReconKernel.pro'
   Resolve_Routine, 'refresh.pro'
   Resolve_Routine, 'ROI_Cleanup.pro'
   Resolve_Routine, 'SaveTAC.pro'
   Resolve_Routine, 'Set_Frame.pro'
   Resolve_Routine, 'Set_Slice.pro'
   Resolve_All
   Save, /Routines, File='roi.sav'
END

and that too did not work:
Error message = IDL> .compile make_roi_make.pro
% Compiled module: MAKE_ROI_MAKE.
IDL> .run make_roi_make.pro
% Compiled module: MAKE_ROI_MAKE.
IDL> make_roi_make
% Attempt to call undefined procedure/function: 'BACKPROJECT.PRO'.
% Execution halted at: MAKE_ROI_MAKE       2
  /home/karthik/ROI/30Apr2003/make_roi_make.pro
%                      $MAIN$

Can anyone point out what I am doing wrong? When I make a project file
with IDLDE things work. Using Emacs and IDLWAVE things do not
work. The code is rather long and I broke into individual files each
with one procedure or function.

IDL 5.6 on Redhat Linux 2.4.20-8

Thanks in advance,

Karthik.

2. Q: Accessing memory in the 8751 family.....

3. Invoking SAS programs from within SAS programs FLUFF

4. SQL-Server reads using ADO.net creates locks

5. Launching a Program from within a SAS program

6. Notes for Linux

7. Invoking SAS programs from within SAS programs

8. unsubscrie

9. Please help: What is a data logging program in real time programming in C/C++?

10. Macro to open a std. header file within C/C++ code

11. unzip a zip file within a C++ code