Okie dokie. So I am making a listbox class because it was starting to get messy in my Main. Now in order to make it more self contained I needed to pass a lot of information to the new class when it gets made.

The problem is that the constructor doesn't seem to be getting triggered, at least it won't break in Debug inside of the constructor, the window that is supposed to created in the constructor does not.

I am floating through my C++ books and they show a argument constructor demonstration and I mirrored it for mine.

So with no further ado class declaration.
Code:
class CListbox
{
    
    private:
        HWND m_Hwnd;
        HWND m_OwnerHwnd;
        HINSTANCE m_HInstance;
        bool Created;
        int m_nFunsterStil;
    public:
        /* Constructors */
        CListbox();
       
        CListbox(   HWND hwnd,
                    int iStartPosVertical,
                    int iStartPosHorizontal,
                    int iStyleSetting,
                    int iWidth,
                    int iHeight,
                    HINSTANCE hAppInstance,
                    int nFunsterStil);
                    
        ~CListbox();
        /* Properties */
        void hwnd(HWND l_Hwnd);
        HWND hwnd(void);
        void hinstance(HINSTANCE l_Hinstance);
        HINSTANCE hinstance(void);
        /* Methods */
        long AddString(char * pItemText);
    protected:

};
Then we have the beautiful calling code...
Code:
CListbox MyList(hwnd,0,40,1,520,300,hThisInstance,nFunsterStil);
MyList.AddString(MyMsg);
Now the code compiles (I know that doesn't mean much) and it gets to the AddString call, but the window that was supposed to be drawn in the constructor wasn't drawn.

Now for some odd reason if I add this line....

Code:
CListbox Test;
so now it looks like this
Code:
CListbox Test;
CListbox MyList(hwnd,0,40,1,520,300,hThisInstance,nFunsterStil);
MyList.AddString(MyMsg);
The constructor appears to be triggered and works, the window is drawn, and my string is added.

Here is the implementation code structure fyi.
Code:
CListbox::CListbox(HWND hwnd,
                    int iStartPosVertical,
                    int iStartPosHorizontal,
                    int iStyleSetting,
                    int iWidth,
                    int iHeight,
                    HINSTANCE hAppInstance,
                    int nFunsterStil)
{
    /* Load Class Variables */
    m_OwnerHwnd=hwnd;
    m_HInstance=hAppInstance;
    m_nFunsterStil=nFunsterStil;
    /* Local Variables */
    long lStyleSetting;
    switch(iStyleSetting)
    {
        case 1:
            lStyleSetting=WS_CHILD|WS_VSCROLL|LBS_HASSTRINGS|LBS_DISABLENOSCROLL|LBS_WANTKEYBOARDINPUT;
            break;
        case 2:
            lStyleSetting=WS_CHILD|WS_VSCROLL|LBS_HASSTRINGS|LBS_DISABLENOSCROLL|LBS_WANTKEYBOARDINPUT;
            break;
    }
    
    if(!Created)
    {
        m_Hwnd = CreateWindowEx (
           0,                   /* Extended possibilites for variation */
           "Listbox",           /* Classname */
           "",                  /* Title Text */
           lStyleSetting, /* default window */
           iStartPosHorizontal,       /* Windows decides the position */
           iStartPosVertical,       /* where the window ends up on the screen */
           iWidth,                 /* The programs width */
           iHeight,                 /* and height in pixels */
           m_OwnerHwnd,                /* The window is a child-window to main window */
           NULL,                /* No menu */
           m_HInstance,       /* Program Instance handler */
           NULL                 /* No Window Creation data */
           );
        ShowWindow(m_Hwnd,m_nFunsterStil);   
        Created=true;
    }

}