X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/082e5b985677852db873ed956da8fad5ae5abc4b..ce668f297b03143bc15014a37c12e610c49c6e6b:/include/wx/msw/private.h diff --git a/include/wx/msw/private.h b/include/wx/msw/private.h index fa95062dc0..9e40732a37 100644 --- a/include/wx/msw/private.h +++ b/include/wx/msw/private.h @@ -727,52 +727,6 @@ private: wxDECLARE_NO_COPY_CLASS(GlobalPtrLock); }; -// smart pointer like class using OpenPrinter and ClosePrinter -class WinPrinter -{ -public: - // default ctor - WinPrinter() - { - m_hPrinter = (HANDLE)NULL; - } - - WinPrinter( const wxString& printerName ) - { - Open( printerName ); - } - - ~WinPrinter() - { - Close(); - } - - BOOL Open( const wxString& printerName, LPPRINTER_DEFAULTS pDefault=(LPPRINTER_DEFAULTS)NULL ) - { - Close(); - return OpenPrinter( (LPTSTR)printerName.wx_str(), &m_hPrinter, pDefault ); - } - - BOOL Close() - { - BOOL result = TRUE; - if( m_hPrinter ) - { - result = ClosePrinter( m_hPrinter ); - m_hPrinter = (HANDLE)NULL; - } - return result; - } - - operator HANDLE() { return m_hPrinter; } - operator bool() { return m_hPrinter != (HANDLE)NULL; } - -private: - HANDLE m_hPrinter; - - wxDECLARE_NO_COPY_CLASS(WinPrinter); -}; - // register the class when it is first needed and unregister it in dtor class ClassRegistrar {