title: How do I completely change the appearance of a Win32 title bar from Perl?
body: <p>I'm learning to add GUI to my Perl program using <a href="http://search.cpan.org/dist/Win32-GUI" rel="nofollow noreferrer">Win32::GUI</a>. Now I can change the icon of a Win32 title bar using something like:</p>
  
  <pre><code>$myicon = new Win32::GUI::Icon('myicon.ico');
  $myclass=new Win32::GUI::Class(
  -name=&gt;'myclass',                     
  -icon=&gt;$myicon,  
      );  
  $mydialogbox = new Win32::GUI::DialogBox(
    -name         =&gt; 'mydialogbox',
    -class        =&gt; $myclass,
    );
  </code></pre>
  
  <p>But what about the other stuff, say, the background color, the look and feel of the minimize button? </p>
  
  <p>I googled the subject and found several possibly relevant articles. They talk about stuff like non client area paiting etc etc. but the code snippets seem to be all written in C, with which I don't have a good familiarity.</p>
  
  <p>I was wondering if someone here could kindly share some code snippets written in Perl that deals with the similar situation? Or, is there, hopefully, a Perl module that can facilitate the task? </p>
  
  <p>Thanks for any guidance :)</p>
  
  <p>****UPDATE1****</p>
  
  <p>Can I first make the title bar disappear and then add a label where the original title bar was and then add some other buttons to minimize and close the object? </p>
  
  <p>Now the problem is: how can I move the Window object when my mouse is on the label? </p>
  
  <p>****UPDATE2****</p>
  
  <p>I've found some VB code snippets that are supposed to do the job I want to accomplish in Perl. Can someone kindly help me rewrite them in Win32::GUI? 
  The following VB code is from <a href="http://www.developerfusion.com/code/2565/custom-title-bar/" rel="nofollow noreferrer">here</a>:</p>
  
  <pre><code>    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 = &amp;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&amp;
  End Sub 
  </code></pre>