home *** CD-ROM | disk | FTP | other *** search
/ Windows Graphics Programming / Feng_Yuan_Win32_GDI_DirectX.iso / Samples / Chapt_17 / ImagePrint / imageview.h < prev    next >
Encoding:
C/C++ Source or Header  |  2000-05-24  |  1.6 KB  |  41 lines

  1. //-----------------------------------------------------------------------------------//
  2. //              Windows Graphics Programming: Win32 GDI and DirectDraw               //
  3. //                             ISBN  0-13-086985-6                                   //
  4. //                                                                                   //
  5. //  Written            by  Yuan, Feng                             www.fengyuan.com   //
  6. //  Copyright (c) 2000 by  Hewlett-Packard Company                www.hp.com         //
  7. //  Published          by  Prentice Hall PTR, Prentice-Hall, Inc. www.phptr.com      //
  8. //                                                                                   //
  9. //  FileName   : imageview.h                                                         //
  10. //  Description: KImageCanvas class                                                  //
  11. //  Version    : 1.00.000, May 31, 2000                                              //
  12. //-----------------------------------------------------------------------------------//
  13.  
  14. class KPicture;
  15.  
  16. class KImageCanvas : public KPageCanvas
  17. {
  18.     KPicture * m_pPicture;
  19.  
  20.     void GetWndClassEx(WNDCLASSEX & wc)
  21.     {
  22.         KPageCanvas::GetWndClassEx(wc);
  23.  
  24.         wc.hIcon = LoadIcon(m_hInst, MAKEINTRESOURCE(IDI_PRINT));
  25.     }
  26.  
  27. public:
  28.     
  29.     virtual void UponDrawPage(HDC hDC, const RECT * rcPaint, int width, int height, int pageno);
  30.     
  31.     virtual int OnCommand(int cmd, HWND hWnd);
  32.     
  33.     KImageCanvas(KPicture * pPicture, HBRUSH hBackground) : KPageCanvas(hBackground)
  34.     {
  35.         m_pPicture = pPicture;
  36.     }
  37.  
  38.     ~KImageCanvas();
  39. };
  40.  
  41.