Click here to Skip to main content
15,886,088 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann25-Jul-12 7:23
Charles Oppermann25-Jul-12 7:23 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11125-Jul-12 9:55
Andraw11125-Jul-12 9:55 
SuggestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann26-Jul-12 3:39
Charles Oppermann26-Jul-12 3:39 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11126-Jul-12 4:35
Andraw11126-Jul-12 4:35 
SuggestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann26-Jul-12 6:04
Charles Oppermann26-Jul-12 6:04 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11126-Jul-12 6:56
Andraw11126-Jul-12 6:56 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11126-Jul-12 5:54
Andraw11126-Jul-12 5:54 
SuggestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann25-Jul-12 6:59
Charles Oppermann25-Jul-12 6:59 
Have you initialized COM first? From the remarks section on ShellExecute()[^]:
CoInitializeEx(NULL, COINIT_APARTMENTTHREADED | COINIT_DISABLE_OLE1DDE)

Can you use ShellExecuteEx[^]? ShellExecuteEx is preferable in this case because you'll get better result information.
Andraw111 wrote:
I try to use system() to launch .CHM or PDF file, it works fine in both Window XP and Window 7, but it has MS-DOS black screen there, how can I let MS-DOS not shown?
The system() C runtime function would not be appropriate here, as you are a Win32 application.

Try this, from a command prompt, type start myfile.chm and report on what happens. Same for Runas.
/* Charles Oppermann */
http://weblogs.asp.net/chuckop

QuestionHow to test firewire communication using C program ? Pin
Code_Demon_198524-Jul-12 4:58
Code_Demon_198524-Jul-12 4:58 
GeneralRe: How to test firewire communication using C program ? Pin
CPallini24-Jul-12 6:35
mveCPallini24-Jul-12 6:35 
QuestionHow to Undo drawing a line in MFC.? Pin
mbatra3124-Jul-12 1:02
mbatra3124-Jul-12 1:02 
AnswerRe: How to Undo drawing a line in MFC.? Pin
Eugen Podsypalnikov24-Jul-12 3:14
Eugen Podsypalnikov24-Jul-12 3:14 
AnswerRe: How to Undo drawing a line in MFC.? Pin
Alan Balkany24-Jul-12 4:02
Alan Balkany24-Jul-12 4:02 
GeneralSDI application with 3 views [SOLVED] Pin
ekinnh23-Jul-12 22:23
ekinnh23-Jul-12 22:23 
GeneralRe: SDI application with 3 views Pin
Eugen Podsypalnikov24-Jul-12 0:06
Eugen Podsypalnikov24-Jul-12 0:06 
GeneralRe: SDI application with 3 views Pin
Eugen Podsypalnikov24-Jul-12 0:17
Eugen Podsypalnikov24-Jul-12 0:17 
GeneralRe: SDI application with 3 views Pin
Mohibur Rashid25-Jul-12 14:45
professionalMohibur Rashid25-Jul-12 14:45 
GeneralRe: SDI application with 3 views Pin
Vaclav_25-Jul-12 16:51
Vaclav_25-Jul-12 16:51 
GeneralRe: SDI application with 3 views Pin
ekinnh26-Jul-12 18:13
ekinnh26-Jul-12 18:13 
GeneralRe: SDI application with 3 views Pin
Vaclav_27-Jul-12 2:42
Vaclav_27-Jul-12 2:42 
GeneralRe: SDI application with 3 views Pin
ekinnh31-Jul-12 22:13
ekinnh31-Jul-12 22:13 
GeneralRe: SDI application with 3 views Pin
Sunil P V26-Jul-12 2:09
Sunil P V26-Jul-12 2:09 
Question[Hook HW interrupts in flat mode with DOS32/A] Pin
liaoo23-Jul-12 16:42
liaoo23-Jul-12 16:42 
AnswerRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
enhzflep23-Jul-12 19:01
enhzflep23-Jul-12 19:01 
GeneralRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
liaoo23-Jul-12 19:47
liaoo23-Jul-12 19:47 

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.