Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
2.4 KiB

  1. /*******************************************************************************
  2. *
  3. * (C) COPYRIGHT MICROSOFT CORPORATION, 1998
  4. *
  5. * TITLE: PWFRAME.H
  6. *
  7. * VERSION: 1.0
  8. *
  9. * AUTHOR: ShaunIv
  10. *
  11. * DATE: 8/12/1999
  12. *
  13. * DESCRIPTION: Preview window frame declaration
  14. *
  15. *******************************************************************************/
  16. #ifndef __PWFRAME_H_INCLUDED
  17. #define __PWFRAME_H_INCLUDED
  18. #include <windows.h>
  19. class CWiaPreviewWindowFrame
  20. {
  21. private:
  22. // Constants
  23. enum
  24. {
  25. DEFAULT_BORDER_SIZE = 4
  26. };
  27. HWND m_hWnd;
  28. SIZE m_sizeAspectRatio;
  29. SIZE m_sizeDefAspectRatio;
  30. UINT m_nSizeBorder;
  31. HBRUSH m_hBackgroundBrush;
  32. bool m_bEnableStretch;
  33. bool m_bHideEmptyPreview;
  34. LPARAM m_nPreviewAlignment;
  35. private:
  36. // No implementation
  37. CWiaPreviewWindowFrame(void);
  38. CWiaPreviewWindowFrame( const CWiaPreviewWindowFrame & );
  39. CWiaPreviewWindowFrame &operator=( const CWiaPreviewWindowFrame & );
  40. private:
  41. explicit CWiaPreviewWindowFrame( HWND hWnd );
  42. ~CWiaPreviewWindowFrame(void);
  43. static int FillRect( HDC hDC, HBRUSH hBrush, int x1, int y1, int x2, int y2 );
  44. void AdjustWindowSize(void);
  45. void ResizeClientIfNecessary(void);
  46. LRESULT OnCreate( WPARAM, LPARAM lParam );
  47. LRESULT OnSize( WPARAM wParam, LPARAM );
  48. LRESULT OnSetFocus( WPARAM, LPARAM );
  49. LRESULT OnEnable( WPARAM wParam, LPARAM );
  50. LRESULT OnEraseBkgnd( WPARAM wParam, LPARAM );
  51. LRESULT OnSetBitmap( WPARAM wParam, LPARAM lParam );
  52. LRESULT OnSetPreviewMode( WPARAM wParam, LPARAM lParam );
  53. LRESULT OnGetBkColor( WPARAM wParam, LPARAM );
  54. LRESULT OnSetBkColor( WPARAM wParam, LPARAM lParam );
  55. LRESULT OnCommand( WPARAM wParam, LPARAM lParam );
  56. LRESULT OnSetDefAspectRatio( WPARAM wParam, LPARAM lParam );
  57. LRESULT OnGetClientSize( WPARAM, LPARAM );
  58. LRESULT OnGetEnableStretch( WPARAM, LPARAM );
  59. LRESULT OnSetEnableStretch( WPARAM, LPARAM );
  60. LRESULT OnSetBorderSize( WPARAM, LPARAM );
  61. LRESULT OnGetBorderSize( WPARAM, LPARAM );
  62. LRESULT OnHideEmptyPreview( WPARAM, LPARAM );
  63. LRESULT OnSetPreviewAlignment( WPARAM, LPARAM );
  64. public:
  65. static BOOL RegisterClass( HINSTANCE hInstance );
  66. static LRESULT CALLBACK WndProc( HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam );
  67. };
  68. #endif