| 134 | // Block property - looks like a header (or button) |
| 135 | |
| 136 | class CPropertyBlockItem : public CProperty |
| 137 | { |
| 138 | public: |
| 139 | CPropertyBlockItem(LPCTSTR pstrName, LPARAM lParam) : |
| 140 | CProperty(pstrName, lParam) |
| 141 | { |
| 142 | } |
| 143 | |
| 144 | BYTE GetKind() const |
| 145 | { |
| 146 | return PROPKIND_SIMPLE; |
| 147 | } |
| 148 | |
| 149 | void DrawValue(PROPERTYDRAWINFO& di) |
| 150 | { |
| 151 | RECT rc = di.rcItem; |
| 152 | rc.bottom--; |
| 153 | ::DrawFrameControl(di.hDC, &rc, DFC_BUTTON, DFCS_BUTTONPUSH); |
| 154 | } |
| 155 | |
| 156 | BOOL Activate(UINT action, LPARAM /*lParam*/) |
| 157 | { |
| 158 | switch( action ) { |
| 159 | case PACT_SPACE: |
| 160 | case PACT_CLICK: |
| 161 | case PACT_DBLCLICK: |
| 162 | // Send AddItem notification to parent of control |
| 163 | NMPROPERTYITEM nmh = { m_hWndOwner, ::GetDlgCtrlID(m_hWndOwner), PIN_BROWSE, NULL }; |
| 164 | ::SendMessage(::GetParent(m_hWndOwner), WM_NOTIFY, nmh.hdr.idFrom, (LPARAM) &nmh); |
| 165 | break; |
| 166 | } |
| 167 | return TRUE; |
| 168 | } |
| 169 | }; |
| 170 | |
| 171 | inline HPROPERTY PropCreateBlockItem(LPCTSTR pstrName, LPARAM lParam = 0) |
| 172 | { |
nothing calls this directly
no outgoing calls
no test coverage detected