win32中获得 文本框edit内容

来源:互联网 发布:手机淘宝5.6.0版本 编辑:程序博客网 时间:2024/06/07 01:48
                       /*wchar_t *szName;int iLength;iLength=GetWindowTextLength(hedit);szName =(wchar_t*)malloc(iLength+6);GetWindowText(hedit,szName,iLength+1);wcscat(szName,L"--New");SetWindowText(hedit,szName);*//*wchar_t szcaption[32];GetDlgItemText(hWnd,IDB_TWO,szcaption,32);wcscat(szcaption,L"--New");SetDlgItemText(hWnd,IDB_TWO,szcaption);*/wchar_t sztitle[32];SendMessage(hedit,WM_GETTEXT,32,(LPARAM)sztitle);MessageBox(NULL,sztitle, L"提示", MB_OK);wcscat(sztitle,L"--New");SendMessage(hedit,WM_SETTEXT,NULL,(LPARAM)sztitle);

0 0