i hope you want to automate the a scenario where
you copy file name in clipboard and want to open that file in notepad wthout human interaction.
is it your requirement.
if so reply so that i can help you.
i think above steps may be not enough for your requirements, if you have the same requirements as i mentioned above reply then following steps are enough for your goal.
1. FindWindowEx to find the notepad mentioned above.
2. Use SetCursor and mouse_event APIs to create a automated click on the menu File.
3. Generate anotherClick to get open from the menu.
4. GetWindowFromPoint API to get the handle of the open Window.
5. Get the handle of open window, from which you can find Edit for file input.
6. Get the handle of the edit as mentioned above code and set text to the edit as mentioned above code.
I am wondering if you have a derived CDialog
Class and call the default CDialog class thru a
intializer list passing the nidTemplate would
that create a Window handle ...m_hWnd and in that case the only reason to call
::Create is to make it modless
The CDialog constructer with no paramters e.g. CDialog() is meant for modeless
The empty CDialog() constructor is not "meant for modeless". The CDialog could potentially be modal if DoModal() is called. Modality is not directly related to the constructor.
Later The Create with the nidTemplate Creates the or Attaches the Window
Yes, this is correct.
for Modal the CDialog Constructer with the resource id Creates or Attaches the Window
the Window is alive DoModal just Displays
No, this is incorrect. Take for example:
<pre>CDialog Dlg(IDD_ABOUTBOX,this);</pre><br /><br />
All you are doing here is allocating the CDialog object and assigning the template resource ID. The window handle will be NULL until it is created.<br /><br />
Best Wishes,<br />
Last Visit: 31-Dec-99 19:00 Last Update: 29-Nov-23 2:03