Click here to Skip to main content
16,021,041 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Stopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari17-Sep-09 3:18
Kushagra Tiwari17-Sep-09 3:18 
GeneralRe: Stopping windows shutdown in C++./MFC? Pin
David Crow17-Sep-09 3:27
David Crow17-Sep-09 3:27 
QuestionRe: Stopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari17-Sep-09 20:24
Kushagra Tiwari17-Sep-09 20:24 
QuestionRe: Stopping windows shutdown in C++./MFC? Pin
David Crow18-Sep-09 4:18
David Crow18-Sep-09 4:18 
QuestionHow to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 22:32
deadlyabbas16-Sep-09 22:32 
AnswerRe: How to load PDF file on any button click in VC++? Pin
Nuri Ismail16-Sep-09 22:46
Nuri Ismail16-Sep-09 22:46 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 23:12
deadlyabbas16-Sep-09 23:12 
GeneralRe: How to load PDF file on any button click in VC++? Pin
Nuri Ismail17-Sep-09 0:50
Nuri Ismail17-Sep-09 0:50 
Now i will give you an example code which works with Acrobat Reader. But you have to get the path to Acrobat Reader yourself and also form the command line parameters for your need. You can find information about the cmd line parameters of Acrobat Reader here[^].

Here is the example for you:

// You need to find the path to Acrobat Reader.
// For the example i've copied the path from my PC!!!
const CString strAcroPath = _T("C:\\Program Files\\Adobe\\Reader 9.0\\Reader\\AcroRd32.exe");

// You need to for yourm cmd line parameters.
// This is an example so this form will work only with Acrobat Reader!!!
const CString strParameters = _T(" /A \"page=5&zoom=200&pagemode=bookmarks\" ");

// You need to know the path to your help file. Yes this is the easiest part!  ;) 
const CString strFilePath = _T(" \"D:\\Test.pdf\" ");

// Form the cmd line using parameters and help file path
const CString strCmdLine = strParameters + strFilePath;

// Call ShellExecute
ShellExecute(NULL,
	     _T("Open"),
	     strAcroPath,  // Here is the path to Application - Acrobat reader
	     strCmdLine,   // Here are the cmd line arguments
	     NULL,
	     SW_MAXIMIZE);


The code above will work only on systems with Adobe Acrobat Reader installed!!!
If you want to support other readers you have to find information whether they support cmd line parameters and if yes then what is the exact syntax.

I hope this helps! Smile | :)


Nuri Ismail

AnswerRe: How to load PDF file on any button click in VC++? Pin
CPallini16-Sep-09 22:51
mveCPallini16-Sep-09 22:51 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 23:36
deadlyabbas16-Sep-09 23:36 
AnswerRe: How to load PDF file on any button click in VC++? Pin
David Crow17-Sep-09 2:25
David Crow17-Sep-09 2:25 
AnswerRe: How to load PDF file on any button click in VC++? Pin
ThatsAlok16-Sep-09 23:49
ThatsAlok16-Sep-09 23:49 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas17-Sep-09 0:04
deadlyabbas17-Sep-09 0:04 
QuestionAbout Class CImage::GetPixel [modified] Pin
zhong_min16-Sep-09 21:54
zhong_min16-Sep-09 21:54 
AnswerRe: About Class CImage::GetPixel Pin
CPallini16-Sep-09 22:18
mveCPallini16-Sep-09 22:18 
GeneralRe: About Class CImage::GetPixel Pin
zhong_min16-Sep-09 22:44
zhong_min16-Sep-09 22:44 
GeneralRe: About Class CImage::GetPixel Pin
CPallini16-Sep-09 23:32
mveCPallini16-Sep-09 23:32 
QuestionAccess a shared folder form server to client by giving usename ,password in program Pin
ranjithgoud16-Sep-09 21:21
ranjithgoud16-Sep-09 21:21 
AnswerRe: Access a shared folder form server to client by giving usename ,password in program Pin
CPallini16-Sep-09 21:53
mveCPallini16-Sep-09 21:53 
GeneralRe: Access a shared folder form server to client by giving usename ,password in program Pin
ranjithgoud17-Sep-09 1:49
ranjithgoud17-Sep-09 1:49 
AnswerRe: Access a shared folder form server to client by giving usename ,password in program Pin
David Crow17-Sep-09 2:30
David Crow17-Sep-09 2:30 
GeneralRe: Access a shared folder form server to client by giving usename ,password in program Pin
ranjithgoud18-Sep-09 2:44
ranjithgoud18-Sep-09 2:44 
AnswerRe: Access a shared folder form server to client by giving usename ,password in program Pin
David Crow18-Sep-09 4:15
David Crow18-Sep-09 4:15 
Questionbitblt prob Pin
Game-point16-Sep-09 21:14
Game-point16-Sep-09 21:14 
AnswerRe: bitblt prob Pin
CPallini16-Sep-09 21:46
mveCPallini16-Sep-09 21:46 

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.