Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Placing Cursor using CreateProcess

Status
Not open for further replies.

Baral

Technical User
Apr 5, 2001
2
JP
Hi,
From a VC ++ application when i am clicking on a button it is opening a text file in the notepad.(e.g. a.txt in notepad.exe).For this i am using the CreateProcess() as follows.
CreateProcess(NULL,"notepad.exe a.txt", NULL, NULL, TRUE, 0, NULL, "c:\\winnt", &StartupInfo, &ProcessInformation);

It is running succesfully.
But i want the the cursor in the notepad to be positioned in a specific position instead of line number 1.
Pls help me...
I am in big trouble...
Thanks In advance...
Gopinath
 
If your version of notepad supports the GoTo line option from a menu, try sending the WM_COMMAND or WM_MENUSELECT message associated with the menu option to the notepad frame window. Watch the message stream using Spy++ to see what message to send and what parameters to use.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top