-
How to open IE using win32
Hi,
Can u help me solving the problem.
I have created a window using win32. in that window handled a message WM_CREATE where i created another chiled window which is a rich edit control.
now i want to write the program so as when i type any thing like www.msn.com or any url it should be converted to and highlighted url string.
and clicking on the url which is in the richedit control the internet explorer should open with the url.
since i am new to win32 please write the code so that i can relate to.
thanks and regards,
Bidesh Mukherjee,
-
put the typed in a string str say and run this :
str.find( ".com")
to get the location of first .com , same for .net , .org , make a couple seraches or use this :
str.find_first_of() to check them all one after second ,,
the rest is to get first space before and after the place of .com and then hilight this location .
about opening IE , the easiest method without API is to shell it ,
system("SHELL IE_PATH URL");
but care about this : don't use variables into system() command , this will be better :
myshell = "SHELL IE_PATH URL";
system(myshell);
-
the following api will open IE with the URL www.msn.com
ShellExecute(0,"open","http://www.msn.com",0,0,SW_SHOW);
-
Thanks amadhy & Ivan as i am able to open the url if i mentioned in the shellexecute api. but i can not retrieve the url from the rich edit control. i tried to handle WM_LBUTTON message but as soon as i click or even move the mouse in the rich edit control the WM_LBUTTON message gets fired. where as i want to handle WM_LBUTTON message when the the mouse clicked on the url exists in the rich edit control
-
If you're using a richedit control for users to write an url then simply process WM_GETTEXT message to retrieve the url.
-
And, you might make it a simple edit box instead. Rich edit controls are more for font control / coloring. You cant mix fonts in a standard one (you can set it repeatedly, but it does all the text inside), but if all it has is a url, you probably don't need to.
Similar Threads
-
By Dan Dubinsky in forum java.announcements
Replies: 0
Last Post: 06-27-2002, 09:02 PM
-
By Anonymous in forum Open Source
Replies: 0
Last Post: 06-08-2002, 07:51 PM
-
By Anonymous in forum Open Source
Replies: 0
Last Post: 05-25-2002, 01:53 AM
-
By Anonymous in forum Open Source
Replies: 0
Last Post: 05-12-2002, 09:05 PM
-
By Anonymous in forum Open Source
Replies: 0
Last Post: 01-29-2002, 09:41 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Development Centers
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center
|