Click here to Skip to main content
15,887,027 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionVisio Symbols in your Application. Pin
Mike Doner11-Mar-13 14:28
Mike Doner11-Mar-13 14:28 
AnswerRe: Visio Symbols in your Application. Pin
dusty_dex11-Mar-13 15:23
dusty_dex11-Mar-13 15:23 
GeneralRe: Visio Symbols in your Application. Pin
Mike Doner13-Mar-13 2:42
Mike Doner13-Mar-13 2:42 
GeneralRe: Visio Symbols in your Application. Pin
dusty_dex13-Mar-13 4:48
dusty_dex13-Mar-13 4:48 
Questionpassing arguments Pin
peoria12311-Mar-13 8:17
peoria12311-Mar-13 8:17 
AnswerRe: passing arguments Pin
Jochen Arndt11-Mar-13 9:13
professionalJochen Arndt11-Mar-13 9:13 
GeneralRe: passing arguments Pin
peoria12312-Mar-13 8:42
peoria12312-Mar-13 8:42 
AnswerRe: passing arguments Pin
Jochen Arndt12-Mar-13 9:03
professionalJochen Arndt12-Mar-13 9:03 
I don't understand where the problem is. Just create a string with the file names from your browse controls and pass this string as parameters to ShellExecute(). When creating the string, separate the file names by spaces and quote them using double quotes when they contain spaces:
C++
void CMyClass::AppendFileName(CString& str, LPCTSTR lpszFileName) const
{
    bool bMustQuote = _tcschr(lpszFileName, _T(' ')) != NULL;
    if (!str.IsEmpty())
        str += _T(' ');
    if (bMustQuote)
        str += _T('"');
    str += lpszFileName;
    if (bMustQuote)
        str += _T('"');
}
void CMyClass::ShellExecute()
{
    CString strParameters;
    CString strFileName;
    // Get file names from browse controls and append them
    strFileName = GetNameFromBrowseControl1();
    AppendFileName(strParameters, strFileName.GetString());
    // Repeat this for all browse controls
    
    // Pass strParameters to ShellExecute()
    ShellExecute(NULL, _T("open"), _T("myfile.exe"), strParameters.GetString(), NULL, SW_SHOWNORMAL);
}

SuggestionRe: passing arguments Pin
David Crow12-Mar-13 9:44
David Crow12-Mar-13 9:44 
Questionhow can update .properties file Pin
venkatesh5286710-Mar-13 21:46
venkatesh5286710-Mar-13 21:46 
AnswerRe: how can update .properties file Pin
Richard MacCutchan10-Mar-13 23:30
mveRichard MacCutchan10-Mar-13 23:30 
GeneralRe: how can update .properties file Pin
venkatesh5286711-Mar-13 19:51
venkatesh5286711-Mar-13 19:51 
GeneralRe: how can update .properties file Pin
Richard MacCutchan11-Mar-13 22:30
mveRichard MacCutchan11-Mar-13 22:30 
QuestionHow to Resize Static Window Objects Pin
Richard Andrew x6410-Mar-13 16:34
professionalRichard Andrew x6410-Mar-13 16:34 
AnswerRe: How to Resize Static Window Objects Pin
Richard MacCutchan10-Mar-13 23:29
mveRichard MacCutchan10-Mar-13 23:29 
GeneralRe: How to Resize Static Window Objects Pin
Richard Andrew x6411-Mar-13 2:13
professionalRichard Andrew x6411-Mar-13 2:13 
GeneralRe: How to Resize Static Window Objects Pin
Richard MacCutchan11-Mar-13 2:47
mveRichard MacCutchan11-Mar-13 2:47 
QuestionWhy moniker? Pin
Vaclav_10-Mar-13 5:46
Vaclav_10-Mar-13 5:46 
AnswerRe: Why moniker? Pin
dusty_dex10-Mar-13 6:45
dusty_dex10-Mar-13 6:45 
GeneralRe: Why moniker? Pin
Vaclav_10-Mar-13 7:25
Vaclav_10-Mar-13 7:25 
GeneralRe: Why moniker? Pin
dusty_dex10-Mar-13 7:32
dusty_dex10-Mar-13 7:32 
Joke[Challenge/Puzzle] Implement reinterpret_cast Pin
MicroVirus10-Mar-13 3:55
MicroVirus10-Mar-13 3:55 
GeneralRe: [Challenge/Puzzle] Implement reinterpret_cast Pin
Richard MacCutchan10-Mar-13 8:07
mveRichard MacCutchan10-Mar-13 8:07 
GeneralRe: [Challenge/Puzzle] Implement reinterpret_cast Pin
MicroVirus10-Mar-13 10:57
MicroVirus10-Mar-13 10:57 
GeneralRe: [Challenge/Puzzle] Implement reinterpret_cast Pin
Brandon-X1200010-Mar-13 11:32
Brandon-X1200010-Mar-13 11:32 

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.