Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS Tech Support » Static bitmap? Collapse All
Subject Author Date
John Kiernan May 12, 2006 - 12:39 PM

Sorry about such a basic question, but I’ve been searching around everywhere I can’t seem to figure out how to get just a plain static bitmap to work.
(i.e. placing a CStatic type bitmap on a dialog)

Technical Support May 15, 2006 - 1:36 AM

You should add the a static bitmap control to your dialog template resource and specify the identifier of a bitmap resource to be displayed in it. This can be done by specifying the properties of the static bitmap control. You can also use the CStatic::SetBitmap() API to assign the bitmap handle to the static control.

John Kiernan May 15, 2006 - 8:20 AM

Yeah, sorry I was a bit vague on my question. I guess my question was really "How do I get a static bitmap to work _correctly_ with Prof-UIS?"
If I add a static bitmap normally (Through the VS7.10 GUI) -- The bitmap is there initially but if I minimize the window and restore the window the Bitmap is not re-drawn properly. The static bitmap is the only control that is not based on a Prof-UIS class so I’m guessing I’m not doing something right with the static bitmap.

Technical Support May 15, 2006 - 10:18 AM

We recommend you use the following rules when coding a dialog, especially a resizable dialog:

1) Subclass all common controls with Prof-UIS classes. Use the CExtLabel class for a static bitmap.

2) Specify the WS_CLIPSIBLINGS|WS_CLIPCHILDREN styles in the properties of the dialog template resource. This is required to avoid flickering of popup and child dialogs.

3) If you have a group box window, the CExtGroupBox class should be used for subclassing it and the tab order number of the group box control should be greater than the tab order of any control inside the group box. We may guess the problem described in your message is caused by an incorrect tab order.