diff options
| author | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-01 22:12:51 +0100 |
|---|---|---|
| committer | Jonas Kümmerlin <jonas@kuemmerlin.eu> | 2019-01-01 22:12:51 +0100 |
| commit | 261902fcae887249ffa03114e49afdef85fb4442 (patch) | |
| tree | fbc81a4581dc762d7194f7ee5b9b7b2790319dbf /alf/alf.cpp | |
| parent | dbd2fb78dec385f0abfe07fd4609dc8f444bdefd (diff) | |
first try at combobox implementation
Diffstat (limited to 'alf/alf.cpp')
| -rw-r--r-- | alf/alf.cpp | 36 |
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; |
