我想要一個帶有BorderStyle = bsNone(無邊框,無標題)的TForm,但它可以調整大小和移動。我已經想出瞭如何做可調整的部分,但我堅持讓它可移動。C++ Builder:使用BorderStyle bsNone創建一個TForm,但仍然可移動和可調整大小
/**
* Overrides standard CreateParams method to create a TForm with BorderStyle
* bsNone but is nevertheless movable and resizable
**/
void __fastcall CreateParams(TCreateParams &Params)
{
BorderStyle = bsNone;
TForm::CreateParams(Params);
//set flag WS_EX_STATICEDGE
//for more details on this flag, see http://msdn.microsoft.com/en-us/library/ms632680(v=vs.85).aspx
Params.ExStyle = Params.ExStyle^0x00020000L;
//set flag WS_SIZEBOX
//for more details on this flag, see http://msdn.microsoft.com/en-us/library/ff700543(v=VS.85).aspx
Params.Style = Params.Style^0x00040000L;
}
這可能只是找到正確的標誌的問題。有任何想法嗎?
非常感謝!這是我非常樂意接受! – mort