diff options
| author | Pietro Gagliardi <[email protected]> | 2014-10-27 10:19:39 -0400 |
|---|---|---|
| committer | Pietro Gagliardi <[email protected]> | 2014-10-27 10:19:39 -0400 |
| commit | 1d53d4db1dab28efb2aa9c4bc8eee00a68e72766 (patch) | |
| tree | 3b1f00496b04e2d424d7180f4d5f71155ef3bc41 /container_windows.c | |
| parent | 7c67741bb5c81038a41c8a4a1aff4d48a451f02a (diff) | |
Removed the gouicontainer window class from the Windows backend; it is no longer needed.
Diffstat (limited to 'container_windows.c')
| -rw-r--r-- | container_windows.c | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/container_windows.c b/container_windows.c index 7910b92..bbad9ec 100644 --- a/container_windows.c +++ b/container_windows.c @@ -3,60 +3,6 @@ #include "winapi_windows.h" #include "_cgo_export.h" -/* -This could all just be part of Window, but doing so just makes things complex. -In this case, I chose to waste a window handle rather than keep things super complex. -If this is seriously an issue in the future, I can roll it back. -*/ - -static LRESULT CALLBACK containerWndProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) -{ - LRESULT lResult; - - if (sharedWndProc(hwnd, uMsg, wParam, lParam, &lResult)) - return lResult; - switch (uMsg) { - default: - return DefWindowProcW(hwnd, uMsg, wParam, lParam); - } - xmissedmsg("container", "containerWndProc()", uMsg); - return 0; // unreached -} - -DWORD makeContainerWindowClass(char **errmsg) -{ - WNDCLASSW wc; - - ZeroMemory(&wc, sizeof (WNDCLASSW)); - wc.lpfnWndProc = containerWndProc; - wc.hInstance = hInstance; - wc.hIcon = hDefaultIcon; - wc.hCursor = hArrowCursor; - wc.hbrBackground = NULL;//(HBRUSH) (COLOR_BTNFACE + 1); - wc.lpszClassName = containerclass; - if (RegisterClassW(&wc) == 0) { - *errmsg = "error registering container window class"; - return GetLastError(); - } - return 0; -} - -HWND newContainer(void) -{ - HWND hwnd; - - hwnd = CreateWindowExW( - WS_EX_CONTROLPARENT | WS_EX_TRANSPARENT, - containerclass, L"", - WS_CHILD | WS_VISIBLE, - CW_USEDEFAULT, CW_USEDEFAULT, - 100, 100, - msgwin, NULL, hInstance, NULL); - if (hwnd == NULL) - xpanic("container creation failed", GetLastError()); - return hwnd; -} - RECT containerBounds(HWND hwnd) { RECT r; |
