API+keyboard+url

hallo,

I want to make a programm that automatically changes the url of my browser to a specific one. Is there any way to do it with MFC?

An easy solution were just to move the mouse, click in "Location" and enter the url. I know how to move the mouse and click it, but, how can I type the text? I know this must be easy, but Im learning MFC only two weeks.


javiscriptAsked:
Who is Participating?
 
chensuConnect With a Mentor Commented:
::ShellExecute(hWnd, NULL, _T("http://www.experts-exchange.com"), NULL, NULL, SW_SHOWNORMAL);
0
 
javiscriptAuthor Commented:
Adjusted points from 100 to 150
0
 
javiscriptAuthor Commented:
hWnd = Undeclared identifier.
How can I get it?

Sorry, as I said, MFC is new to me! :)
0
 
javiscriptAuthor Commented:
OK, You get the points and I post the question about hwnd as a separate question. Thanks!
0
 
chensuCommented:
hWnd is just a window handle. It can be NULL or your window handle. In a CWnd derived member function, you may use

hWnd = this->GetSafeHwnd();
0
All Courses

From novice to tech pro — start learning today.