Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Property Grid
  New Posts New Posts RSS Feed - Handling TCPIP address
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Handling TCPIP address

 Post Reply Post Reply
Author
Message
yoavm View Drop Down
Groupie
Groupie


Joined: 15 July 2006
Status: Offline
Points: 47
Post Options Post Options   Thanks (0) Thanks(0)   Quote yoavm Quote  Post ReplyReply Direct Link To This Post Topic: Handling TCPIP address
    Posted: 01 October 2007 at 6:50pm

How should I define TCPIP address field?
Using maskedit (000.000.000.000) for full three digits is not user friendly.



Thanks,

yoavm

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 02 October 2007 at 1:08am
Hi,
 
try this custom item:
 
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;
};
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.111 seconds.