#include <precomp.h>
HINSTANCE hExplorerInstance;
+HMODULE hUser32;
HANDLE hProcessHeap;
HKEY hkExplorer = NULL;
+DRAWCAPTEMP DrawCapTemp = NULL;
/* undoc GUID */
DEFINE_GUID(CLSID_RebarBandSite, 0xECD4FC4D, 0x521C, 0x11D0, 0xB7, 0x92, 0x00, 0xA0, 0xC9, 0x03, 0x12, 0xE1);
hExplorerInstance = hInstance;
hProcessHeap = GetProcessHeap();
+ hUser32 = GetModuleHandle(TEXT("USER32.DLL"));
+ if (hUser32 != NULL)
+ {
+ DrawCapTemp = (DRAWCAPTEMP)GetProcAddress(hUser32,
+ PROC_NAME_DRAWCAPTIONTEMP);
+ }
+
InitCommonControls();
OleInitialize(NULL);
Win32DbgPrint(__FILE__, __LINE__, fmt, ##__VA_ARGS__);
extern HINSTANCE hExplorerInstance;
+extern HMODULE hUser32;
extern HANDLE hProcessHeap;
extern HKEY hkExplorer;
+extern DRAWCAPTEMP DrawCapTemp;
/*
* dragdrop.c
{
HFONT hCaptionFont, hBoldCaptionFont;
LRESULT Ret = CDRF_DODEFAULT;
- HMODULE hUser32;
PTASK_GROUP TaskGroup;
PTASK_ITEM TaskItem;
uidctFlags |= DC_ACTIVE;
}
- hUser32 = GetModuleHandle(TEXT("USER32.DLL"));
- if (hUser32 != NULL)
+ if (DrawCapTemp != NULL)
{
- DRAWCAPTEMP DrawCapTemp;
-
- /* DrawCaptionTemp */
- DrawCapTemp = (DRAWCAPTEMP)GetProcAddress(hUser32,
- PROC_NAME_DRAWCAPTIONTEMP);
- if (DrawCapTemp != NULL)
- {
- /* Draw the button content */
- TaskItem->DisplayTooltip = !DrawCapTemp(TaskItem->hWnd,
- nmtbcd->nmcd.hdc,
- &nmtbcd->nmcd.rc,
- hCaptionFont,
- NULL,
- NULL,
- uidctFlags);
- }
+ /* Draw the button content */
+ TaskItem->DisplayTooltip = !DrawCapTemp(TaskItem->hWnd,
+ nmtbcd->nmcd.hdc,
+ &nmtbcd->nmcd.rc,
+ hCaptionFont,
+ NULL,
+ NULL,
+ uidctFlags);
}
return CDRF_SKIPDEFAULT;
BOOL Ret;
UINT Flags;
RECT rcButton;
- HMODULE hUser32;
/* NOTE: This is the backwards compatibility code that is used if the
Common Controls Version 6.0 are not available! */
if (hIconStart != NULL)
Flags |= DC_ICON;
- hUser32 = GetModuleHandle(TEXT("USER32.DLL"));
- if (hUser32 != NULL)
+ if (DrawCapTemp != NULL)
{
- DRAWCAPTEMP DrawCapTemp;
-
- /* DrawCaptionTemp */
- DrawCapTemp = (DRAWCAPTEMP)GetProcAddress(hUser32,
- PROC_NAME_DRAWCAPTIONTEMP);
- if (DrawCapTemp != NULL)
- {
- Ret = DrawCapTemp(NULL,
- hDC,
- &rcButton,
- This->hStartBtnFont,
- hIconStart,
- szStartCaption,
- Flags);
- }
+ Ret = DrawCapTemp(NULL,
+ hDC,
+ &rcButton,
+ This->hStartBtnFont,
+ hIconStart,
+ szStartCaption,
+ Flags);
}
SelectObject(hDC,