Lines Matching refs:hwnd
36 LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
42 void PrettyTitle(HWND hwnd, char *fileName)
48 SetWindowTextA(hwnd, title);
51 void InitParagraph(HWND hwnd, Context *context)
67 SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
73 HWND hwnd;
98 hwnd = CreateWindow(szAppName, NULL,
104 ShowWindow(hwnd, iCmdShow);
105 UpdateWindow(hwnd);
108 if (!TranslateAccelerator(hwnd, hAccel, &msg)) {
118 LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
133 hdc = GetDC(hwnd);
141 ReleaseDC(hwnd, hdc);
151 SetWindowLongPtr(hwnd, 0, (LONG_PTR) context);
154 ReleaseDC(hwnd, hdc);
156 PrettyTitle(hwnd, "Sample.txt");
162 context = (Context *) GetWindowLongPtr(hwnd, 0);
166 InitParagraph(hwnd, context);
177 GetScrollInfo(hwnd, SB_VERT, &si);
216 SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
217 GetScrollInfo(hwnd, SB_VERT, &si);
219 context = (Context *) GetWindowLongPtr(hwnd, 0);
222 ScrollWindow(hwnd, 0, pf_getLineHeight(context->paragraph) * (vertPos - si.nPos), NULL, NULL);
223 UpdateWindow(hwnd);
235 hdc = BeginPaint(hwnd, &ps);
240 GetScrollInfo(hwnd, SB_VERT, &si);
244 context = (Context *) GetWindowLongPtr(hwnd, 0);
257 EndPaint(hwnd, &ps);
271 ofn.hwndOwner = hwnd;
296 hdc = GetDC(hwnd);
302 context = (Context *) GetWindowLongPtr(hwnd, 0);
309 InitParagraph(hwnd, context);
310 PrettyTitle(hwnd, szTitleName);
311 InvalidateRect(hwnd, NULL, TRUE);
316 //ReleaseDC(hwnd, hdc);
323 SendMessage(hwnd, WM_CLOSE, 0, 0);
327 MessageBox(hwnd, TEXT("Windows Layout Sample 0.1\n")
339 context = (Context *) GetWindowLongPtr(hwnd, 0);
359 return DefWindowProc(hwnd, message, wParam, lParam);