Menu

CResizer problem in CDialog

Help
Gordon Ahn
2014-09-29
2014-10-03
  • Gordon Ahn

    Gordon Ahn - 2014-09-29

    Hi David.

    In my attachement, when CResizer is used in PBDatabaseDlg, I can't see the small area for resizing the dialog at right bottom edge.

    I think that is a bug or my setting is wrong?

    Can you fix it or give me right settings?

    -- Gordon Ahn

     
  • David

    David - 2014-09-30

    Hi Gordon,

    If you refer to CMyDialog::OnEraseBkgnd in the DialogResizing sample, this demonstrates one technique for drawing a resizing gripper in the corner of the dialog.

    Best regards,
    David

     
  • Gordon Ahn

    Gordon Ahn - 2014-09-30

    Hi David.

    In my attachement using CDialog::OnEraseBkgnd, you can run the second dialog with grip area if you click the same button

    But, if you move mouse here and there on the dialog, the controls are disappeared and the dialog is not resizable even though grip area is showed.

    Please I need your help..

    -- Gordon Ahn.

     

    Last edit: Gordon Ahn 2014-09-30
  • David

    David - 2014-10-03

    Hi Gordon,

    You should adjust the Window styles used for the dialog. Add the WS_CLIPCHILDREN style to prevent the dialog from drawing over its child windows, and add the WS_THICKFRAME style to allow the dialog to be resized.

    Your dialog definition in Resource.rc might look like this:

    IDD_DIALOG2 DIALOGEX 0, 0, 309, 177
    STYLE DS_SETFONT | DS_FIXEDSYS | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
    CAPTION "Dialog"
    FONT 8, "MS Shell Dlg", 400, 0, 0x1
    BEGIN
        DEFPUSHBUTTON   "È®ÀÎ",IDOK,198,156,50,14
        PUSHBUTTON      "Ãë¼Ò",IDCANCEL,252,156,50,14
        CONTROL         "",IDC_TAB1,"SysTabControl32",0x0,7,7,295,144
    END
    

    Best regards,
    David

     

Log in to post a comment.