Page principale | Hiérarchie des classes | Liste par ordre alphabétique | Liste des composants | Liste des fichiers | Composants | Déclarations | Pages associées

MyWindowCtrl.h

Aller à la documentation de ce fichier.
00001 #if !defined(AFX_MYTITLE_H__576943B9_AFCC_4E19_837F_D8A5CFCBDFA1__INCLUDED_)
00002 #define AFX_MYTITLE_H__576943B9_AFCC_4E19_837F_D8A5CFCBDFA1__INCLUDED_
00003 
00004 #if _MSC_VER > 1000
00005 #pragma once
00006 #endif // _MSC_VER > 1000
00007 
00008 // *************************************************************************************
00009 
00010 typedef enum _ETypeControl
00011 {
00012         control_nothing=-1,control_check,control_button
00013 } ETypeControl; 
00014 
00015 class CMyEmulatedControl
00016 {
00017         public:
00018                 ETypeControl type;
00019                 int dx;
00020                 int dy;
00021                 BOOL state,pushed;
00022                 HBITMAP hBitmapOn,hBitmapOff;
00023                 int idCtrl;
00024 
00025                 CMyEmulatedControl()
00026                 {
00027                         type=control_nothing;
00028                         dx=-1;
00029                         dy=-1;
00030                         state=FALSE;
00031                         pushed=FALSE;
00032                         hBitmapOn=hBitmapOff;
00033                         idCtrl = -1;
00034                 }
00035 
00036                 void operator=(CMyEmulatedControl &source)
00037                 {
00038                         type = source.type;
00039                         dx = source.dx;
00040                         dy = source.dy;
00041                         state = source.state;
00042                         pushed = source.pushed;
00043                         hBitmapOn = source.hBitmapOn;
00044                         hBitmapOff = source.hBitmapOff;
00045                         idCtrl = source.idCtrl;
00046                 }               
00047 };
00048 
00049 // *************************************************************************************
00050 
00051 #include "MyList.h"
00052 #include "MyControl.h"
00053 
00054 class CMyWindow : public CMyControl
00055 {
00056         public:
00057                 BOOL m_mbClickDown;
00058                 CMyList<CMyEmulatedControl> m_titleControls;
00059         
00060         public:
00061                 CMyWindow();
00062                 virtual ~CMyWindow();
00063                 void operator=	(HWND hWnd);
00064 
00065                 void NcTitlePaint       (UINT message, WPARAM wParam, LPARAM lParam);
00066 
00067                 int  AddTitleCheck      (long idCtrl,int deltaX,int deltaY,int idBitmapOn,int idBitmapOff);
00068                 int  AddTitleButton     (long idCtrl,int deltaX,int deltaY,int idBitmapOn,int idBitmapOff);
00069                 
00070                 BOOL SetTitleCheckState(long idCtrl,BOOL pushed);
00071 
00072                 void DeleteTitleControls();
00073 
00074                 void CalculateTitleCaptionTextRect(RECT *prc);
00075                 int  GetTitleButtonNumber(POINT *p);
00076                 BOOL IsTitleCloseBoxVisible();
00077                 BOOL ScreenToTitleClient(POINT *pt);
00078 
00079 };
00080 
00081 #endif // !defined(AFX_MYTITLE_H__576943B9_AFCC_4E19_837F_D8A5CFCBDFA1__INCLUDED_)

Généré le Thu Apr 8 18:58:43 2004 pour SFC par doxygen 1.3.6