Click here to Skip to main content
12,349,778 members (28,739 online)

C / C++ / MFC

 
GeneralRe: icon on button not displayed in XP. Pin
Richard MacCutchan11-Feb-13 0:35
mvpRichard MacCutchan11-Feb-13 0:35 
GeneralRe: icon on button not displayed in XP. Pin
VCProgrammer11-Feb-13 20:29
groupVCProgrammer11-Feb-13 20:29 
GeneralRe: icon on button not displayed in XP. Pin
Richard MacCutchan11-Feb-13 22:13
mvpRichard MacCutchan11-Feb-13 22:13 
GeneralRe: icon on button not displayed in XP. Pin
Richard MacCutchan12-Feb-13 9:37
mvpRichard MacCutchan12-Feb-13 9:37 
GeneralRe: icon on button not displayed in XP. Pin
VCProgrammer12-Feb-13 19:59
groupVCProgrammer12-Feb-13 19:59 
QuestionShellExecute Problem Pin
LFK_Michael4-Feb-13 22:56
memberLFK_Michael4-Feb-13 22:56 
AnswerRe: ShellExecute Problem Pin
Richard MacCutchan5-Feb-13 0:00
mvpRichard MacCutchan5-Feb-13 0:00 
GeneralRe: ShellExecute Problem Pin
LFK_Michael5-Feb-13 0:16
memberLFK_Michael5-Feb-13 0:16 
void StartEXE (String^ path)
{
TCHAR prog[] = TEXT("C:\\...\\...."); // Programpath

string p ;
MarshalString(path, p);
std::string str= p;
TCHAR *param=new TCHAR[str.size()+1];
param[str.size()]=0;
 
const TCHAR open[] = TEXT("runas")
ShellExecute( NULL, open, prog, param, NULL, SW_SHOWNORMAL );
}
 
void MarshalString ( String ^ s, string& os )
        {
        using namespace Runtime::InteropServices;
        const char* chars =
        (const char*)(Marshal::StringToHGlobalAnsi(s)).ToPointer();
        os = chars;
        Marshal::FreeHGlobal(IntPtr((void*)chars));
        }

This is the code i use. I call StartEXE with a String like C:\\test.txt , the programmpath is fix in the code.
The Programm i want to open opens but it don´t open the path.
This happens only by one Programm, if i want to open another programm this code works.
Any Ideas?
GeneralRe: ShellExecute Problem Pin
Richard MacCutchan5-Feb-13 0:26
mvpRichard MacCutchan5-Feb-13 0:26 
SuggestionRe: ShellExecute Problem Pin
DavidCrow5-Feb-13 2:17
memberDavidCrow5-Feb-13 2:17 
AnswerRe: ShellExecute Problem Pin
Marius Bancila5-Feb-13 1:05
memberMarius Bancila5-Feb-13 1:05 
GeneralRe: ShellExecute Problem Pin
LFK_Michael5-Feb-13 3:15
memberLFK_Michael5-Feb-13 3:15 
GeneralRe: ShellExecute Problem Pin
Marius Bancila5-Feb-13 9:28
memberMarius Bancila5-Feb-13 9:28 
GeneralRe: ShellExecute Problem Pin
LFK_Michael5-Feb-13 12:03
memberLFK_Michael5-Feb-13 12:03 
AnswerRe: ShellExecute Problem Pin
Albert Holguin5-Feb-13 14:35
memberAlbert Holguin5-Feb-13 14:35 
Questionhow to get private key from a file (not from a keystore) to sign data ? Pin
IICTECH4-Feb-13 19:12
memberIICTECH4-Feb-13 19:12 
AnswerRe: how to get private key from a file (not from a keystore) to sign data ? Pin
Richard MacCutchan4-Feb-13 22:20
mvpRichard MacCutchan4-Feb-13 22:20 
GeneralRe: how to get private key from a file (not from a keystore) to sign data ? Pin
IICTECH4-Feb-13 23:44
memberIICTECH4-Feb-13 23:44 
GeneralRe: how to get private key from a file (not from a keystore) to sign data ? Pin
Richard MacCutchan4-Feb-13 23:58
mvpRichard MacCutchan4-Feb-13 23:58 
GeneralRe: how to get private key from a file (not from a keystore) to sign data ? Pin
Graham Breach5-Feb-13 3:57
memberGraham Breach5-Feb-13 3:57 
QuestionPop up window from a dialog based application Pin
Member 80516113-Feb-13 23:46
memberMember 80516113-Feb-13 23:46 
AnswerRe: Pop up window from a dialog based application Pin
Richard MacCutchan4-Feb-13 0:21
mvpRichard MacCutchan4-Feb-13 0:21 
GeneralRe: Pop up window from a dialog based application Pin
Member 80516114-Feb-13 0:55
memberMember 80516114-Feb-13 0:55 
GeneralRe: Pop up window from a dialog based application Pin
Richard MacCutchan4-Feb-13 2:34
mvpRichard MacCutchan4-Feb-13 2:34 
GeneralRe: Pop up window from a dialog based application Pin
Member 80516114-Feb-13 19:19
memberMember 80516114-Feb-13 19:19 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 22 Jun 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid