Click here to Skip to main content
15,895,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: about Qt4 Pin
CPallini15-Apr-09 0:28
mveCPallini15-Apr-09 0:28 
AnswerRe: about Qt4 Pin
_AnsHUMAN_ 15-Apr-09 0:29
_AnsHUMAN_ 15-Apr-09 0:29 
AnswerRe: about Qt4 Pin
Rajesh R Subramanian15-Apr-09 1:46
professionalRajesh R Subramanian15-Apr-09 1:46 
JokeRe: about Qt4 Pin
CPallini15-Apr-09 2:17
mveCPallini15-Apr-09 2:17 
QuestionOpen a URL with extra information (# character) Pin
lolividalgil14-Apr-09 22:47
lolividalgil14-Apr-09 22:47 
AnswerRe: Open a URL with extra information (# character) Pin
Stuart Dootson14-Apr-09 23:32
professionalStuart Dootson14-Apr-09 23:32 
GeneralRe: Open a URL with extra information (# character) Pin
lolividalgil15-Apr-09 1:59
lolividalgil15-Apr-09 1:59 
GeneralRe: Open a URL with extra information (# character) Pin
Stuart Dootson15-Apr-09 2:19
professionalStuart Dootson15-Apr-09 2:19 
Yes, because start uses ShellExecute or ShellExecuteEx.

However, if you use FindExecutable with the filename of your HTML file, you get back the executable that is registered to handle the open verb. You can then use that with ShellExecute.

For example, FindExecutable (when called on an HTML file) gives this for me (it's Google Chrome):

C:\Documents and Settings\my-user-id\Local Settings\Application Data\Google\Chrome\Application\chrome.exe


So, you can do something like this:

LPCTSTR url = "file:///C:/Documents%20and%20Settings/u404261/Desktop/a.html#plop";

TCHAR path[32768] = {0};
DWORD nChars;
if (SUCCEEDED(PathCreateFromUrl(url, path, &nChars, 0)))
{
   TCHAR execName[32768] = {0};
   if ((int)FindExecutable(path, "c:\\", execName) > 32)  
      ShellExecute(0, "open", execName, url, "c:\\", SW_SHOWNORMAL);
}


We use PathCreateFromUrl to get a Windows path from the URL, as that's what FindExecutable acts on.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

QuestionGetVolumeInformation not giving any information its return error code 123 Pin
chandrakar ashish14-Apr-09 22:00
chandrakar ashish14-Apr-09 22:00 
AnswerRe: GetVolumeInformation not giving any information its return error code 123 [modified] Pin
_AnsHUMAN_ 14-Apr-09 22:32
_AnsHUMAN_ 14-Apr-09 22:32 
GeneralRe: GetVolumeInformation not giving any information its return error code 123 Pin
chandrakar ashish14-Apr-09 22:48
chandrakar ashish14-Apr-09 22:48 
GeneralRe: GetVolumeInformation not giving any information its return error code 123 Pin
_AnsHUMAN_ 14-Apr-09 23:03
_AnsHUMAN_ 14-Apr-09 23:03 
QuestionRe: GetVolumeInformation not giving any information its return error code 123 Pin
David Crow15-Apr-09 3:30
David Crow15-Apr-09 3:30 
AnswerRe: GetVolumeInformation not giving any information its return error code 123 Pin
binyo665-Jun-09 11:46
binyo665-Jun-09 11:46 
QuestionThemes in MFC - pls help Pin
Tomas(cz)14-Apr-09 21:49
Tomas(cz)14-Apr-09 21:49 
QuestionNot able to Debug SetFont in Activex control. Pin
girishog14-Apr-09 21:15
girishog14-Apr-09 21:15 
AnswerRe: Not able to Debug SetFont in Activex control. Pin
KarstenK14-Apr-09 21:33
mveKarstenK14-Apr-09 21:33 
QuestionProblem with Socket Pin
Abhijit D. Babar14-Apr-09 20:51
Abhijit D. Babar14-Apr-09 20:51 
AnswerRe: Problem with Socket Pin
Divyang Mithaiwala14-Apr-09 21:31
Divyang Mithaiwala14-Apr-09 21:31 
AnswerRe: Problem with Socket Pin
KarstenK14-Apr-09 21:36
mveKarstenK14-Apr-09 21:36 
AnswerRe: Problem with Socket Pin
ParagPatel14-Apr-09 21:45
ParagPatel14-Apr-09 21:45 
GeneralRe: Problem with Socket Pin
Abhijit D. Babar14-Apr-09 21:55
Abhijit D. Babar14-Apr-09 21:55 
GeneralRe: Problem with Socket Pin
ThatsAlok14-Apr-09 23:18
ThatsAlok14-Apr-09 23:18 
GeneralRe: Problem with Socket Pin
ParagPatel14-Apr-09 23:22
ParagPatel14-Apr-09 23:22 
GeneralRe: Problem with Socket Pin
Abhijit D. Babar16-Apr-09 19:53
Abhijit D. Babar16-Apr-09 19:53 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.