diff options
Diffstat (limited to 'alf/alfspacer.cpp')
| -rw-r--r-- | alf/alfspacer.cpp | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/alf/alfspacer.cpp b/alf/alfspacer.cpp deleted file mode 100644 index 7c0f776..0000000 --- a/alf/alfspacer.cpp +++ /dev/null @@ -1,53 +0,0 @@ -#include "alfpriv.h" - -TCHAR *_alf_spacerClass = NULL; - -void -ALF_RegisterSpacerClass(void) -{ - WNDCLASS cls; - ZeroMemory(&cls, sizeof(cls)); - - TCHAR classNameBuf[256]; - ALF_BuildUniqueName(classNameBuf, TEXT("ALFSpacer."), (ULONG_PTR)&_alf_spacerClass); - - cls.hInstance = ALF_HINSTANCE; - cls.hCursor = LoadCursor(NULL, (LPTSTR)IDC_ARROW); - cls.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); - cls.lpszClassName = classNameBuf; - cls.cbWndExtra = sizeof(void*); - cls.lpfnWndProc = DefWindowProc; - - ATOM classatom = RegisterClass(&cls); - if (!classatom) - MessageBox(NULL, TEXT("FATAL: Could not register spacer class"), NULL, MB_OK); - - _alf_spacerClass = MAKEINTATOM(classatom); -} - -HWND -ALF_AddSpacer(HWND parent, WORD id, UINT x, UINT y, UINT cptWidth, UINT cptHeight, DWORD layoutFlags) -{ - HWND hwndSpacer = CreateWindowEx(0, - _alf_spacerClass, - TEXT(""), - WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, - 0, 0, 0, 0, - parent, - (HMENU)(int)id, - ALF_HINSTANCE, - NULL); - - ALFWidgetLayoutParams p; - ZeroMemory(&p, sizeof(p)); - p.hwnd = hwndSpacer; - p.x = x; - p.y = y; - p.width = cptWidth; - p.height = cptHeight; - p.flags = layoutFlags; - - ALF_AddWidgetEx(parent, &p); - - return hwndSpacer; -} |
