News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

ComboBox flicker

Started by Jimg, August 27, 2005, 02:10:55 AM

Previous topic - Next topic

Jimg

This is a dialog with a simple combobox.  I added code to resize the combobox when the dialog was resized.  I'm getting some gray bars flickering on the combobox during resizing.  I've tried edits, listviews, listboxes, etc., and the combobox is the only one that has this problem.  Is there some setting to a combobox to stop this flickering.  In trying to research this, the only advice I found was to use DeferWindowPos but this seems like gross overkill for one simple control.  Does anyone know how to stop this flickering?  If DeferWindowPos is the only solution, does anyone have a simple example of using it?



[attachment deleted by admin]

hutch--

Jim,

There is no simple solution to flickering with controls as they are both parent window and child window are upgrading their display on the same piece of screen space at the same time. What I try and do with this situation is to cover the client area in the window entitely with controls and then set the parent background brush to transparent. It sovles most of the problems most of the time.

Now from memory there are CreateWindowEx() styles that help to some extent and if you don't need them in a parent window, don't upgrade te client area just with vertical or horizontal resizing.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

ToutEnMasm

Hello,
The most common error is to forget this style,WS_CLIPSIBLING =  0x2000000
I test it and it works.
                                      ToutEnMasm

101 DIALOGEX 0,0,198,171
CAPTION "Simple ComboBox Test"
FONT 8,"Tahoma"
STYLE 0xb0cc0880 | 0x2000000
EXSTYLE 0x00000000
BEGIN
   CONTROL "My Combo Box",cb,"ComboBox",0x50010441,11,14,176,147,0x00000000
END



Jimg

Excellent!  Thank you ToutEnMasm, I am very appreciative  :cheekygreen:

The bit ( 0x2000000 ) is the correct one to use as you say, but it's name is WS_CLIPCHILDREN.

Now to find out what other effects this has  :P

PBrennick

Jimg,
That is correct.

WS_CLIPCHILDREN has a value of 2000000h
WS_CLIPSIBLINGS has a value of 4000000h.

Still, his fix worked very well, didn't it?  :U

Paul
The GeneSys Project is available from:
The Repository or My crappy website