code_junkie

How to ask Windows to open an external file based on file association?

Nov 12th, 2011
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. HINSTANCE ShellExecute(
  2. HWND hwnd, // handle to owner window.
  3. LPCTSTR lpOperation, // verb to do, e.g., edit, open, print.
  4. LPCTSTR lpFile, // file to perform verb on.
  5. LPCTSTR lpParameters, // parameters if lpFile is executable, else NULL.
  6. LPCTSTR lpDirectory, // working directory or NULL for current directory.
  7. INT nShowCmd // window mode e.g., SW_HIDE, SW_SHOWNORMAL.
  8. );
Add Comment
Please, Sign In to add comment