Mercurial > dwindows
comparison win/dw.c @ 1628:2571d6b23065
_init_thread() needs to be called after initializing GDI+ on Windows.
Was hoping this is why GDI+ drawing wasn't working, but sadly no.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Wed, 28 Mar 2012 16:03:20 +0000 |
parents | b41ecd439b47 |
children | d97e3f7f4e47 |
comparison
equal
deleted
inserted
replaced
1627:b41ecd439b47 | 1628:2571d6b23065 |
---|---|
3862 _hPen = TlsAlloc(); | 3862 _hPen = TlsAlloc(); |
3863 _hBrush = TlsAlloc(); | 3863 _hBrush = TlsAlloc(); |
3864 #ifdef GDIPLUS | 3864 #ifdef GDIPLUS |
3865 _gpPen = TlsAlloc(); | 3865 _gpPen = TlsAlloc(); |
3866 #endif | 3866 #endif |
3867 _init_thread(); | |
3868 | 3867 |
3869 icc.dwSize = sizeof(INITCOMMONCONTROLSEX); | 3868 icc.dwSize = sizeof(INITCOMMONCONTROLSEX); |
3870 icc.dwICC = ICC_WIN95_CLASSES|ICC_DATE_CLASSES; | 3869 icc.dwICC = ICC_WIN95_CLASSES|ICC_DATE_CLASSES; |
3871 | 3870 |
3872 InitCommonControlsEx(&icc); | 3871 InitCommonControlsEx(&icc); |
4011 si.DebugEventCallback = NULL; | 4010 si.DebugEventCallback = NULL; |
4012 si.SuppressBackgroundThread = FALSE; | 4011 si.SuppressBackgroundThread = FALSE; |
4013 si.SuppressExternalCodecs = FALSE; | 4012 si.SuppressExternalCodecs = FALSE; |
4014 GdiplusStartup(&gdiplusToken, &si, NULL); | 4013 GdiplusStartup(&gdiplusToken, &si, NULL); |
4015 #endif | 4014 #endif |
4015 | |
4016 /* GDI+ Needs to be initialized before calling _init_thread(); */ | |
4017 _init_thread(); | |
4016 | 4018 |
4017 #ifdef AEROGLASS | 4019 #ifdef AEROGLASS |
4018 /* Attempt to load the Desktop Window Manager and Theme library */ | 4020 /* Attempt to load the Desktop Window Manager and Theme library */ |
4019 if((hdwm = LoadLibrary(TEXT("dwmapi"))) && (huxtheme = LoadLibrary(TEXT("uxtheme")))) | 4021 if((hdwm = LoadLibrary(TEXT("dwmapi"))) && (huxtheme = LoadLibrary(TEXT("uxtheme")))) |
4020 { | 4022 { |