Commit 7379b891 authored by Eric Kohl's avatar Eric Kohl Committed by Alexandre Julliard

Removed calls to internal (non-exported) wine functions.

parent 49e0bf79
......@@ -11,6 +11,7 @@
#define __WINE_COMCTL32_H
extern HMODULE COMCTL32_hModule;
extern HBRUSH COMCTL32_hPattern55AABrush;
/* Property sheet / Wizard */
#define IDD_PROPSHEET 1006
......
......@@ -64,6 +64,15 @@ DWORD COMCTL32_dwProcessesAttached = 0;
LPSTR COMCTL32_aSubclass = (LPSTR)NULL;
HMODULE COMCTL32_hModule = 0;
LANGID COMCTL32_uiLang = MAKELANGID(LANG_NEUTRAL, SUBLANG_NEUTRAL);
HBRUSH COMCTL32_hPattern55AABrush = (HANDLE)NULL;
static HBITMAP COMCTL32_hPattern55AABitmap = (HANDLE)NULL;
static const WORD wPattern55AA[] =
{
0x5555, 0xaaaa, 0x5555, 0xaaaa,
0x5555, 0xaaaa, 0x5555, 0xaaaa
};
/***********************************************************************
......@@ -100,6 +109,10 @@ COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
TRACE("Subclassing atom added: %p\n",
COMCTL32_aSubclass);
/* create local pattern brush */
COMCTL32_hPattern55AABitmap = CreateBitmap (8, 8, 1, 1, wPattern55AA);
COMCTL32_hPattern55AABrush = CreatePatternBrush (COMCTL32_hPattern55AABitmap);
/* register all Win95 common control classes */
ANIMATE_Register ();
FLATSB_Register ();
......@@ -143,6 +156,12 @@ COMCTL32_LibMain (HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
TREEVIEW_Unregister ();
UPDOWN_Unregister ();
/* delete local pattern brush */
DeleteObject (COMCTL32_hPattern55AABrush);
COMCTL32_hPattern55AABrush = (HANDLE)NULL;
DeleteObject (COMCTL32_hPattern55AABitmap);
COMCTL32_hPattern55AABitmap = (HANDLE)NULL;
/* delete global subclassing atom */
GlobalDeleteAtom (LOWORD(COMCTL32_aSubclass));
TRACE("Subclassing atom deleted: %p\n",
......
......@@ -19,7 +19,6 @@
#include "commctrl.h"
#include "comctl32.h"
#include "debugtools.h"
#include "cache.h"
#include <math.h>
DEFAULT_DEBUG_CHANNEL(tab);
......@@ -59,6 +58,7 @@ typedef struct
BOOL needsScrolling; /* TRUE if the size of the tabs is greater than
* the size of the control */
BOOL fSizeSet; /* was the size of the tabs explicitly set? */
BOOL bUnicode; /* Unicode control? */
HWND hwndUpDown; /* Updown control used for scrolling */
} TAB_INFO;
......@@ -1642,7 +1642,7 @@ static void TAB_DrawItem(
* look different from the window background.
*/
if (bk == GetSysColor(COLOR_WINDOW))
hbr = CACHE_GetPattern55AABrush();
hbr = COMCTL32_hPattern55AABrush;
deleteBrush = FALSE;
}
......@@ -2588,6 +2588,23 @@ TAB_SetImageList (HWND hwnd, WPARAM wParam, LPARAM lParam)
return (LRESULT)himlPrev;
}
static LRESULT
TAB_GetUnicodeFormat (HWND hwnd)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr (hwnd);
return infoPtr->bUnicode;
}
static LRESULT
TAB_SetUnicodeFormat (HWND hwnd, WPARAM wParam)
{
TAB_INFO *infoPtr = TAB_GetInfoPtr (hwnd);
BOOL bTemp = infoPtr->bUnicode;
infoPtr->bUnicode = (BOOL)wParam;
return bTemp;
}
static LRESULT
TAB_Size (HWND hwnd, WPARAM wParam, LPARAM lParam)
......@@ -2654,6 +2671,7 @@ TAB_Create (HWND hwnd, WPARAM wParam, LPARAM lParam)
infoPtr->hwndUpDown = 0;
infoPtr->leftmostVisible = 0;
infoPtr->fSizeSet = FALSE;
infoPtr->bUnicode = IsWindowUnicode (hwnd);
TRACE("Created tab control, hwnd [%04x]\n", hwnd);
......@@ -2819,12 +2837,10 @@ TAB_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
return TAB_GetRowCount(hwnd);
case TCM_GETUNICODEFORMAT:
FIXME("Unimplemented msg TCM_GETUNICODEFORMAT\n");
return 0;
return TAB_GetUnicodeFormat (hwnd);
case TCM_SETUNICODEFORMAT:
FIXME("Unimplemented msg TCM_SETUNICODEFORMAT\n");
return 0;
return TAB_SetUnicodeFormat (hwnd, wParam);
case TCM_HIGHLIGHTITEM:
FIXME("Unimplemented msg TCM_HIGHLIGHTITEM\n");
......
......@@ -45,7 +45,6 @@
#include "wine/winestring.h"
#include "commctrl.h"
#include "imagelist.h"
#include "cache.h"
#include "comctl32.h"
#include "debugtools.h"
......@@ -262,7 +261,7 @@ TOOLBAR_DrawString (TOOLBAR_INFO *infoPtr, TBUTTON_INFO *btnPtr,
static void
TOOLBAR_DrawPattern (HDC hdc, LPRECT lpRect)
{
HBRUSH hbr = SelectObject (hdc, CACHE_GetPattern55AABrush ());
HBRUSH hbr = SelectObject (hdc, COMCTL32_hPattern55AABrush);
INT cx = lpRect->right - lpRect->left;
INT cy = lpRect->bottom - lpRect->top;
PatBlt (hdc, lpRect->left, lpRect->top, cx, cy, 0x00FA0089);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment