1

Topic: WTL CDialogResize - does not work, I will not understand why

Hello!


Any more for the first time I try to make dialogue of the changeable size, but does not work for some reason -  "thick", the cursor changes, hinting that it is possible to change the size, and the size all the same does not change. Like all as it is necessary I do, but could pass something. And earlier it is similar like all did, and worked.

Here the code of just created class of dialogue, not  works. What do I miss?




struct CSelClipboardFormatValue 
{ 
    UINT formatId; 
    std:: basic_string <TCHAR> formatTitle; 
};



class CSelectClipboardFormatsDlg  
               : public CDialogImpl <CSelectClipboardFormatsDlg> 
               //, public CWinDataExchange <CClipboardStripperDlg> 
               , public CDialogResize<CSelectClipboardFormatsDlg> 
{ 
    const CSelClipboardFormatValue *pInputValues; 
          CSelClipboardFormatValue *pOutputValues; 

    std:: basic_string <TCHAR> dialogTitle; 
    bool multisel; 

public: 

    enum {IDD = IDD_SELECT_CLIPBRD_FORMATS_DLG}; 

    void setupTitle () 
       { 
        if (dialogTitle.empty ()) 
           { 
            const TCHAR *defStrs [2] = {_T ("Select clipboard format") 
                                      , _T ("Select clipboard formats") 
                                      };
            //UINT strId = IDS_SELECT_CLIPBOARD_FORMAT_TITLE; 
            UINT i = 0; 
            if (multisel) i = 1; 
            dialogTitle = win32LoadResourseString (IDS_SELECT_CLIPBOARD_FORMAT_TITLE+i, defStrs [i], moduleInstance); 
           }
        :: SendMessage (m_hWnd, WM_SETTEXT, 0/* wParam */, (LPARAM) dialogTitle.c_str ());   
       }


    CSelectClipboardFormatsDlg (const CSelClipboardFormatValue &inputs 
                               ,       CSelClipboardFormatValue &results 
                               , bool ms 
                               , const TCHAR *pStrDialogTitle = 0 
                               ) 
       : CDialogImpl <CSelectClipboardFormatsDlg> () 
       , CDialogResize<CSelectClipboardFormatsDlg> () 
       , pInputValues (&inputs) 
       , pOutputValues (&results) 
       , multisel (ms) 
       , dialogTitle (pStrDialogTitle? pStrDialogTitle: _ T ("")) 
       { 
       }

    CSelectClipboardFormatsDlg (const CSelClipboardFormatValue &inputs 
                               ,       CSelClipboardFormatValue &results 
                               , bool ms 
                               , const std:: basic_string <TCHAR> &dlgTitle 
                               ) 
       : CDialogImpl <CSelectClipboardFormatsDlg> () 
       , CDialogResize<CSelectClipboardFormatsDlg> () 
       , pInputValues (&inputs) 
       , pOutputValues (&results) 
       , multisel (ms) 
       , dialogTitle (dlgTitle) 
       { 
       }

    ~CSelectClipboardFormatsDlg ()  
        { 
        }

    BEGIN_MSG_MAP (CSelectClipboardFormatsDlg) 

        MSG_WM_INITDIALOG (OnInitDialog) 
        COMMAND_ID_HANDLER_EX (IDOK, OnOK) 
        COMMAND_ID_HANDLER_EX (IDCANCEL, OnCancel) 
        CHAIN_MSG_MAP (CDialogResize<CSelectClipboardFormatsDlg>) 
        REFLECT_NOTIFICATIONS () 

    END_MSG_MAP () 

    BEGIN_DLGRESIZE_MAP (CSelectClipboardFormatsDlg)   

        DLGRESIZE_CONTROL (IDC_GRID, DLSZ_SIZE_X|DLSZ_SIZE_Y) 

        DLGRESIZE_CONTROL (IDC_CHECK_ALL, DLSZ_MOVE_Y) 
        DLGRESIZE_CONTROL (IDC_UNCHECK_ALL, DLSZ_MOVE_Y) 
        DLGRESIZE_CONTROL (IDOK, DLSZ_MOVE_X|DLSZ_MOVE_Y) 
        DLGRESIZE_CONTROL (IDCANCEL, DLSZ_MOVE_X|DLSZ_MOVE_Y) 

    END_DLGRESIZE_MAP () 


    LRESULT OnInitDialog (HWND hwndFocus, LPARAM lParam) 
    { 
        setupTitle (); 
        DlgResize_Init (true, true, WS_CLIPCHILDREN | WS_THICKFRAME);//(); 
        CenterWindow (); 
        return TRUE; 
    }

    void OnOK (UINT uCode, int nID, HWND hWndCtl) 
       { 
        EndDialog (nID); 
       }

    void OnCancel (UINT uCode, int nID, HWND hWndCtl) 
       { 
        EndDialog (nID); 
       }

};