]>
Commit | Line | Data |
---|---|---|
ab57ceaa RC |
1 | #ifndef CINSTALL_PROPPAGE_H\r |
2 | #define CINSTALL_PROPPAGE_H\r | |
3 | \r | |
4 | /*\r | |
5 | * Copyright (c) 2001, Gary R. Van Sickle.\r | |
6 | *\r | |
7 | * This program is free software; you can redistribute it and/or modify\r | |
8 | * it under the terms of the GNU General Public License as published by\r | |
9 | * the Free Software Foundation; either version 2 of the License, or\r | |
10 | * (at your option) any later version.\r | |
11 | *\r | |
12 | * A copy of the GNU General Public License can be found at\r | |
13 | * http://www.gnu.org/\r | |
14 | *\r | |
15 | * Written by Gary R. Van Sickle <g.r.vansickle@worldnet.att.net>\r | |
16 | *\r | |
17 | */\r | |
18 | \r | |
19 | // This is the header for the PropertyPage class. It works closely with the\r | |
20 | // PropSheet class to implement a single page of the property sheet.\r | |
21 | \r | |
22 | \r | |
23 | #include <windows.h>\r | |
24 | #include <prsht.h>\r | |
25 | \r | |
26 | #include "window.h"\r | |
27 | \r | |
28 | class PropSheet;\r | |
29 | \r | |
30 | class PropertyPage:public Window\r | |
31 | {\r | |
32 | static bool DoOnceForSheet;\r | |
33 | PROPSHEETPAGE psp;\r | |
34 | DLGPROC proc;\r | |
35 | BOOL (*cmdproc) (HWND h, int id, HWND hwndctl, UINT code);\r | |
36 | \r | |
37 | // The sheet that owns this page.\r | |
38 | PropSheet *OurSheet;\r | |
39 | \r | |
40 | // For setting the back/finish buttons properly.\r | |
41 | bool IsFirst, IsLast;\r | |
42 | \r | |
43 | static BOOL CALLBACK FirstDialogProcReflector (HWND hwnd, UINT message,\r | |
44 | WPARAM wParam,\r | |
45 | LPARAM lParam);\r | |
46 | static BOOL CALLBACK DialogProcReflector (HWND hwnd, UINT message,\r | |
47 | WPARAM wParam, LPARAM lParam);\r | |
48 | \r | |
49 | protected:\r | |
50 | virtual BOOL CALLBACK DialogProc (UINT message, WPARAM wParam,\r | |
51 | LPARAM lParam);\r | |
52 | \r | |
53 | public:\r | |
54 | PropertyPage ();\r | |
55 | virtual ~ PropertyPage ();\r | |
56 | \r | |
57 | PROPSHEETPAGE *GetPROPSHEETPAGEPtr ()\r | |
58 | {\r | |
59 | return &psp;\r | |
60 | };\r | |
61 | \r | |
62 | // FIXME: These should be private and friended to PropSheet.\r | |
63 | void YouAreBeingAddedToASheet (PropSheet * ps)\r | |
64 | {\r | |
65 | OurSheet = ps;\r | |
66 | };\r | |
67 | void YouAreFirst ()\r | |
68 | {\r | |
69 | IsFirst = true;\r | |
70 | IsLast = false;\r | |
71 | };\r | |
72 | void YouAreLast ()\r | |
73 | {\r | |
74 | IsFirst = false;\r | |
75 | IsLast = true;\r | |
76 | };\r | |
77 | void YouAreMiddle ()\r | |
78 | {\r | |
79 | IsFirst = false;\r | |
80 | IsLast = false;\r | |
81 | };\r | |
82 | \r | |
83 | virtual bool Create (int TemplateID);\r | |
84 | virtual bool Create (DLGPROC dlgproc, int TemplateID);\r | |
85 | virtual bool Create (DLGPROC dlgproc,\r | |
86 | BOOL (*cmdproc) (HWND h, int id, HWND hwndctl,\r | |
87 | UINT code), int TemplateID);\r | |
88 | \r | |
89 | virtual void OnInit ()\r | |
90 | {\r | |
91 | };\r | |
92 | virtual void OnActivate ()\r | |
93 | {\r | |
94 | };\r | |
95 | virtual void OnDeactivate ()\r | |
96 | {\r | |
97 | };\r | |
98 | virtual long OnNext ()\r | |
99 | {\r | |
100 | return 0;\r | |
101 | };\r | |
102 | virtual long OnBack ()\r | |
103 | {\r | |
104 | return 0;\r | |
105 | };\r | |
106 | virtual bool OnFinish ()\r | |
107 | {\r | |
108 | return true;\r | |
109 | };\r | |
110 | \r | |
111 | PropSheet *GetOwner () const\r | |
112 | {\r | |
113 | return OurSheet;\r | |
114 | };\r | |
115 | };\r | |
116 | \r | |
117 | #endif // CINSTALL_PROPPAGE_H\r |