How to completely change the appearance of a Win32 header line with Perl?

I am learning to add a graphical interface to my Perl program using the Win32 :: GUI . Now I can change the Win32 header line icon using something like:

$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, ); 

But what about another material, say, the background color, the look of the Minimize button?

I searched the topic and found several possible articles. They talk about things like the non-client area paiting, etc., but the code snippets seem to be all written in C, with which I have no good acquaintance.

I was wondering if someone here has shared some pieces of code written in Perl that deal with a similar situation? Or maybe there is a Perl module that can make the task easier?

Thanks for any recommendations :)

**** **** Update1

Is it possible to remove the title bar first, and then add the label where the original title bar was, and then add some other buttons to minimize and close the object?

Now the problem is this: how can I move the Window object when my mouse is on a shortcut?

**** **** UPDATE2

I found several pieces of VB code that should do the work that I want to do in Perl. Can someone help me rewrite them in Win32 :: GUI? The following VB code is from 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 
+4
source share
1 answer

Windows are designed by the operating system in accordance with the preferences of the user. They are (ideally) standardized in all applications and allow you to quickly and easily learn new applications.

In addition, some users customize the appearance of window decorations to compensate for problems, including poor eyesight or old devices.

There is an excellent and extremely important QuickTime 4.0 entry in the UI Hall of Shame that goes into some detail explaining why the default override of the operating system looks bad and what problems it might cause.

The decision to cancel the existing front-end controls provided by the operating system poses a lot of problems. Decision not to provide For example, the title bar has led to the loss of a standard control window. Windows users will find that the player does not offer a visual indication of how to move, minimize or maximize the player window ...

+6
source

Source: https://habr.com/ru/post/1299287/


All Articles