$myicon = new Win32::GUI::Icon('myicon.ico'); $myclass=new Win32::GUI::Class( -name=>'myclass',-icon=>$myicon,); $mydialogBox = new Win32::GUI::DialogBox( -name => 'mydialogBox',-class => $myclass,);
但是,其他的东西,比如背景颜色,最小化按钮的外观和感觉呢?
我搜索了这个主题并找到了几篇可能相关的文章.他们谈论非客户区域等等的东西,但代码片段似乎都是用C语言编写的,我对此并不熟悉.
我想知道是否有人在这里可以分享一些用Perl编写的代码片段来处理类似的情况?或者,希望是否有可以促进任务的Perl模块?
谢谢你的任何指导:)
**** **** UPDATE1
我可以先使标题栏消失,然后在原始标题栏中添加标签,然后添加一些其他按钮以最小化和关闭对象吗?
现在的问题是:当我的鼠标在标签上时,如何移动Window对象?
**** **** UPDATE2
我发现了一些VB代码片段应该完成我想要在Perl中完成的工作.有人可以帮我在Win32 :: GUI中重写它们吗?
以下VB代码来自here:
Option Explicit ' API functions Private Declare Function ReleaseCapture Lib "user32" () As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long,ByVal wMsg As Long,ByVal wParam As Long,lParam As Any) As Long Private Declare Function SetWindowText Lib "user32" Alias "SetWindowTextA" (ByVal hwnd As Long,ByVal lpString As String) As Long ' Constants for above API calls Private Const HTCAPTION = 2 Private Const WM_NCLBUTTONDOWN = &HA1 Private Sub Form_Load() Dim retVal As Long retVal = SetWindowText(Me.hwnd,Label1) End Sub Private Sub Label1_MouseDown(Button As Integer,Shift As Integer,X As Single,Y As Single) ReleaseCapture SendMessage hwnd,WM_NCLBUTTONDOWN,HTCAPTION,0& End Sub
解决方法
此外,一些用户调整窗户装饰的外观以补偿视力不佳或旧设备等问题.
有一个非常重要且非常关键的writeup of QuickTime 4.0 on the UI Hall of Shame详细说明,解释了为什么覆盖默认操作系统的外观和感觉很糟糕,以及它可能导致什么样的问题.
The decision to eschew the existing interface controls provided by the operating system creates a variety of problems. The decision not to provide a title bar,for example,resulted in the loss of the standard window management controls. Windows users will find the the player offers no visual indication as to how to move,minimize,or maximize the player window …