[comp.windows.ms.programmer] Strange combo box behavior

andrew@cbnewsk.att.com (andrew.shajenko) (01/10/91)

I've just encountered a strange problem in one of the dialog boxes of
my application.  This particular dialog box contains about 30 controls,
all standard types.  There are two combo boxes of equal size close to
each other, as such: 

		----------------
        Item A	| XXXXX    | v |
		----------------

		----------------
        Item B  | XXX      | v |
		----------------

After the Item A combo box is dropped down and restored, part of the
bottom line of its rectangle is missing, like so:

		----------------
        Item A	| XXXX     | v |
		     -----------

		----------------
        Item B  | XXX      | v |
		----------------

Otherwise the combo box control works fine, as does the application.
I've tried moving the Item A box and looked for all kinds of possible
programming errors - but to no avail.  This is a normal dialog box
started up via DialogBox() and the template was created with the
SDK dialog editor.

Has anyone seen a similar problem?  Any suggestions or fixes would
be welcome.

Thanks,  Andy Shajenko @ AT&T Bell Labs  (908) 949-9030
att!homxa!andrew

stesu@sssab.se (Sten Sunnergren) (01/16/91)

In article <1991Jan9.191525.8829@cbnewsk.att.com>, andrew@cbnewsk.att.com (andrew.shajenko) writes:
>[...]
>Has anyone seen a similar problem?  Any suggestions or fixes would
>be welcome.

Check, with the dialog editor, if there is another control that 
in some situations is displayed above your combo-box. It could 
be a rest from your process of creating the dialog box, not used 
in the program any longer. It could also be a control which is 
larger than it must be. Look at this for example: 

				----------------
		        Item A	| XXXX     | v |
=====================================-----------
| Static text                       |
=====================================
				----------------
		        Item B  | XXX      | v |
				----------------

The static text does not need to be longer than to the end of 
"text", but the control is defined to be shown size. 

I hope this helped you. I have had a number of similar 
problems myself. 

	Sten Sunnergren 
	Scandinavian System Support AB 
	Linkvping 
	Sweden