Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Flickering bitmap update

11 views
Skip to first unread message

Gernot Frisch

unread,
Jan 27, 2012, 6:49:20 PM1/27/12
to
Hi,

the app in:
http://www.glbasic.com/beta/guitest.zip

does not flicker on my Win7 system at all. But as soon as I resize the
dialog, it flickers like crazy.
Can you tell me what I did wrong?

// Create dialog:
hwnd = ::CreateWindowExA(WS_EX_DLGMODALFRAME|WS_EX_COMPOSITED,
"GLBasicDialog", caption,
WS_THICKFRAME|WS_VISIBLE | WS_SYSMENU | WS_CAPTION | WS_OVERLAPPED |
WS_POPUP
| WS_CLIPSIBLINGS | WS_CLIPSIBLINGS
, x,y, w, h, NULL, 0, (HINSTANCE)::GetModuleHandleA(NULL), 0);


// Create bitmap static control
HWND hwnd = ::CreateWindowExA(0, "STATIC", "",
SS_CENTERIMAGE | SS_REALSIZEIMAGE | SS_BITMAP | SS_NOTIFY | WS_CHILD |
WS_VISIBLE | WS_BORDER,
0,0,10,10,
(HWND)parent, (HMENU)id, (HINSTANCE)::GetModuleHandleA(NULL), 0


// Update of the image:
SendMessageA((HWND)pW, STM_SETIMAGE, (WPARAM)0, (LPARAM)(*pBmp));

Bye,
-Gernot

Fred

unread,
Jan 29, 2012, 7:41:37 AM1/29/12
to

"Gernot Frisch" <m...@privacy.net> a écrit dans le message de news:
9ogrfv...@mid.individual.net...
> Hi,
> the app in:
> http://www.glbasic.com/beta/guitest.zip
> does not flicker on my Win7 system at all. But as soon as I resize the
> dialog, it flickers like crazy.
> Can you tell me what I did wrong?

exe tested on XP SP3 : it works fine and doesn't flicker at all on dialog
resizing...


Gernot Frisch

unread,
Jan 30, 2012, 5:51:07 AM1/30/12
to

>> http://www.glbasic.com/beta/guitest.zip
> exe tested on XP SP3 : it works fine and doesn't flicker at all on dialog
> resizing...

So it must be some Win7 "feature".

Deanna Earley

unread,
Jan 30, 2012, 6:05:59 AM1/30/12
to
On 27/01/2012 23:49, Gernot Frisch wrote:
> Hi,
>
> the app in:
> http://www.glbasic.com/beta/guitest.zip
>
> does not flicker on my Win7 system at all. But as soon as I resize the
> dialog, it flickers like crazy.
> Can you tell me what I did wrong?
>
> // Update of the image:
> SendMessageA((HWND)pW, STM_SETIMAGE, (WPARAM)0, (LPARAM)(*pBmp));

Do you not do any painting yourself?
That could be a better method, making sure you handle WM_PAINT and
invalidate the window to force a redraw.

--
Deanna Earley (dee.e...@icode.co.uk)
i-Catcher Development Team
http://www.icode.co.uk/icatcher/

iCode Systems

(Replies direct to my email address will be ignored.
Please reply to the group.)
0 new messages