ZJ.Mike.2009 has asked for the wisdom of the Perl Monks concerning the following question:

Greetings, Perl Monks :)

I'm learning to add GUI to my Perl application using Win32::GUI. Now I can make the whole title bar disappear by setting the object style to 0x80000000 or change the icon of a Win32 title bar 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 the other stuff, say, the background color, the look and feel of the minimize button?

I googled the subject and found several relevant articles. They talk about stuff like non client area paiting but the code snippets seem to be all written in C or C#, with which I don't have a good familiarity. Actually I'm learning Perl as my first programming language.

How do I customize the win32 title bar or create my own? 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? Thanks for any guidance

UPDATE

Can I first make the title bar disappear and then add a label where the original title bar was and then add some other labels as the minimize button and close button? But how can I move the Window object when my mouse is on the label?

  • Comment on How do I customize the win32 title bar or create my own in Perl way?
  • Download Code

Replies are listed 'Best First'.
Re: How do I customize the win32 title bar or create my own in Perl way?
by Anonymous Monk on Jan 26, 2010 at 01:49 UTC
    MSDN
      Thanks, Anonymous Monk. Looks like there're some good step by step tutorials on how to do the job in C or C# or similar. But I don't know how to rewrite them in Perl.
        Find code written for the bare Win32 API, and load functions with Win32::API->Import, eg
        Win32::API->Import( # http://msdn.microsoft.com/en-us/library/ms644950%28VS.85%29.aspx user32=>'LRESULT SendMessage( HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam )');