tags:

views:

71

answers:

1

I want to load a pdf file on the click of a button. In the OnClickButton() implementation I am writing the function which open the PDF file

ShellExecute(0,
             "Open",
             "%s\\HELP\\RiverCADPro_User_Manual.pdf",
             NULL,
             NULL,
             SW_MAXIMIZE);

The above code is not working.What else is to be needed so as to run the above code

A: 

Make your path an absolute path. Maybe the contained %s is meant to be substituted by the beginning of the actual path?

Are you missing some kind of

sprintf(
  szBuffer,
  "%s\\HELP\\RiverCADPro_User_Manual.pdf",
  szBasePath);

in your code?

Frank Bollack