本文介绍了使用Aero主题时如何绘制对话框或应用程序的边框和标题?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
首先,对不起我的英语不好.但这不能阻止我学习.
我想用位图绘制边框和标题.我的系统是Windows 7,并打开Aero主题.但是我发现我无法绘制边框或标题栏.而当我关闭Aero主题时,它会起作用.这是我的一些代码.我想知道,当打开Aero主题时如何使它工作?谢谢...
First, sorry for my poor English. But that can''t stop me learn.
I want to draw the border and title with a bitmap. My system is windows 7, and turn on Aero theme. But i found i cannot draw border or title bar. Whereas, when I turn off Aero theme, it works. Here are some of my code. I want to know, how can I make it work when turn on Aero theme? Thanks...
bmp.LoadBitmap(IDB_BITMAP7);
bmp.GetBitmap(&bmpInfo);
pOldBmp = dcMemory.SelectObject(&bmp);
x = bmpInfo.bmWidth;
y = bmpInfo.bmHeight;
lrBorderWidth = ( x > m_nFrameWidth+m_nBorderWidth ) ? x : m_nFrameWidth+m_nBorderWidth;
winDC.StretchBlt( 0,m_nCaptionHeight,lrBorderWidth,winRC.Height()-m_nCaptionHeight,&dcMemory,0,0,x,y,SRCCOPY );
winDC.StretchBlt( winRC.Width()-lrBorderWidth,m_nCaptionHeight,lrBorderWidth,
winRC.Height()-m_nCaptionHeight,&dcMemory,0,0,x,y,SRCCOPY);
dcMemory.SelectObject(pOldBmp);
bmp.DeleteObject();
推荐答案
这篇关于使用Aero主题时如何绘制对话框或应用程序的边框和标题?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!