Take the scratch program from part 1, and we'll add a Label displaying a bitmap that is too large to fit in the window.
5 use Win32::GUI 1.05 qw( CW_USEDEFAULT WS_CLIPCHILDREN );
We add the style WS_CLIPCHILDREN to the window to prevent flickering caused by the erase of the window background followed by the re-draw of the bitmap when the window is re-sized. This is one of a number of flicker-reducing techniques that might make for a good series of articles in the future.
Adding a bitmap is as simple as creating a Win32::GUI::Bitmap object, passing the bitmap's filename to the constructor, and then passing the object to the AddLabel() method. A Label automatically sizes to the size of its bitmap if no other sizing options are supplied.
Again, here's the full code for this article: