diff options
| author | Pietro Gagliardi <[email protected]> | 2015-04-07 22:19:24 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2015-04-07 22:19:24 -0400 |
| commit | 002d95c2c26823c200bc672a5dc1011004308e32 (patch) | |
| tree | f13ca3fd60fe91af5d6413467b4347315d4f5a73 /new/container_windows.c | |
| parent | 5719004a9720f33a8118133292fe451d273e1063 (diff) | |
Resolved a bunch of TODOs. Added one.
Diffstat (limited to 'new/container_windows.c')
| -rw-r--r-- | new/container_windows.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/new/container_windows.c b/new/container_windows.c index 90ebab1..2056653 100644 --- a/new/container_windows.c +++ b/new/container_windows.c @@ -55,7 +55,6 @@ BOOL sharedWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT * return FALSE; } -// TODO add function names to errors void resize(uiControl *control, HWND parent, RECT r) { uiSizing d; @@ -66,20 +65,20 @@ void resize(uiControl *control, HWND parent, RECT r) dc = GetDC(parent); if (dc == NULL) - logLastError("error getting DC for preferred size calculations"); + logLastError("error getting DC in resize()"); prevfont = (HFONT) SelectObject(dc, hMessageFont); if (prevfont == NULL) - logLastError("error loading control font into device context for preferred size calculation"); + logLastError("error loading control font into device context in resize()"); if (GetTextMetricsW(dc, &tm) == 0) - logLastError("error getting text metrics for preferred size calculations"); + logLastError("error getting text metrics in resize()"); if (GetTextExtentPoint32W(dc, L"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", 52, &size) == 0) - logLastError("error getting text extent point for preferred size calculations"); + logLastError("error getting text extent point in resize()"); d.baseX = (int) ((size.cx / 26 + 1) / 2); d.baseY = (int) tm.tmHeight; d.internalLeading = tm.tmInternalLeading; if (SelectObject(dc, prevfont) != hMessageFont) - logLastError("error restoring previous font into device context after preferred size calculations"); + logLastError("error restoring previous font into device context in resize()"); if (ReleaseDC(parent, dc) == 0) - logLastError("error releasing DC for preferred size calculations"); + logLastError("error releasing DC in resize()"); (*(control->resize))(control, r.left, r.top, r.right - r.left, r.bottom - r.top, &d); } |
