summaryrefslogtreecommitdiff
path: root/alf/alf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'alf/alf.cpp')
-rw-r--r--alf/alf.cpp36
1 files changed, 22 insertions, 14 deletions
diff --git a/alf/alf.cpp b/alf/alf.cpp
index ae6c8f9..9d1379c 100644
--- a/alf/alf.cpp
+++ b/alf/alf.cpp
@@ -519,10 +519,31 @@ ALF_CreateApplication(HINSTANCE hInstance)
InitCommonControlsEx(&icc);
app->compatFn = ALF_CreateCompatFuncTable();
+ ALF_RegisterComboClass(app);
return app;
}
+
+void
+ALF_BuildRandomClassName(const TCHAR *prefix, TCHAR *buf)
+{
+ UUID uuid;
+ UuidCreate(&uuid);
+
+#ifdef UNICODE
+ unsigned short *uuidstr = NULL;
+#else
+ unsigned char *uuidstr = NULL;
+#endif
+ UuidToString(&uuid, &uuidstr);
+
+ lstrcpy(buf, prefix);
+ lstrcat(buf, (LPCTSTR)uuidstr);
+
+ RpcStringFree(&uuidstr);
+}
+
LPTSTR
ALF_RegisterWindowClass(ALFAPP app, const ALFWindowClassParams *params)
{
@@ -535,20 +556,7 @@ ALF_RegisterWindowClass(ALFAPP app, const ALFWindowClassParams *params)
ZeroMemory(classNameBuf, sizeof(classNameBuf));
classNamePtr = classNameBuf;
- UUID uuid;
- UuidCreate(&uuid);
-
-#ifdef UNICODE
- unsigned short *uuidstr = NULL;
-#else
- unsigned char *uuidstr = NULL;
-#endif
- UuidToString(&uuid, &uuidstr);
-
- lstrcpy(classNameBuf, TEXT("ALFWindow."));
- lstrcat(classNameBuf, (LPCTSTR)uuidstr);
-
- RpcStringFree(&uuidstr);
+ ALF_BuildRandomClassName(TEXT("ALFWindow."), classNameBuf);
}
cls.style = params->classStyle;