CCustomItemIPAddress |
Post Reply |
Author | |
netman2
Groupie Joined: 19 April 2016 Location: Seoul Status: Offline Points: 24 |
Post Options
Thanks(0)
Posted: 09 January 2017 at 6:41am |
class CCustomItemIPAddress : public CXTPPropertyGridItem
{ class CInplaceEditIPAddress : public CXTPPropertyGridInplaceEdit { public: BOOL Create(LPCTSTR /*lpszClassName*/, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext) { if (!CWnd::Create(WC_IPADDRESS, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext)) return FALSE; ModifyStyle(WS_BORDER, 0); ModifyStyleEx(WS_EX_CLIENTEDGE, 0, SWP_FRAMECHANGED); return TRUE; } }; public: CCustomItemIPAddress::CCustomItemIPAddress(CString strCaption) : CXTPPropertyGridItem(strCaption) { } protected: virtual CXTPPropertyGridInplaceEdit& GetInplaceEdit() { return m_wndEdit; } private: CInplaceEditIPAddress m_wndEdit; }; Now I'm using above CCustomItemIPAddress from sample code. It was nice until I remove one of the CCustomItemIPAddress from PropertyGrid. When I remove CCustomItemIPAddress from PropertyGrid, my propertygrid's font and size are changed. I don't know how to handle this. This below is my sample code. ::OnGridNotify(WPARAM wParam, LPARAM lParam) { CXTPPropertyGridInplaceButton * button = (CXTPPropertyGridInplaceButton *)lParam; button->GetItem()->Remove(); } You can test in Codejock sample code in PropertyGrid. There is CCustomItemIPAddress. Please help me! |
|
olebed
Admin Group Joined: 01 July 2014 Location: Ukraine Status: Offline Points: 841 |
Post Options
Thanks(0)
|
CCustomItemIPAddress control doesn't have inplace buttons.
Your code need to be improved
|
|
netman2
Groupie Joined: 19 April 2016 Location: Seoul Status: Offline Points: 24 |
Post Options
Thanks(0)
|
I added button into IP Address Control.
So it has a button inside IP Address Control. And I tried your solution, It's a same. Thanks, your reply!
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |