Lines Matching refs:hwnd
48 void PrettyTitle(HWND hwnd, char *fileName) in PrettyTitle() argument
54 SetWindowTextA(hwnd, title); in PrettyTitle()
57 void InitParagraph(HWND hwnd, Context *context) in InitParagraph() argument
73 SetScrollInfo(hwnd, SB_VERT, &si, TRUE); in InitParagraph()
79 HWND hwnd; in WinMain() local
104 hwnd = CreateWindow(szAppName, NULL, in WinMain()
110 ShowWindow(hwnd, iCmdShow); in WinMain()
111 UpdateWindow(hwnd); in WinMain()
114 if (!TranslateAccelerator(hwnd, hAccel, &msg)) { in WinMain()
124 LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam) in WndProc() argument
139 hdc = GetDC(hwnd); in WndProc()
147 ReleaseDC(hwnd, hdc); in WndProc()
157 SetWindowLongPtr(hwnd, 0, (LONG_PTR) context); in WndProc()
160 ReleaseDC(hwnd, hdc); in WndProc()
162 PrettyTitle(hwnd, "Sample.txt"); in WndProc()
168 context = (Context *) GetWindowLongPtr(hwnd, 0); in WndProc()
172 InitParagraph(hwnd, context); in WndProc()
183 GetScrollInfo(hwnd, SB_VERT, &si); in WndProc()
222 SetScrollInfo(hwnd, SB_VERT, &si, TRUE); in WndProc()
223 GetScrollInfo(hwnd, SB_VERT, &si); in WndProc()
225 context = (Context *) GetWindowLongPtr(hwnd, 0); in WndProc()
228 … ScrollWindow(hwnd, 0, pf_getLineHeight(context->paragraph) * (vertPos - si.nPos), NULL, NULL); in WndProc()
229 UpdateWindow(hwnd); in WndProc()
241 hdc = BeginPaint(hwnd, &ps); in WndProc()
246 GetScrollInfo(hwnd, SB_VERT, &si); in WndProc()
250 context = (Context *) GetWindowLongPtr(hwnd, 0); in WndProc()
263 EndPaint(hwnd, &ps); in WndProc()
277 ofn.hwndOwner = hwnd; in WndProc()
302 hdc = GetDC(hwnd); in WndProc()
308 context = (Context *) GetWindowLongPtr(hwnd, 0); in WndProc()
315 InitParagraph(hwnd, context); in WndProc()
316 PrettyTitle(hwnd, szTitleName); in WndProc()
317 InvalidateRect(hwnd, NULL, TRUE); in WndProc()
329 SendMessage(hwnd, WM_CLOSE, 0, 0); in WndProc()
333 MessageBox(hwnd, TEXT("Windows Layout Sample 0.1\n") in WndProc()
345 context = (Context *) GetWindowLongPtr(hwnd, 0); in WndProc()
365 return DefWindowProc(hwnd, message, wParam, lParam); in WndProc()