Main functions file for CCPDFConverter/XL2PDFConverter application. More...
#include "stdafx.h"
#include "iapi.h"
#include <shellapi.h>
#include <errno.h>
#include <stdio.h>
#include "Helpers.h"
#include <io.h>
Go to the source code of this file.
Defines | |
#define | MAX_ERR 1023 |
Size of error string buffer. | |
Functions | |
bool | ExistsAsFolder (LPCTSTR pPath) |
void | CleanInput () |
void | CenterWindow (HWND hWnd) |
This function will center the window on the screen. | |
UINT_PTR CALLBACK | SaveDlgCallback (HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) |
int APIENTRY | WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) |
Main function. | |
Variables | |
FILE * | fileInput |
Input file pointer. | |
char | cBuffer [MAX_PATH *2+1] |
Initial input buffer. | |
int | nBuffer = 0 |
Length of data in initial buffer. | |
int | nInBuffer = 0 |
Current location in the initial buffer. | |
char | cErr [MAX_ERR+1] |
Error string buffer. | |
const char * | ARGS [] |
Command line options used by GhostScript. |
Main functions file for CCPDFConverter/XL2PDFConverter application.
Definition in file CCPDFConverter.cpp.
void CenterWindow | ( | HWND | hWnd | ) |
This function will center the window on the screen.
hWnd | The window to center |
Definition at line 232 of file CCPDFConverter.cpp.
Referenced by SaveDlgCallback().
void CleanInput | ( | ) |
Reads all the data from the input (so no error will be raised if application ends without sending the data to ghostscript)
Definition at line 221 of file CCPDFConverter.cpp.
References cBuffer, and fileInput.
Referenced by WinMain().
bool ExistsAsFolder | ( | LPCTSTR | pPath | ) |
pPath | Path to test |
Definition at line 87 of file CCPDFConverter.cpp.
UINT_PTR CALLBACK SaveDlgCallback | ( | HWND | hDlg, | |
UINT | uMsg, | |||
WPARAM | wParam, | |||
LPARAM | lParam | |||
) |
hDlg | Handle of the dialog | |
uMsg | ID of the message | |
wParam | First message paramenter | |
lParam | Second message paramenter |
Definition at line 271 of file CCPDFConverter.cpp.
References CenterWindow().
Referenced by WinMain().
int APIENTRY WinMain | ( | HINSTANCE | hInstance, | |
HINSTANCE | hPrevInstance, | |||
LPSTR | lpCmdLine, | |||
int | nCmdShow | |||
) |
Main function.
hInstance | Handle to the current instance | |
hPrevInstance | Handle to the previous running instance (not used) | |
lpCmdLine | Command line (not used) | |
nCmdShow | Initial window visibility and location flag (not used) |
Definition at line 317 of file CCPDFConverter.cpp.
References CanOpenPDFFiles(), cBuffer, cErr, CleanInput(), fileInput, nBuffer, nInBuffer, and SaveDlgCallback().