수동으로 만들어서 사용하는 코드 입니다.
약간 번거러움이 있지만 그냥 쓰기엔 무난한듯
class TForm1 : public TForm
{
__published: // IDE-managed Components
TButton *Button1;
TPanel *Panel1;
void __fastcall Button1Click(TObject *Sender);
private: // User declarations
HWND hWndIPAddress; <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 추가
public: // User declarations
__fastcall TForm1(TComponent* Owner);
void __fastcall TForm1::InitAddress();
};
------------------------------------------------------------------------
void __fastcall TForm1::Button1Click(TObject *Sender)
{
InitAddress();
}
//---------------------------------------------------------------------------
// IP Address
void __fastcall TForm1::InitAddress()
{
LPARAM lpAdr = MAKEIPADDRESS(127 , 0, 0, 1);
hWndIPAddress = CreateWindowEx( 0,
WC_IPADDRESS,
NULL,
WS_CHILD | WS_VISIBLE | WS_TABSTOP,
8, 24, 177 , 20,
Panel1->Handle, /// <<<<<< 위치하는 핸들
NULL,
HInstance,
NULL );
SendMessage(hWndIPAddress, IPM_SETADDRESS, 0, lpAdr);
}
풋내기 님이 쓰신 글 :
: 송신영 님이 쓰신 글 :
: : 없습니다.
: : 만들어서 사용하시든 다른 컴포넌트 설치하거나 해야할듯...
: :
: : 풋내기 님이 쓰신 글 :
: : : 안녕하세요.
: : :
: : : MFC할 때는 IP Address Control 이라고 있어서 잘 사용했었는데,
: : : 빌더에는 없는 듯 싶어서 질문 드립니다.
: : : 그냥 텍스트박스에 점 찍어서 써야 하나요?
:
: 그렇군요!
: 답변 감사드립니다.
|