diff options
Diffstat (limited to 'alf/alfspacer.cpp')
| -rw-r--r-- | alf/alfspacer.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/alf/alfspacer.cpp b/alf/alfspacer.cpp index 545dfbc..da18600 100644 --- a/alf/alfspacer.cpp +++ b/alf/alfspacer.cpp @@ -1,7 +1,9 @@ #include "alfpriv.h" +TCHAR *_alf_spacerClass = NULL; + void -ALF_RegisterSpacerClass(ALFAPP app) +ALF_RegisterSpacerClass(void) { WNDCLASS cls; ZeroMemory(&cls, sizeof(cls)); @@ -9,7 +11,7 @@ ALF_RegisterSpacerClass(ALFAPP app) TCHAR classNameBuf[256]; ALF_BuildRandomClassName(TEXT("ALFSpacer"), classNameBuf, 256); - cls.hInstance = app->hInstance; + cls.hInstance = ALF_HINSTANCE; cls.hCursor = LoadCursor(NULL, (LPTSTR)IDC_ARROW); if (LOBYTE(LOWORD(GetVersion())) >= 4) { cls.hbrBackground = (HBRUSH)(COLOR_BTNFACE+1); @@ -25,23 +27,21 @@ ALF_RegisterSpacerClass(ALFAPP app) if (!classatom) MessageBox(NULL, TEXT("FATAL: Could not register spacer class"), NULL, MB_OK); - app->spacerClass = MAKEINTATOM(classatom); + _alf_spacerClass = MAKEINTATOM(classatom); } HWND ALF_AddSpacer(HWND parent, WORD id, UINT x, UINT y, UINT cptWidth, UINT cptHeight, DWORD layoutFlags) { - ALFAPP app = ALF_ApplicationFromWindow(parent); - HWND hwndSpacer = CreateWindowEx(0, - app->spacerClass, + _alf_spacerClass, TEXT(""), WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, 0, 0, 0, 0, parent, (HMENU)(int)id, - (HINSTANCE)GetWindowLongPtr(parent, GWLP_HINSTANCE), - (void*)app); + ALF_HINSTANCE, + NULL); ALFWidgetLayoutParams p; ZeroMemory(&p, sizeof(p)); |
