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