Procedure TFommain.wmnchitTest(Var M: TWMNCHitTest);
Begin
Inherited;
If M.Result = htclient Then
Begin
M.Result := HTCAPTION;
End;
end;
//这样能实现移动无标题窗体
Procedure TFommain.wmnchitTest(Var M: TWMNCHitTest);
Begin
If M.Result = htclient Then
Begin
M.Result := HTCAPTION;
end;
Inherited; //这样不能实现移动无标题窗体,为什么?
End;这两种方式,对消息的处理有何不同?
Begin
Inherited;
If M.Result = htclient Then
Begin
M.Result := HTCAPTION;
End;
end;
//这样能实现移动无标题窗体
Procedure TFommain.wmnchitTest(Var M: TWMNCHitTest);
Begin
If M.Result = htclient Then
Begin
M.Result := HTCAPTION;
end;
Inherited; //这样不能实现移动无标题窗体,为什么?
End;这两种方式,对消息的处理有何不同?
解决方案 »
- 一个有趣的问题!如何使程序可以调用文本函数!
- EDIT焦点转移问题
- 想检测一个程序启动时是否向硬盘和注册表写入信息,有什么工具吗
- 请问打开带密码的excel文件的语法格式怎么写?
- 用FreePascal能在UNIX下进行比较底层的编程吗??
- 请问这句话出错在哪里?谢
- Delphi程序中调用其他程序的问题
- 我安装了DELPHI7.0,但在VCL找不到QREPORT这页了。怎样把QREPORT组件加进来?
- 我想做打印报表,表格式,有什么好的free控件?
- 急:请教ODAC访问Oracle数据库,查询汉字字段的问题!!!
- (100分)在win98下怎么去掉一个已知handle的窗体的标题栏??
- 怎样才能知道ServerSocket已有多少个连接数?
begin
ReleaseCapture;
SendMessage(form1.Handle, WM_NCLBUTTONDOWN, HTCAPTION,0);
end;若窗体的表面被别的控件履盖掉,则需要把上面的代码加入履盖的控件里面。版权归金晨所有,请不要转载!**************************/
====================
hittest是什么东东?
-----------------------------
The framework calls this member function for the CWnd object that contains the cursor (or the CWnd object that used the SetCapture member function to capture the mouse input) every time the mouse is moved.
HTBORDER In the border of a window that does not have a sizing border.
HTBOTTOM In the lower horizontal border of the window.
HTBOTTOMLEFT In the lower-left corner of the window border.
HTBOTTOMRIGHT In the lower-right corner of the window border.
HTCAPTION In a title-bar area.
HTCLIENT In a client area.
HTERROR On the screen background or on a dividing line between windows (same as HTNOWHERE except that the DefWndProc Windows function produces a system beep to indicate an error).
HTGROWBOX In a size box.
HTHSCROLL In the horizontal scroll bar.
HTLEFT In the left border of the window.
HTMAXBUTTON In a Maximize button.
HTMENU In a menu area.
HTMINBUTTON In a Minimize button.
HTNOWHERE On the screen background or on a dividing line between windows.
HTREDUCE In a Minimize button.
HTRIGHT In the right border of the window.
HTSIZE In a size box (same as HTGROWBOX).
HTSYSMENU In a Control menu or in a Close button in a child window.
HTTOP In the upper horizontal border of the window.
HTTOPLEFT In the upper-left corner of the window border.
HTTOPRIGHT In the upper-right corner of the window border.
HTTRANSPARENT In a window currently covered by another window.
HTVSCROLL In the vertical scroll bar.
HTZOOM In a Maximize button.
Begin
If M.Result = htclient Then
Begin
M.Result := HTCAPTION;
End;
Inherited;
End;inherited意思是继承原有的消息处理函数.
你把inherited放到判断后面.开始判断的时候没有得到htClient消息.