1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23
| case WM_CREATE:
{
HFONT hFont;
hEdit = CreateWindowEx(WS_EX_OVERLAPPEDWINDOW,"edit","",
WS_BORDER | WS_CHILD | WS_SIZEBOX |WS_VISIBLE | ES_MULTILINE | WS_VSCROLL | ES_LEFT, 0, 0, 0, 0, hwnd_F, NULL, hinst, NULL);
hFont = (HFONT)GetStockObject(BLACK_BRUSH);/
SendMessage(hEdit,WM_SETFONT,(UINT)hFont,TRUE);
SendMessage(hEdit, EM_SETMARGINS, EC_LEFTMARGIN | EC_RIGHTMARGIN,MAKELONG(5,5));
InitCommonControls();
hsb = CreateStatusWindow(WS_CHILD | WS_VISIBLE, "Texte", hwnd_F, -1);
case WM_SIZE:
{
MoveWindow(hEdit, 0, 0, LOWORD(lParam), HIWORD(lParam), TRUE);
RECT sbRect;
UINT sbheight;
GetWindowRect(hsb, &sbRect);
sbheight = sbRect.bottom - sbRect.top;
MoveWindow(hEdit, 0, 0, LOWORD(lParam), HIWORD(lParam)-sbheight,TRUE);
MoveWindow(hsb, 0, HIWORD(lParam)-sbheight, LOWORD(lParam),sbheight, TRUE);
return 0;
} |
Partager