Solved

API+keyboard+url

Posted on 2000-05-13
5
176 Views
Last Modified: 2013-11-20
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.


0
Comment
Question by:javiscript
  • 3
  • 2
5 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 150 total points
ID: 2807474
::ShellExecute(hWnd, NULL, _T("http://www.experts-exchange.com"), NULL, NULL, SW_SHOWNORMAL);
0
 

Author Comment

by:javiscript
ID: 2808053
Adjusted points from 100 to 150
0
 

Author Comment

by:javiscript
ID: 2808054
hWnd = Undeclared identifier.
How can I get it?

Sorry, as I said, MFC is new to me! :)
0
 

Author Comment

by:javiscript
ID: 2808202
OK, You get the points and I post the question about hwnd as a separate question. Thanks!
0
 
LVL 23

Expert Comment

by:chensu
ID: 2808634
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

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
string initialization in java 11 113
move a line in eclipse 3 100
changeXy challenge 13 81
how to use laptop or pad camera in vb.net windows application 2 70
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…

774 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question