{S0}简介
这是一个XP dockbar像苹果公司的dockbar方案。切换滚动翻转动画效果。使用代码
第1步。这一步inludes加载库quot; User32.DLLquot为quot; UpdateLayeredWindowquot;功能。这是每一个像素的alpha透明度。因此,我们没有更多的锯齿状边缘。hFuncInst = LoadLibrary("User32.DLL");
BOOL bRet=FALSE;
if(hFuncInst){
UpdateLayeredWindow=(MYFUNC)GetProcAddress(hFuncInst, "UpdateLayeredWindow");
}
else
{
AfxMessageBox("User32.dll ERROR!");
exit(0);
}
第2步。初始化GDI的。{C}
第3步。现在,DrawTXBar功能。
兴趣点void DrawTXBar()
{
DWORD dwExStyle=GetWindowLong(m_hWnd,GWL_EXSTYLE);
if((dwExStyle&0x80000)!=0x80000)
SetWindowLong(m_hWnd,GWL_EXSTYLE,dwExStyle^0x80000);
BOOL bRet=FALSE;
bRet= UpdateLayeredWindow( m_hWnd,hdcScreen,&ptWinPos,
&sizeWindow,m_hdcMemory,&ptSrc,0,&m_Blend,2);
//UpdateLayeredWindow" must By execute
//one hypo- one to Update the alpha window's Image.
...
}
API函数"UpdateLayeredWindowquot;必须执行更新的α窗口的形象。