CCombobox nicht aufklappbar!



  • Hallo vielleicht ha jemand von Euch eine Idee!

    ich habe einen Dialog, in diesem wird bei Oninit ein Bereich dynamisch erstellt!

    //CWND
    virtual BOOL Create(
    LPCTSTR lpszClassName,
    LPCTSTR lpszWindowName,
    DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd,
    UINT nID,
    CCreateContext* pContext = NULL
    );

    In diesem Bereich erstelle ich einige Subcontrolls (CEdit, CStatic, CCombobox ,... )

    //CStatic
    virtual BOOL Create(
    LPCTSTR lpszText,
    DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd,
    UINT nID = 0xffff
    );
    //CEdit
    virtual BOOL Create(
    DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd,
    UINT nID
    );

    funktioniert alles wunderbar!
    auch bei der Combobox sieht es auf den ersten Blick so aus!
    Aber wenn ich die Liste aufklappen will geht das nicht! Was könnte das sein!

    //Combobox
    virtual BOOL Create(
    DWORD dwStyle,
    const RECT& rect,
    CWnd* pParentWnd,
    UINT nID
    );

    TCombo.Create(WS_CHILD|WS_VISIBLE|WS_VSCROLL|CBS_DROPDOWNLIST|ES_READONLY|ES_AUTOHSCROLL
    |CB_SHOWDROPDOWN,
    rect,
    this,
    4711);

    Hat jemand eine Idee? Wollte schon mit CB_SHOWDROPDOWN das aufklappen erzwingen, aber leider geht das auch nicht!


  • Mod

    Beim Erzeugen musst Du die Höhe der aufgeklappten Box angeben und nicht die Höhe des zugeklappten Controls!



  • du meinst wen nich das Controll erstelle ? Beim Crect
    oder nachdem die Combobox generiert ist ?



  • klasse das geht ! 😉


Anmelden zum Antworten