MCPcopy Create free account
hub / github.com/CobaltFusion/DebugViewPP / CPropertyBlockItem

Class CPropertyBlockItem

Libraries/PropertyGrid/PropertyGrid.h:136–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134// Block property - looks like a header (or button)
135
136class CPropertyBlockItem : public CProperty
137{
138public:
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
171inline HPROPERTY PropCreateBlockItem(LPCTSTR pstrName, LPARAM lParam = 0)
172{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected