win/zz_ctrl_panel.h

Go to the documentation of this file.
00001 /* libzzwin
00002  *
00003  * This program is distributed under the GNU General Public License, version 2.
00004  * A copy of this license is included with this source.
00005  *
00006  * Copyright 2000-2006, Toni Thomsson <toni@tonjac.org> 
00007 */
00008 
00009 #ifndef zz_ctrl_panel_h
00010 #define zz_ctrl_panel_h
00011 
00012 #include <cpl.h>
00013 #include <zz_export.h>
00014 
00015 /*
00016         Description:
00017         Basklass för windows kontrollpanel
00018 
00019         Author: 
00020         Toni Thomsson, toni@tonjac.org
00021 
00022         Library:
00023         libzzwin.lib
00024 
00025         Platform:
00026         win32
00027 */
00028 class ZZ_API CzzControlPanel
00029 {
00030 public:
00031 
00032         /*
00033                 Description:
00034                 Skapar en kontrollpanel
00035 
00036                 Remarks:
00037                 Använd ej direkt: subklassa !
00038 
00039                 Throws:
00040                 CzzWinException
00041         */
00042     CzzControlPanel();
00043 
00044     virtual ~CzzControlPanel();    
00045 
00046     /*
00047                 Description: 
00048                 Anropas när användaren dubbelklickar på panelen
00049         
00050                 Remarks: 
00051                 Överlagringsbar, default implementationen gör inte något
00052 
00053                 Returns:
00054                 0 = OK annars fel
00055 
00056                 See Also:
00057                 OnGetCount()
00058         */
00059     virtual LONG OnDblclk( HWND hwndCPl,        // IN, fönsterhandtag
00060                                                         UINT uAppNum,   // IN, dialognummer (första dialogen 0)
00061                                                         LONG lData              // IN, egendefinerat data
00062                                                         ); 
00063         
00064         /*
00065                 Description: 
00066                 Anropas när panelen stängs
00067                 
00068                 Returns:
00069                 0 = OK annars fel
00070 
00071                 Remarks: 
00072                 Överlagringsbar, default implementationen gör inte något
00073         */
00074     virtual LONG OnExit();
00075 
00076         /*
00077                 Description:
00078                 Antal dialoger som finns i kontrollpanelen
00079 
00080                 Remarks:
00081                 Överlagringsbar, default implementationen returnerar 1
00082         */
00083     virtual LONG OnGetCount();
00084 
00085         /*
00086                 Description: 
00087                 Anropas när panelen laddas
00088 
00089                 Returns:
00090                 1 = OK annars fel
00091 
00092                 Remarks: Överlagringsbar, default implementationen gör inte något
00093         */
00094     virtual LONG OnInit();
00095 
00096         /*
00097                 Description: 
00098                 Returnerar info om panelen i strukturen NEWCPLINFO
00099 
00100                 Returns:
00101                 0 = OK annars fel
00102 
00103                 Remarks: 
00104                 Överlagringsbar, default implementationen returnerar följande:
00105                 pInfo->dwSize = sizeof(NEWCPLINFO);
00106                 pInfo->dwFlags = 0;
00107                 pInfo->dwHelpContext = 0;
00108                 pInfo->lData = 0;
00109                 pInfo->hIcon = ::LoadIcon(AfxGetResourceHandle(), MAKEINTRESOURCE(1));
00110                 strcpy( pInfo->szName, "Applet" );
00111                 strcpy( pInfo->szInfo, "Raw Cpl Applet" );
00112                 strcpy( pInfo->szHelpFile, "" );
00113 
00114                 See Also:
00115                 Windows SDK: NEWCPLINFO
00116         */
00117     virtual LONG OnInquire( UINT uAppNum,               // IN, dialognummer 
00118                                                         NEWCPLINFO* pInfo       // UT, infostruktur
00119                                                         ); 
00120 
00121         /*
00122                 Description: 
00123                 Används ej
00124         */
00125     virtual LONG OnSelect( UINT uAppNum,        // IN, dialognummer 
00126                                                         LONG lData              // IN,  egendefinerat data
00127                                                         ); 
00128 
00129         /*
00130                 Description: 
00131                 Anropas när en dialog stängs
00132 
00133                 Returns:
00134                 0 = OK annars fel
00135 
00136                 Remarks: 
00137                 Överlagringsbar, default implementationen returnerar 1
00138                 
00139                 See Also:
00140                 OnExit()
00141         */
00142     virtual LONG OnStop( UINT uAppNum,  // IN, dialognummer 
00143                                                         LONG lData      // IN,  egendefinerat data
00144                                                         ); 
00145 
00146     // Description: Anropas av kontrollpanel hanteraren
00147         // Remarks: Använd ej
00148     static LONG APIENTRY CPlApplet( HWND hwndCPl, 
00149                                                                         UINT  uMsg,
00150                                     LONG lParam1, 
00151                                                                         LONG lParam2
00152                                                                         );
00153 
00154     // Description: Hack för att nå oss själva från callback-funktionen
00155         // Remarks: Använd ej
00156     static CzzControlPanel* m_pThis;
00157 };
00158 
00159 #endif // zz_ctrl_panel_h
00160 

Generated on Thu Sep 21 21:45:42 2006 for tonjac.org MINI/C++ library by  doxygen 1.4.6-NO