Accessing a menu from a Console App ??
-
G'Day to all, I am in the process of creating a console application using Visual C++ 2005. This application will start NOTEPAD.EXE then will need to simulate keyboard strokes to access the menu options. I have been able to create the process and run NOTEPAD from my console app but unsure how I now access the menu options. I have started the process by: Process^ p = gcnew Process(); p->StartInfo->FileName = "NOTEPAD.EXE"; p->StartInfo->UseShellExecute = true; p->Start(); I would now assume I would have to use the following namespace: using namespace System::Windows::Forms; But come compile time the above namespace is rejected: error C3083: 'Windows': the symbol to the left of a '::' must be a type Am I on the right track here or is there a better way to achieve what I am trying to do to access an applications menus ?
-
G'Day to all, I am in the process of creating a console application using Visual C++ 2005. This application will start NOTEPAD.EXE then will need to simulate keyboard strokes to access the menu options. I have been able to create the process and run NOTEPAD from my console app but unsure how I now access the menu options. I have started the process by: Process^ p = gcnew Process(); p->StartInfo->FileName = "NOTEPAD.EXE"; p->StartInfo->UseShellExecute = true; p->Start(); I would now assume I would have to use the following namespace: using namespace System::Windows::Forms; But come compile time the above namespace is rejected: error C3083: 'Windows': the symbol to the left of a '::' must be a type Am I on the right track here or is there a better way to achieve what I am trying to do to access an applications menus ?
G'day mate you need to add a reference to System.Windows.Forms to your project Right click the project in VS and select References.... Like I said to you the other day, you can get a HWND from the process object and use Win32 or MFC to send WM_* messages to the notepad window
System.IO.Path.IsPathRooted() does not behave as I would expect