下面是一個範例
LONG SetNoTitleBar(HWND hwnd,bool bEnable,LONG Restore_style){
LONG curStyle=GetWindowLong (hwnd,GWL_STYLE);
if(bEnable){
// 選擇設定無標題視窗
SetWindowLong(hwnd,GWL_STYLE,curStyle&(~WS_CAPTION));
}else{
// 選擇恢復以前的 style
SetWindowLong(hwnd,GWL_STYLE,Restore_style);
}
return curStyle;
}
Enjoy! by Jing
沒有留言:
張貼留言