Opening a web site from VC++ application
-
Dear Friends, i just thought of opening a Website link from my VC++ application. how to do that can any body help me out plz? i just wanted to know are there any API with help of which i can open a web link? Megha
ShellExecute(0, L"open", L"www.codeproject.com", NULL, NULL, SW_SHOWNORMAL);
- NS -
-
Dear Friends, i just thought of opening a Website link from my VC++ application. how to do that can any body help me out plz? i just wanted to know are there any API with help of which i can open a web link? Megha
See
CHtmlView
andCDHtmlDialog
classes. -
Dear Friends, i just thought of opening a Website link from my VC++ application. how to do that can any body help me out plz? i just wanted to know are there any API with help of which i can open a web link? Megha
draw a sdi or any app but base class should be viewHtml and it has OnInitialUpdate() fun automaticlly change site name only code is: void CMyHtmlAppView::OnInitialUpdate() { CHtmlView::OnInitialUpdate(); Navigate2(_T("msdn.microsoft.com/visualc/"),NULL,NULL); } i think it help u
-
Dear Friends, i just thought of opening a Website link from my VC++ application. how to do that can any body help me out plz? i just wanted to know are there any API with help of which i can open a web link? Megha
Use ShellExecute to open the website in internet explorer in the following way - ShellExecute (0, L"open", L"iexplore.exe", L"www.codeproject.com", NULL, SW_SHOWNORMAL);
-
ShellExecute(0, L"open", L"www.codeproject.com", NULL, NULL, SW_SHOWNORMAL);
- NS -
NS17 wrote:
ShellExecute(0, L"open", L"www.codeproject.com", NULL, NULL, SW_SHOWNORMAL);
No. use
L
extension where you're certain thatUNICODE
is defined. the following should be more secure and extensible code :::ShellExecute(NULL, _T("open"), _T("www.codeproject.com"), NULL, NULL, SW_SHOWNORMAL);
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
Use ShellExecute to open the website in internet explorer in the following way - ShellExecute (0, L"open", L"iexplore.exe", L"www.codeproject.com", NULL, SW_SHOWNORMAL);
NishantB++ wrote:
ShellExecute (0, L"open", L"iexplore.exe", L"www.codeproject.com", NULL, SW_SHOWNORMAL);
nope, for 2 reasons. 1) dont force the user to use internet explorer if he defined firefox (or any other) to be the default browser. 2) don't use the L extension unless you're certain that UNICODE is defined. read my other post[^] about that point.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
draw a sdi or any app but base class should be viewHtml and it has OnInitialUpdate() fun automaticlly change site name only code is: void CMyHtmlAppView::OnInitialUpdate() { CHtmlView::OnInitialUpdate(); Navigate2(_T("msdn.microsoft.com/visualc/"),NULL,NULL); } i think it help u
thank u so much.. it worked.. i m creating one application to make task of filling timesheet bit easier for my team members... thank u once again. Megha
-
NS17 wrote:
ShellExecute(0, L"open", L"www.codeproject.com", NULL, NULL, SW_SHOWNORMAL);
No. use
L
extension where you're certain thatUNICODE
is defined. the following should be more secure and extensible code :::ShellExecute(NULL, _T("open"), _T("www.codeproject.com"), NULL, NULL, SW_SHOWNORMAL);
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
NishantB++ wrote:
ShellExecute (0, L"open", L"iexplore.exe", L"www.codeproject.com", NULL, SW_SHOWNORMAL);
nope, for 2 reasons. 1) dont force the user to use internet explorer if he defined firefox (or any other) to be the default browser. 2) don't use the L extension unless you're certain that UNICODE is defined. read my other post[^] about that point.
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
toxcct wrote:
dont force the user to use internet explorer
I already mentioned that - "open the website in internet explorer " The second reason was only because of C:)PY PASTE. Sorry for that.
but why do you not let the system choose the default browser ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]
-
but why do you not let the system choose the default browser ?
[VisualCalc][Binary Guide][CommDialogs] | [Forums Guidelines]