#include "StdAfx.h"
#include "UIManager.h"
#include "UIAnim.h"
#include <zmouse.h>
/////////////////////////////////////////////////////////////////////////////////////
//
//
static UINT GetNameHash(LPCTSTR pstrName)
{
UINT i = 0;
SIZE_T len = _tcslen(pstrName);
while( len-- > 0 ) i = (i << 5) + i + pstrName[len];
return i;
}
static UINT MapKeyState()
{
UINT uState = 0;
if( ::GetKeyState(VK_CONTROL) < 0 ) uState |= MK_CONTROL;
if( ::GetKeyState(VK_RBUTTON) < 0 ) uState |= MK_LBUTTON;
if( ::GetKeyState(VK_LBUTTON) < 0 ) uState |= MK_RBUTTON;
if( ::GetKeyState(VK_SHIFT) < 0 ) uState |= MK_SHIFT;
if( ::GetKeyState(VK_MENU) < 0 ) uState |= MK_ALT;
return uState;
}
/////////////////////////////////////////////////////////////////////////////////////
//
#define IDB_ICONS16 200
#define IDB_ICONS24 201
#define IDB_ICONS32 202
#define IDB_ICONS50 203
typedef struct tagFINDTABINFO
{
CControlUI* pFocus;
CControlUI* pLast;
bool bForward;
bool bNextIsIt;
} FINDTABINFO;
typedef struct tagFINDSHORTCUT
{
TCHAR ch;
bool bPickNext;
} FINDSHORTCUT;
typedef struct tagTIMERINFO
{
CControlUI* pSender;
UINT nLocalID;
HWND hWnd;
UINT uWinTimer;
} TIMERINFO;
/////////////////////////////////////////////////////////////////////////////////////
//
CAnimationSpooler m_anim;
HPEN m_hPens[UICOLOR__LAST] = { 0 };
HFONT m_hFonts[UIFONT__LAST] = { 0 };
HBRUSH m_hBrushes[UICOLOR__LAST] = { 0 };
LOGFONT m_aLogFonts[UIFONT__LAST] = { 0 };
COLORREF m_clrColors[UICOLOR__LAST][2] = { 0 };
TEXTMETRIC m_aTextMetrics[UIFONT__LAST] = { 0 };
HIMAGELIST m_himgIcons16 = NULL;
HIMAGELIST m_himgIcons24 = NULL;
HIMAGELIST m_himgIcons32 = NULL;
HIMAGELIST m_himgIcons50 = NULL;
/////////////////////////////////////////////////////////////////////////////////////
HINSTANCE CPaintManagerUI::m_hInstance = NULL;
HINSTANCE CPaintManagerUI::m_hLangInst = NULL;
CStdPtrArray CPaintManagerUI::m_aPreMessages;
CPaintManagerUI::CPaintManagerUI() :
m_hWndPaint(NULL),
m_hDcPaint(NULL),
m_hDcOffscreen(NULL),
m_hbmpOffscreen(NULL),
m_hwndTooltip(NULL),
m_uTimerID(0x1000),
m_pRoot(NULL),
m_pFocus(NULL),
m_pEventHover(NULL),
m_pEventClick(NULL),
m_pEventKey(NULL),
m_bFirstLayout(true),
m_bFocusNeeded(false),
m_bResizeNeeded(false),
m_bMouseTracking(false),
m_bOffscreenPaint(true),
m_aPostPaint(sizeof(TPostPaintUI))
{
if( m_hFonts[1] == NULL )
{
// Fill in default font information
LOGFONT lf = { 0 };
::GetObject(::GetStockObject(DEFAULT_GUI_FONT), sizeof(LOGFONT), &lf);
_tcscpy(lf.lfFaceName, _T("Tahoma"));
// TODO: Handle "large fonts" or other font sizes when
// screen resolution changes!!!
lf.lfHeight = -12;
m_aLogFonts[UIFONT_NORMAL] = lf;
m_aLogFonts[UIFONT_CAPTION] = lf;
LOGFONT lfBold = lf;
lfBold.lfWeight += FW_BOLD;
m_aLogFonts[UIFONT_BOLD] = lfBold;
lfBold.lfHeight -= 2;
m_aLogFonts[UIFONT_TITLE] = lfBold;
lfBold.lfHeight -= 4;
m_aLogFonts[UIFONT_HEADLINE] = lfBold;
LOGFONT lfSubscript = lf;
lfSubscript.lfHeight -= 4;
m_aLogFonts[UIFONT_SUBSCRIPT] = lfSubscript;
LOGFONT lfLink = lf;
lfLink.lfUnderline = TRUE;
m_aLogFonts[UIFONT_LINK] = lfLink;
// Fill the color table
m_clrColors[UICOLOR_WINDOW_BACKGROUND][0] = RGB(239,239,235);
m_clrColors[UICOLOR_DIALOG_BACKGROUND][0] = RGB(238,238,238);
m_clrColors[UICOLOR_DIALOG_TEXT_NORMAL][0] = RGB(0,0,0);
m_clrColors[UICOLOR_DIALOG_TEXT_DARK][0] = RGB(96,96,80);
m_clrColors[UICOLOR_TITLE_BACKGROUND][0] = RGB(114,136,172);
m_clrColors[UICOLOR_TITLE_TEXT][0] = RGB(255,255,255);
m_clrColors[UICOLOR_TITLE_BORDER_LIGHT][0] = RGB(171,192,231);
m_clrColors[UICOLOR_TITLE_BORDER_DARK][0] = RGB(0,55,122);
m_clrColors[UICOLOR_BUTTON_BACKGROUND_NORMAL][0] = RGB(250,250,252);
m_clrColors[UICOLOR_BUTTON_BACKGROUND_NORMAL][1] = RGB(215,215,227);
m_clrColors[UICOLOR_BUTTON_BACKGROUND_DISABLED][0] = RGB(248,248,248);
m_clrColors[UICOLOR_BUTTON_BACKGROUND_DISABLED][1] = RGB(214,214,214);
m_clrColors[UICOLOR_BUTTON_BACKGROUND_PUSHED][0] = RGB(215,215,227);
m_clrColors[UICOLOR_BUTTON_BACKGROUND_PUSHED][1] = RGB(250,250,252);
m_clrColors[UICOLOR_BUTTON_TEXT_NORMAL][0] = RGB(0,0,0);
m_clrColors[UICOLOR_BUTTON_TEXT_PUSHED][0] = RGB(0,0,20);
m_clrColors[UICOLOR_BUTTON_TEXT_DISABLED][0] = RGB(204,204,204);
m_clrColors[UICOLOR_BUTTON_BORDER_LIGHT][0] = RGB(123,158,189);
m_clrColors[UICOLOR_BUTTON_BORDER_DARK][0] = RGB(123,158,189);
m_clrColors[UICOLOR_BUTTON_BORDER_DISABLED][0] = RGB(204,204,204);
m_clrColors[UICOLOR_BUTTON_BORDER_FOCUS][0] = RGB(140,140,140);
m_clrColors[UICOLOR_TOOL_BACKGROUND_NORMAL][0] = RGB(114,136,172);
m_clrColors[UICOLOR_TOOL_BACKGROUND_DISABLED][0] = RGB(100,121,156);
m_clrColors[UICOLOR_TOOL_BACKGROUND_HOVER][0] = RGB(100,121,156);
m_clrColors[UICOLOR_TOOL_BACKGROUND_PUSHED][0] = RGB(80,101,136);
m_clrColors[UICOLOR_TOOL_BORDER_NORMAL][0] = RGB(0,55,122);
m_clrColors[UICOLOR_TOOL_BORDER_DISABLED][0] = RGB(0,55,122);
m_clrColors[UICOLOR_TOOL_BORDER_HOVER][0] = RGB(0,55,122);
m_clrColors[UICOLOR_TOOL_BORDER_PUSHED][0] = RGB(0,55,122);
m_clrColors[UICOLOR_EDIT_BACKGROUND_DISABLED][0] = RGB(255,251,255);
m_clrColors[UICOLOR_EDIT_BACKGROUND_READONLY][0] = RGB(255,251,255);
m_clrColors[UICOLOR_EDIT_BACKGROUND_NORMAL][0] = RGB(255,255,255);
m_clrColors[UICOLOR_EDIT_BACKGROUND_HOVER][0] = RGB(255,251,255);
m_clrColors[UICOLOR_EDIT_TEXT_NORMAL][0] = RGB(0,0,0);
m_clrColors[UICOLOR_EDIT_TEXT_DISABLED][0] = RGB(167,166,170);
m_clrColors[UICOLOR_EDIT_TEXT_READONLY][0] = RGB(167,166,170);
m_clrColors[UICOLOR_NAVIGATOR_BACKGROUND][0] = RGB(229,217,213);
m_clrColors[UICOLOR_NAVIGATOR_BACKGROUND][1] = RGB(201,199,187);
m_clrColors[UICOLOR_NAVIGATOR_TEXT_NORMAL][0] = RGB(102,102,102);
m_clrColors[UICOLOR_NAVIGATOR_TEXT_SELECTED][0] = RGB(0,0,0);
m_clrColors[UICOLOR_NAVIGATOR_TEXT_PUSHED][0] = RGB(0,0,0);
m_clrColors[UICOLOR_NAVIGATOR_BORDER_NORMAL][0] = RGB(131,133,116);
m_clrColors[UICOLOR_NAVIGATOR_BORDER_SELECTED][0] = RGB(159,160,144);
m_clrColors[UICOLOR_NAVIGATOR_BUTTON_HOVER][0] = RGB(200,200,200);
m_clrColors[UICOLOR_NAVIGATOR_BUTTON_PUSHED][0] = RGB(184,184,183);
m_clrColors[UICOLOR_NAVIGATOR_BUTTON_SELECTED][0] = RGB(238,238,238);
m_clrColors[UICOLOR_TAB_BACKGROUND_NORMAL][0] = RGB(255,251,255);
m_clrColors[UICOLOR_TAB_FOLDER_NORMAL][0] = RGB(255,251,255);
m_clrColors[UICOLOR_TAB_FOLDER_NORMAL][1] = RGB(233,231,215);
m_clrColors[UICOLOR_TAB_FOLDER_SELECTED][0] = RGB(255,251,255);
m_clrColors[UICOLOR_TAB_BORDER][0] = RGB(148,166,181);
m_clrColors[UICOLOR_TAB_TEXT_NORMAL][0] = RGB(0,0,0);
m_clrColors[UICOLOR_TAB_TEXT_SELECTED][0] = RGB(0,0,0);
m_clrColors[UICOLOR_TAB_TEXT_DISABLED][0] = RGB(0,0,0);
m_clrColors[UICOLOR_HEADER_BACKGROUND][0] = RGB(233,231,215);
m_clrColors[UICOLOR_HEADER_BACKGROUND][1] = RGB(150,150,147);
m_clrColors[UICOLOR_HEADER_BORDER][0] = RGB(218,219,201);
m_c
没有合适的资源?快使用搜索试试~ 我知道了~
开源的DirectUI框架
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共58个文件
h:23个
cpp:22个
bmp:4个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
需积分: 28 23 下载量 78 浏览量
2018-01-25
22:22:46
上传
评论
收藏 19.49MB ZIP 举报
温馨提示
该资源是开源的DirectUI框架,集成度比较好,重用性好,在此基础上开发可提高界面编程效率。
资源推荐
资源详情
资源评论
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![application/x-zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![gz](https://img-home.csdnimg.cn/images/20210720083447.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/BMP.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/BMP.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/BMP.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/BMP.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/RAR.png)
共 58 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/default.jpg!1)
oyfj110
- 粉丝: 0
- 资源: 2
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)