CCPDFExcelAddin/CCPDFExcelAddinObj.cpp File Reference

Implementation of CCCPDFExcelAddinObj. More...

#include "stdafx.h"
#include "XL2PDFExcelAddin.h"
#include "CCPDFExcelAddinObj.h"
#include "CCPrintData.h"
#include "CCRegistry.h"
Include dependency graph for CCPDFExcelAddinObj.cpp:

Go to the source code of this file.

Classes

struct  CellInfo
 Data about a sheet's row or column (page, size, location). More...
struct  PrintPageData
 Page setup information (either horizontal or vertical). More...
struct  PrintCalcData
 Calculated factors for the current PDF printing (either horizontal or vertical). More...

Defines

#define PRODUCT_NAME   _T("Excel to PDF")
 Product name (for error messages).
#define PRINTER_NAME   _T("Excel to PDF Printer")
 Printer name (for error messages).
#define REGISTRY_DATA_PATH   _T("Software\\Cogniview\\Excel to PDF Converter\\Excel Addin")
 Registry path for Addin data.
#define PRINTER_DRIVER_NAME   _T("Excel to PDF Virtual Printer")
 Printer driver name.
#define BUTTON_TAG   _T("XL2PDF Save PDF")
 Excel menu/toolbar tag.
#define FIND_PRINTER_ERROR_MSG   _T("Cannot access the ") PRINTER_NAME
 Find printer error message.
#define PRINTER_ERROR_TITLE   PRODUCT_NAME
 Title for error message dialogs.
#define ACCESS_PRINTER_ERROR_MSG   _T("Error when accessing the ") PRINTER_NAME
 Access printer error message.
#define WORKING_PRINTER_ERROR_MSG   _T("Error when working with the ") PRINTER_NAME
 Working with printer error message.

Typedefs

typedef IDispEventSimpleImpl
< 2, CCCPDFExcelAddinObj,&__uuidof(Office2000::_CommandBarButtonEvents)> 
CommandButtonEvents
 Excel menu item/toolbar button callback definition.

Functions

bool EnableButtons (CComPtr< CommandBarControls > &pControls, bool bEnable)
 Recursively enables or disables the addin buttons in a menu or toolbar.
std::tstring CellName (long nRow, long nColumn)
 Calculate the Excel 'name' for a cell.
INT_PTR CALLBACK ProcessingDlgFunc (HWND hwndDialog, UINT uMsg, WPARAM wParam, LPARAM lParam)
void CenterWindow (HWND hWnd)

Detailed Description

Implementation of CCCPDFExcelAddinObj.

Definition in file CCPDFExcelAddinObj.cpp.


Function Documentation

std::tstring CellName ( long  nRow,
long  nColumn 
)

Calculate the Excel 'name' for a cell.

Parameters:
nRow The row number (1-based)
nColumn The column number (1-based)
Returns:
Excel 'name' for the cell (for example, 'A1' or 'BA128')

Definition at line 628 of file CCPDFExcelAddinObj.cpp.

References tstring.

void CenterWindow ( HWND  hWnd  ) 
Parameters:
hWnd The window to center This function will center the window on the screen

Definition at line 831 of file CCPDFExcelAddinObj.cpp.

bool EnableButtons ( CComPtr< CommandBarControls > &  pControls,
bool  bEnable 
)

Recursively enables or disables the addin buttons in a menu or toolbar.

Parameters:
pControls Interface of command bar to go over
bEnable true to enable the addin buttons, false to disable them
Returns:
true if all when well, false if something happened

Definition at line 519 of file CCPDFExcelAddinObj.cpp.

References BUTTON_TAG.

INT_PTR CALLBACK ProcessingDlgFunc ( HWND  hwndDialog,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam 
)
Parameters:
hwndDialog Handle of dialog
uMsg ID of the message
wParam First message paramenter
lParam Second message paramenter
Returns:
TRUE if the message was handled, FALSE otherwise

Definition at line 821 of file CCPDFExcelAddinObj.cpp.

Referenced by CCCPDFExcelAddinObj::DoPrint().


Generated on Mon Jun 18 12:52:07 2012 for Excel to PDF Converter by doxygen 1.6.1