Click here to Skip to main content
12,397,244 members (63,828 online)

C / C++ / MFC

 
AnswerRe: Is there a reason you would initialise variables like this? Pin
Malli_S25-Jul-12 20:58
memberMalli_S25-Jul-12 20:58 
QuestionShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11124-Jul-12 7:31
memberAndraw11124-Jul-12 7:31 
QuestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
DavidCrow24-Jul-12 8:06
memberDavidCrow24-Jul-12 8:06 
AnswerRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11124-Jul-12 8:13
memberAndraw11124-Jul-12 8:13 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
enhzflep24-Jul-12 8:28
memberenhzflep24-Jul-12 8:28 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11124-Jul-12 8:51
memberAndraw11124-Jul-12 8:51 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
enhzflep24-Jul-12 9:07
memberenhzflep24-Jul-12 9:07 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11124-Jul-12 9:45
memberAndraw11124-Jul-12 9:45 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
enhzflep24-Jul-12 9:58
memberenhzflep24-Jul-12 9:58 
AnswerRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
TopCoder2324-Jul-12 10:04
memberTopCoder2324-Jul-12 10:04 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Richard MacCutchan24-Jul-12 11:09
mvpRichard MacCutchan24-Jul-12 11:09 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
TopCoder2324-Jul-12 23:37
memberTopCoder2324-Jul-12 23:37 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11125-Jul-12 5:31
memberAndraw11125-Jul-12 5:31 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
TopCoder2325-Jul-12 6:49
memberTopCoder2325-Jul-12 6:49 
The code below works and launches a helpfile in Windws 7.


#include <Windows.h>
#include <tchar.h>
#include <iostream.h>
 
int main()
{ 
 
	  SHELLEXECUTEINFO sei = {0};
      sei.cbSize = sizeof(SHELLEXECUTEINFO);
      sei.lpVerb = _T("open");
      sei.lpFile = _T("C:\\windows\\help.CHM");
      sei.fMask = SEE_MASK_INVOKEIDLIST;
      sei.nShow = SW_SHOWDEFAULT;
 
	  DWORD exitCode;
      int RetVal = GetExitCodeProcess(sei.hProcess, &exitCode);
      cout<<"Errorcode "<<RetVal<<" \n";
 

      // Open up the open as window
      if (ShellExecuteEx(&sei) == FALSE)
      {
 
		switch(RetVal)
		{
			case ERROR_FILE_NOT_FOUND:
			//AfxMessageBox("The specified file was not found.");
			break;
 
			case ERROR_PATH_NOT_FOUND:
			//AfxMessageBox("The specified path was not found.");
			break;
 
			case ERROR_ACCESS_DENIED:
			//AfxMessageBox("Access to the specified file is denied.");
			break;
		}
		
        return FALSE;
      }
 
	 
	return 0;
}


modified 25-Jul-12 13:42pm.

GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11125-Jul-12 9:51
memberAndraw11125-Jul-12 9:51 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11125-Jul-12 10:28
memberAndraw11125-Jul-12 10:28 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann25-Jul-12 7:23
memberCharles Oppermann25-Jul-12 7:23 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11125-Jul-12 9:55
memberAndraw11125-Jul-12 9:55 
SuggestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann26-Jul-12 3:39
memberCharles Oppermann26-Jul-12 3:39 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11126-Jul-12 4:35
memberAndraw11126-Jul-12 4:35 
SuggestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann26-Jul-12 6:04
memberCharles Oppermann26-Jul-12 6:04 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11126-Jul-12 6:56
memberAndraw11126-Jul-12 6:56 
GeneralRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Andraw11126-Jul-12 5:54
memberAndraw11126-Jul-12 5:54 
SuggestionRe: ShellExecute() launch .CHM and PDF file not work in Window 7 Pin
Charles Oppermann25-Jul-12 6:59
memberCharles Oppermann25-Jul-12 6:59 
QuestionHow to test firewire communication using C program ? Pin
Code_Demon_198524-Jul-12 4:58
memberCode_Demon_198524-Jul-12 4:58 
GeneralRe: How to test firewire communication using C program ? Pin
CPallini24-Jul-12 6:35
mvpCPallini24-Jul-12 6:35 
QuestionHow to Undo drawing a line in MFC.? Pin
mbatra3124-Jul-12 1:02
membermbatra3124-Jul-12 1:02 
AnswerRe: How to Undo drawing a line in MFC.? Pin
Eugen Podsypalnikov24-Jul-12 3:14
memberEugen Podsypalnikov24-Jul-12 3:14 
AnswerRe: How to Undo drawing a line in MFC.? Pin
Alan Balkany24-Jul-12 4:02
memberAlan Balkany24-Jul-12 4:02 
GeneralSDI application with 3 views [SOLVED] Pin
ekinnh23-Jul-12 22:23
memberekinnh23-Jul-12 22:23 
GeneralRe: SDI application with 3 views Pin
Eugen Podsypalnikov24-Jul-12 0:06
memberEugen Podsypalnikov24-Jul-12 0:06 
GeneralRe: SDI application with 3 views Pin
Eugen Podsypalnikov24-Jul-12 0:17
memberEugen Podsypalnikov24-Jul-12 0:17 
GeneralRe: SDI application with 3 views Pin
Mohibur Rashid25-Jul-12 14:45
memberMohibur Rashid25-Jul-12 14:45 
GeneralRe: SDI application with 3 views Pin
Vaclav_Sal25-Jul-12 16:51
memberVaclav_Sal25-Jul-12 16:51 
GeneralRe: SDI application with 3 views Pin
ekinnh26-Jul-12 18:13
memberekinnh26-Jul-12 18:13 
GeneralRe: SDI application with 3 views Pin
Vaclav_Sal27-Jul-12 2:42
memberVaclav_Sal27-Jul-12 2:42 
GeneralRe: SDI application with 3 views Pin
ekinnh31-Jul-12 22:13
memberekinnh31-Jul-12 22:13 
GeneralRe: SDI application with 3 views Pin
sunilkpv26-Jul-12 2:09
membersunilkpv26-Jul-12 2:09 
Question[Hook HW interrupts in flat mode with DOS32/A] Pin
liaoo23-Jul-12 16:42
memberliaoo23-Jul-12 16:42 
AnswerRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
enhzflep23-Jul-12 19:01
memberenhzflep23-Jul-12 19:01 
GeneralRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
liaoo23-Jul-12 19:47
memberliaoo23-Jul-12 19:47 
GeneralRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
enhzflep23-Jul-12 20:23
memberenhzflep23-Jul-12 20:23 
GeneralRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
liaoo23-Jul-12 22:02
memberliaoo23-Jul-12 22:02 
AnswerRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
TopCoder2323-Jul-12 20:10
memberTopCoder2323-Jul-12 20:10 
GeneralRe: [Hook HW interrupts in flat mode with DOS32/A] Pin
liaoo23-Jul-12 22:05
memberliaoo23-Jul-12 22:05 
QuestionMSDN 2010, scanf_s Pin
mrby12323-Jul-12 7:13
membermrby12323-Jul-12 7:13 
AnswerRe: MSDN 2010, scanf_s Pin
Albert Holguin23-Jul-12 7:26
memberAlbert Holguin23-Jul-12 7:26 
AnswerRe: MSDN 2010, scanf_s Pin
CPallini23-Jul-12 22:12
mvpCPallini23-Jul-12 22:12 
GeneralProgrammatically setting power manager suspend timeouts in Windows CE5.0 [SOLVED] Pin
SidProgrammer22-Jul-12 21:21
memberSidProgrammer22-Jul-12 21:21 
GeneralRe: Programmatically setting power manager suspend timeouts in Windows CE5.0 Pin
Richard MacCutchan22-Jul-12 21:45
mvpRichard MacCutchan22-Jul-12 21:45 

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.160721.1 | Last Updated 25 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid