-1

I'm working on MFC app i'v made a dialog box this is a pic for it

![enter image description here][1]

[1]: http:// i.stack.imgur.com/Tqd9H.png

and this is the code

IDD_DIALOG1 DIALOGEX 0, 0, 141, 194
STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "New Map"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
    DEFPUSHBUTTON   "OK",IDOK,15,164,50,14
    PUSHBUTTON      "Cancel",IDCANCEL,74,164,50,14
    EDITTEXT        IDC_EDIT1,27,28,95,14,ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT3,81,63,24,13,ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT4, 39, 63, 24, 13, ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT5,31,97,88,13,ES_AUTOHSCROLL
    EDITTEXT        IDC_EDIT6, 32, 133, 86, 12, ES_AUTOHSCROLL
    LTEXT           "Map Name",IDC_STATIC,15,15,40,8
    LTEXT           "Map Size",IDC_STATIC,15,48,40,8    
    LTEXT           "X",IDC_STATIC,27,64,15,8
    LTEXT           "Y",IDC_STATIC,71,65,8,8
    LTEXT           "Enviroment",IDC_STATIC,15,82,40,8
    LTEXT           "Textureset",IDC_STATIC,15,119,40,8   
    CONTROL         "Textureset",IDC_CHECK2,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,59,118,51,10
    CONTROL         "Optinal",IDC_CHECK1,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,59,81,52,10
END

first thing how can i save strings of the editboxes and using it in command case

IDOK:       
        // Do something 
        break; like this

second thing how can i disable the editbox when i check the checkbox

1 Answers1

0

To get the string from a control, use GetWindowText() function.
To disable a control, use EnableWindow() function.

HariDev
  • 508
  • 10
  • 28