用C++Builder修改系统菜单

类别:编程语言 点击:0 评论:0 推荐:

在FormCreate加入:

HWND hSysMenu;
LONG dw;
Form1->Height =80;
Form1->Width = 250;
Form1->Left = Screen->Width/2;
Form1->Top =Screen->Height/3;
hSysMenu=GetSystemMenu(Form1->WindowHandle,0);
RemoveMenu(hSysMenu, 4, 0x400);//取消系统菜单最大化
dw=GetWindowLong(Form1->WindowHandle, -16);   //Window style
dw=dw&0xFFFEFFFF;            //Turn off Maximize button
SetWindowLong(Form1->WindowHandle, -16, dw);

MSDN中有一篇VB的文章.

本人把它转为BCB

本文地址:http://com.8s8s.com/it/it30234.htm