Lines Matching defs:hwnd
35 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
41 void PrettyTitle(HWND hwnd, char *fileName)
47 SetWindowTextA(hwnd, title);
50 void InitParagraph(HWND hwnd, Context *context)
66 SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
72 HWND hwnd;
97 hwnd = CreateWindow(szAppName, NULL,
103 ShowWindow(hwnd, iCmdShow);
104 UpdateWindow(hwnd);
107 if (!TranslateAccelerator(hwnd, hAccel, &msg)) {
117 LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
132 hdc = GetDC(hwnd);
139 ReleaseDC(hwnd, hdc);
149 SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR) context);
152 ReleaseDC(hwnd, hdc);
154 PrettyTitle(hwnd, "Sample.txt");
160 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
164 InitParagraph(hwnd, context);
175 GetScrollInfo(hwnd, SB_VERT, &si);
214 SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
215 GetScrollInfo(hwnd, SB_VERT, &si);
217 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
220 ScrollWindow(hwnd, 0, context->paragraph->getLineHeight() * (vertPos - si.nPos), NULL, NULL);
221 UpdateWindow(hwnd);
233 hdc = BeginPaint(hwnd, &ps);
238 GetScrollInfo(hwnd, SB_VERT, &si);
242 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
255 EndPaint(hwnd, &ps);
269 ofn.hwndOwner = hwnd;
292 hdc = GetDC(hwnd);
298 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
305 InitParagraph(hwnd, context);
306 PrettyTitle(hwnd, szTitleName);
307 InvalidateRect(hwnd, NULL, TRUE);
312 //ReleaseDC(hwnd, hdc);
319 SendMessage(hwnd, WM_CLOSE, 0, 0);
323 MessageBox(hwnd, TEXT("Windows Layout Sample 0.1\n")
335 context = (Context *) GetWindowLongPtr(hwnd, GWLP_USERDATA);
354 return DefWindowProc(hwnd, message, wParam, lParam);