1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
|
char getSelText[500];
case WM_CREATE:
HWND hEdit;
hEdit = CreateWindowEx(WS_EX_CLIENTEDGE, RICHEDIT_CLASS, "",
WS_CHILD | WS_VISIBLE | WS_VSCROLL | WS_HSCROLL | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_NOHIDESEL,
0, 0, 100, 100, hwnd, (HMENU)IDC_CHILD_EDIT, GetModuleHandle(NULL), NULL);
SendMessage(hEdit, EM_GETSELTEXT, (WPARAM) 0, (LPARAM)getSelText);
case WM_COMMAND:
case ID_XX:
MessageBox(hwnd, getSelText, "", MB_OK);
|