FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

IP Control

 
Post new topic   Reply to topic     Forum Index -> DFL
View previous topic :: View next topic  
Author Message
Laubi



Joined: 18 May 2007
Posts: 9

PostPosted: Wed Jun 20, 2007 4:04 am    Post subject: IP Control Reply with quote

Hi,
I just started writing an ip address control. Unfortunately I failed after the first few lines Confused
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
View user's profile Send private message
Chris Miller



Joined: 27 Mar 2004
Posts: 514
Location: The Internet

PostPosted: Fri Jul 06, 2007 11:15 am    Post subject: Re: IP Control Reply with quote

The IP control's class name is "SysIPAddress32"; WC_IPADDRESS is a #define (or const in D) set to this.
Back to top
View user's profile Send private message
Laubi



Joined: 18 May 2007
Posts: 9

PostPosted: Mon Jul 09, 2007 4:48 am    Post subject: Reply with quote

thanks Chris!
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> DFL All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group