如上,怎样改变对话框标题栏的大小?用什么API?
解决方案 »
- Windows API ReadFile 失败时,文件读取位置会不会改变?
- 在COM用中连接点的方式实现事件,客户端一定要用IDispatch接口吗?
- 如何让鼠标移动到按钮附近时出现提示信息
- c++里生成随机数的函数是什么?
- 基于对话框的程序中,我加了一个Edit控件,如何改写这个Edit控件的右键菜单~?
- 客户端怎样判断sqlserver服务器是否以打开 100分
- 多线程,函数调用与函数局部变量问题
- 读取缓存的函数get_Input()不读取数据了
- 怎样得到CRichEditView中鼠标光标的行、列值??
- 为什么web控件在另外一个对话框上根本没任何反应
- 请教一个Slider 的分段显示问题
- 开发动态链接库
ncm.cbSize = sizeof( NONCLIENTMETRICS );::SystemParametersInfo( SPI_GETNONCLIENTMETRICS,
sizeof( NONCLIENTMETRICS ),
&ncm,
0
);ncm.lfCaptionFont.lfHeight = -300;
::SystemParametersInfo( SPI_SETNONCLIENTMETRICS,
sizeof( NONCLIENTMETRICS ),
&ncm,
SPIF_SENDCHANGE
);
方法二:case WM_NCCALCSIZE:
{
BOOL bSpecial=FALSE;
int nEdgeWidth =3;
int nBarHeight =CAPTIONHEIGHT+3;
int nBottomEdge =3;if(!(BOOL)wParam)
{
RECT rtSave;
CopyRect(&rtSave,(LPRECT)lParam);
// ::CallWindowProcA(lpwndinfo->pWndProc,hWnd,uMsg,wParam,lParam);
if(lpwndinfo->bIM ==TRUE)
{
int imbarheight =17;
rtSave.left+=nEdgeWidth;
rtSave.top+=imbarheight+3;
rtSave.right-=nEdgeWidth;
rtSave.bottom-=nBottomEdge;
}
else
{
rtSave.left+=nEdgeWidth;
rtSave.top+=nBarHeight;
rtSave.right-=nEdgeWidth;
rtSave.bottom-=nBottomEdge;
}
CopyRect((LPRECT)lParam,&rtSave);*lResult=0;
::ReleaseDC(hWnd,hDC);
return TRUE;
}
else
{
RECT rtSave;
LPRECT prtClt;
LPNCCALCSIZE_PARAMS pNC;
pNC=(LPNCCALCSIZE_PARAMS)lParam;prtClt=&(pNC->rgrc[0]);
CopyRect(&rtSave,prtClt);
CopyRect( &(pNC->rgrc[2]), &(pNC->rgrc[1]));if(bSysDlg)
{
(pNC->rgrc[2]).left +=nEdgeWidth;
(pNC->rgrc[2]).right -=nEdgeWidth;
}
else
{
if(lpwndinfo->bIM ==TRUE)
{
int imbarheight =17;
(pNC->rgrc[2]).left +=nEdgeWidth;
(pNC->rgrc[2]).top +=imbarheight+3;
(pNC->rgrc[2]).right -=nEdgeWidth;
(pNC->rgrc[2]).bottom -=nBottomEdge; rtSave.left+=nEdgeWidth;
rtSave.top+=imbarheight+3;
rtSave.right-=nEdgeWidth;
rtSave.bottom-=nBottomEdge;
}
else
{
(pNC->rgrc[2]).left+=nEdgeWidth;
(pNC->rgrc[2]).top+=nBarHeight;
(pNC->rgrc[2]).right-=nEdgeWidth;
(pNC->rgrc[2]).bottom-=nBottomEdge;
// Result=::CallWindowProcA(lpwndinfo->pWndProc,hWnd,uMsg,wParam,lParam);
//prtClt=&(pNC->rgrc[0]);
rtSave.left+=nEdgeWidth;
rtSave.top+=nBarHeight;
rtSave.right-=nEdgeWidth;
rtSave.bottom-=nBottomEdge;
}
}
CopyRect(prtClt,&rtSave);
*lResult=0;
::ReleaseDC(hWnd,hDC);
return TRUE;
}
break;
}
你好强哦.刚谢谢你哦.