2013-06-05 55 views
0

所以我有一個文本框,我想讓它在到達邊界時進入一個新行。另外,我對這個w32 API很陌生。這是我的代碼:W32文本框自動換行

hEdit=CreateWindowEx(WS_EX_CLIENTEDGE, "EDIT", "", WS_CHILD|WS_VISIBLE| 
        WS_BORDER, 10, 
        10, 160, 420, hwnd, (HMENU)IDC_MAIN_EDIT, GetModuleHandle(NULL), 
        NULL); 
HGDIOBJ hfDefault=GetStockObject(DEFAULT_GUI_FONT); 
SendMessage(hEdit, WM_SETFONT, (WPARAM)hfDefault, 
      MAKELPARAM(FALSE,0)); 
SendMessage(hEdit, WM_SETTEXT, NULL, 
      (LPARAM)"Insert text here..."); 

回答