Click here to Skip to main content
14,692,178 members
Home » Discussions » C / C++ / MFC
   

C / C++ / MFC

 
QuestionShellExecute open Pin
_Flaviu4-Jun-19 23:28
Member_Flaviu4-Jun-19 23:28 
AnswerRe: ShellExecute open Pin
Richard MacCutchan5-Jun-19 0:01
mveRichard MacCutchan5-Jun-19 0:01 
GeneralRe: ShellExecute open Pin
_Flaviu5-Jun-19 0:44
Member_Flaviu5-Jun-19 0:44 
GeneralRe: ShellExecute open Pin
Richard MacCutchan5-Jun-19 4:38
mveRichard MacCutchan5-Jun-19 4:38 
GeneralRe: ShellExecute open Pin
Richard MacCutchan5-Jun-19 22:05
mveRichard MacCutchan5-Jun-19 22:05 
GeneralRe: ShellExecute open Pin
_Flaviu6-Jun-19 1:24
Member_Flaviu6-Jun-19 1:24 
GeneralRe: ShellExecute open Pin
Richard MacCutchan6-Jun-19 2:55
mveRichard MacCutchan6-Jun-19 2:55 
GeneralRe: ShellExecute open Pin
_Flaviu6-Jun-19 3:52
Member_Flaviu6-Jun-19 3:52 
I have tried this:
HRESULT hr = E_FAIL;
hr = CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE);
if (SUCCEEDED(hr))
{
    HINSTANCE hInstance = ShellExecute(AfxGetMainWnd()->GetSafeHwnd(), NULL, sPath + _T("\\") + sText, NULL, NULL, SW_SHOWNORMAL);
    if (reinterpret_cast<int>(hInstance) <= 32)// Could not start application
        ::SendMessage(theApp.m_pMainWnd->GetSafeHwnd(), WM_SETMESSAGESTRING, 0, (LPARAM)(LPCTSTR)GetDocument()->FormatHinstance(hInstance));
}
CoUninitialize();

same behavior … that "How do you want to open this file" is still present when I try to start an image file ...
GeneralRe: ShellExecute open Pin
Richard MacCutchan6-Jun-19 3:56
mveRichard MacCutchan6-Jun-19 3:56 
GeneralRe: ShellExecute open Pin
_Flaviu6-Jun-19 7:45
Member_Flaviu6-Jun-19 7:45 
GeneralRe: ShellExecute open Pin
Richard MacCutchan6-Jun-19 4:01
mveRichard MacCutchan6-Jun-19 4:01 
AnswerRe: ShellExecute open Pin
Eddy Vluggen5-Jun-19 2:10
professionalEddy Vluggen5-Jun-19 2:10 
GeneralRe: ShellExecute open Pin
_Flaviu5-Jun-19 20:52
Member_Flaviu5-Jun-19 20:52 
AnswerRe: ShellExecute open Pin
jschell8-Jun-19 5:42
Memberjschell8-Jun-19 5:42 
GeneralRe: ShellExecute open Pin
_Flaviu10-Jun-19 21:47
Member_Flaviu10-Jun-19 21:47 
GeneralRe: ShellExecute open Pin
Richard MacCutchan10-Jun-19 23:39
mveRichard MacCutchan10-Jun-19 23:39 
GeneralRe: ShellExecute open Pin
jschell15-Jun-19 4:14
Memberjschell15-Jun-19 4:14 
QuestionDevice Running Windows CE 6.0 Pin
Member 142210414-Jun-19 18:08
MemberMember 142210414-Jun-19 18:08 
AnswerRe: Device Running Windows CE 6.0 Pin
Victor Nijegorodov4-Jun-19 21:27
MemberVictor Nijegorodov4-Jun-19 21:27 
AnswerRe: Device Running Windows CE 6.0 Pin
Richard MacCutchan4-Jun-19 22:04
mveRichard MacCutchan4-Jun-19 22:04 
AnswerRe: Device Running Windows CE 6.0 Pin
CPallini4-Jun-19 23:28
mveCPallini4-Jun-19 23:28 
Questionhow i can disable key from keyboard of computer using C language Pin
Member 1447157029-May-19 7:45
MemberMember 1447157029-May-19 7:45 
AnswerRe: how i can disable key from keyboard of computer using C language Pin
Victor Nijegorodov29-May-19 9:12
MemberVictor Nijegorodov29-May-19 9:12 
AnswerRe: how i can disable key from keyboard of computer using C language Pin
leon de boer31-May-19 18:10
Memberleon de boer31-May-19 18:10 
AnswerRe: how i can disable key from keyboard of computer using C language Pin
jschell2-Jun-19 9:42
Memberjschell2-Jun-19 9:42 

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.