forked from qdtroy/DuiLib_Ultimate
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
2、修正控件剪裁区域局计算错误的问题 3、duidemo增加启动闪屏的例子
- Loading branch information
Showing
12 changed files
with
166 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
#include "StdAfx.h" | ||
#include "SplashWnd.h" | ||
#include <process.h> | ||
|
||
////////////////////////////////////////////////////////////////////////// | ||
/// | ||
|
||
DUI_BEGIN_MESSAGE_MAP(CSplashWnd, WindowImplBase) | ||
DUI_ON_MSGTYPE(DUI_MSGTYPE_CLICK,OnClick) | ||
DUI_END_MESSAGE_MAP() | ||
|
||
CSplashWnd::CSplashWnd(void) | ||
{ | ||
} | ||
|
||
CSplashWnd::~CSplashWnd(void) | ||
{ | ||
} | ||
|
||
void CSplashWnd::OnFinalMessage( HWND hWnd) | ||
{ | ||
__super::OnFinalMessage(hWnd); | ||
delete this; | ||
} | ||
|
||
DuiLib::CDuiString CSplashWnd::GetSkinFile() | ||
{ | ||
return _T("splash.xml"); | ||
} | ||
|
||
LPCTSTR CSplashWnd::GetWindowClassName( void ) const | ||
{ | ||
return _T("SplashWnd"); | ||
} | ||
|
||
void CSplashWnd::OnClick( TNotifyUI &msg ) | ||
{ | ||
CDuiString sName = msg.pSender->GetName(); | ||
sName.MakeLower(); | ||
|
||
} | ||
|
||
LRESULT CSplashWnd::HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) | ||
{ | ||
bHandled = FALSE; | ||
return 0; | ||
} | ||
|
||
LRESULT CSplashWnd::OnSysCommand( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled ) | ||
{ | ||
bHandled = FALSE; | ||
return 0L; | ||
} | ||
|
||
void Busy( void* param ) | ||
{ | ||
int i = 0; | ||
while(i++ < 5) | ||
{ | ||
Sleep(300); | ||
} | ||
::PostMessage((HWND)param, WM_CLOSE, 0, 0); | ||
} | ||
void CSplashWnd::InitWindow() | ||
{ | ||
_beginthread(Busy, 0, m_hWnd); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#pragma once | ||
|
||
////////////////////////////////////////////////////////////////////////// | ||
/// | ||
|
||
class CSplashWnd : public WindowImplBase | ||
{ | ||
public: | ||
static int MessageBox(HWND hParent) | ||
{ | ||
CSplashWnd* pWnd = new CSplashWnd(); | ||
pWnd->Create(hParent, _T("msgwnd"), WS_POPUP | WS_CLIPCHILDREN, WS_EX_TOOLWINDOW); | ||
pWnd->CenterWindow(); | ||
return pWnd->ShowModal(); | ||
} | ||
|
||
public: | ||
CSplashWnd(void); | ||
~CSplashWnd(void); | ||
|
||
public: | ||
virtual void OnFinalMessage( HWND ); | ||
virtual CDuiString GetSkinFile(); | ||
virtual LPCTSTR GetWindowClassName( void ) const; | ||
virtual void InitWindow(); | ||
|
||
DUI_DECLARE_MESSAGE_MAP() | ||
virtual void OnClick(TNotifyUI& msg); | ||
|
||
virtual LRESULT OnSysCommand( UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled ); | ||
LRESULT HandleCustomMessage(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled); | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
|
||
<Window caption="0,0,0,300" size="400,300" mininfo="400,300" sizebox="6,6,6,6" > | ||
<VerticalLayout name="root" bkcolor="#EE202223"> | ||
<VerticalLayout bkcolor="#EEFFFFFF" childalign="center"> | ||
<Control /> | ||
<Ring name="ring" text="Ring" textcolor="#FF333333" align="center" valign="vcenter" height="200" width="200" bkimage="common/ring.png"/> | ||
<Control /> | ||
</VerticalLayout> | ||
</VerticalLayout> | ||
</Window> |