View previous topic :: View next topic |
Author |
Message |
Laubi
Joined: 18 May 2007 Posts: 9
|
Posted: Wed Jun 20, 2007 4:04 am Post subject: IP Control |
|
|
Hi,
I just started writing an ip address control. Unfortunately I failed after the first few lines
It looks like there's a missing dependency - do I need to add something to use comctrl?
Whenever I try to start the compiled application I only get this message: Error: Unable to obtain information for window class 'WC_IPADDRESS'
This is what I've done so far:
Code: | const char[] WC_IPADDRESS = "DFL_IpControl";
class IpControl: ControlSuperClass
{
WNDPROC ipPrevWndProc;
LONG ipClassStyle;
this()
{
INITCOMMONCONTROLSEX icex;
// Ensure that the common control DLL is loaded.
icex.dwSize = INITCOMMONCONTROLSEX.sizeof;
icex.dwICC = ICC_INTERNET_CLASSES;
InitCommonControlsEx(&icex);
// Create dfl window class
dfl.internal.utf.WndClass info;
ipPrevWndProc = superClass(HINSTANCE.init, "WC_IPADDRESS", WC_IPADDRESS, info);
ipClassStyle = info.wc.style;
}
protected override void prevWndProc(inout Message msg)
{
msg.result = dfl.internal.utf.callWindowProc(ipPrevWndProc, msg.hWnd, msg.msg, msg.wParam, msg.lParam);
}
protected override void createParams(inout CreateParams cp)
{
super.createParams(cp);
cp.className = WC_IPADDRESS;
}
} |
Thanks!
Laubi |
|
Back to top |
|
|
Chris Miller
Joined: 27 Mar 2004 Posts: 514 Location: The Internet
|
Posted: Fri Jul 06, 2007 11:15 am Post subject: Re: IP Control |
|
|
The IP control's class name is "SysIPAddress32"; WC_IPADDRESS is a #define (or const in D) set to this. |
|
Back to top |
|
|
Laubi
Joined: 18 May 2007 Posts: 9
|
Posted: Mon Jul 09, 2007 4:48 am Post subject: |
|
|
thanks Chris! |
|
Back to top |
|
|
|