remarknibor wrote:
> Thanks for the advice. Everything seems to be working well. My code 
> is below. My only problem is how to open Notepad with a pre-existing 
> (blank) file that I've created. More simulating keypresses? Or is 
> there a way of doing it when CreateProcess is used?
> 
> 
>     STARTUPINFO si;
>     PROCESS_INFORMATION pi;
> 
>     DWORD dwCode = 0;
>     HWND hwnd;
>     
>     ZeroMemory(&si, sizeof(STARTUPINFO));
> 
>     si.cb = sizeof(STARTUPINFO);
>     si.dwFlags = STARTF_USESHOWWINDOW;
>     si.wShowWindow = SW_SHOWNORMAL;
> 
>     int i;
> 
>     if(CreateProcess(NULL, // No module name (use command line)
>                      "notepad.exe", // The command line to be executed

notepad.exe SomeExistingFile.txt


-- 
Thomas Hruska
CubicleSoft President
Ph: 517-803-4197

*NEW* MyTaskFocus 1.1
Get on task.  Stay on task.

http://www.CubicleSoft.com/MyTaskFocus/

Reply via email to