Click here to Skip to main content
15,900,973 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to widen the drop down portion of combo box. Pin
Alex@9C16-Sep-09 23:15
Alex@9C16-Sep-09 23:15 
AnswerRe: How to widen the drop down portion of combo box. Pin
«_Superman_»16-Sep-09 23:33
professional«_Superman_»16-Sep-09 23:33 
GeneralRe: How to widen the drop down portion of combo box. Pin
Naveen17-Sep-09 0:24
Naveen17-Sep-09 0:24 
GeneralRe: How to widen the drop down portion of combo box. Pin
«_Superman_»17-Sep-09 0:25
professional«_Superman_»17-Sep-09 0:25 
GeneralRe: How to widen the drop down portion of combo box. Pin
Alex@9C17-Sep-09 1:04
Alex@9C17-Sep-09 1:04 
QuestionStopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari16-Sep-09 22:50
Kushagra Tiwari16-Sep-09 22:50 
AnswerRe: Stopping windows shutdown in C++./MFC? Pin
«_Superman_»16-Sep-09 23:06
professional«_Superman_»16-Sep-09 23:06 
GeneralOT Pin
CPallini16-Sep-09 23:35
mveCPallini16-Sep-09 23:35 
GeneralRe: OT Pin
«_Superman_»16-Sep-09 23:37
professional«_Superman_»16-Sep-09 23:37 
GeneralRe: OT Pin
ThatsAlok16-Sep-09 23:48
ThatsAlok16-Sep-09 23:48 
AnswerRe: Stopping windows shutdown in C++./MFC? Pin
Randor 17-Sep-09 0:27
professional Randor 17-Sep-09 0:27 
GeneralRe: Stopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari17-Sep-09 0:43
Kushagra Tiwari17-Sep-09 0:43 
GeneralRe: Stopping windows shutdown in C++./MFC? Pin
David Crow17-Sep-09 2:18
David Crow17-Sep-09 2:18 
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 

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.