The MASM Forum Archive 2004 to 2012

General Forums => The Campus => Topic started by: Samishii23 on September 23, 2010, 04:13:40 PM

Title: PictureBox in ASM?
Post by: Samishii23 on September 23, 2010, 04:13:40 PM
As the subject states. I was wondering if there is a way to make something similar to the PictureBox control in .NET in ASM.
I looked through MSDN's resource list, seen the Icon control and Bitmap control. But wasn't sure if the Bitmap control can accept a JPG / PNG format.
And is that Control hideable / dynamically changeable during run time?

Thanks, -Tony-
Title: Re: PictureBox in ASM?
Post by: donkey on September 23, 2010, 04:42:21 PM
A picture box is simply a static control with the style SS_BITMAP. To support other image formats you have to convert them to BITMAP, the IPicture interface or GDI+ will do the conversion for you.
Title: Re: PictureBox in ASM?
Post by: Samishii23 on September 23, 2010, 05:28:49 PM
What static control though? The BITMAP control?
And is it Runtime editable?
Title: Re: PictureBox in ASM?
Post by: donkey on September 23, 2010, 10:39:15 PM
Quote from: Samishii23 on September 23, 2010, 05:28:49 PM
What static control though? The BITMAP control?
And is it Runtime editable?

Static controls are one of the base windows controls. Yes they are runtime editable, if I understand your meaning correctly. You can alter their dimensions, visibility, and content programatically. As well, through subclassing and superclassing you can have the user interact with them directly though by default they do not take input.

CreateWindowEx (Windows controls) (http://msdn.microsoft.com/en-us/library/ms632680(VS.85).aspx)
Subclassing/Superclassing windows (http://msdn.microsoft.com/en-us/library/ms633569(VS.85).aspx)


Edgar