Article View: comp.os.ms-windows.programmer.misc
Article #1638CS_SAVEBITS doesn't work?
From: John Grant
Date: Fri, 16 Oct 1992 02:46
Date: Fri, 16 Oct 1992 02:46
30 lines
1838 bytes
1838 bytes
Sorry if I have already asked this question, but I can't remember if I posted
it yet or not - too many late nights, I guess.
I have implemented a floating window that hangs around and shows the (x,y)
of the cursor as it moves around the screen. I create it as a child window
with a height equal to the height of the caption area, so all you get is the
system menu handle and a caption area. Each time I get WM_MOUSEMOVE, I
SetWindowText(hwndxy,"..."). It works great and is really tiny (1 line).
However, I am not getting the expected results using window class style
CS_SAVEBITS. I don't want movement of the floating (x,y) window to
generate WM_PAINT for the client area underneath if I don't have to. The
help says that if style is CS_SAVEBITS, then it will try to save the bitmap
behind the window so it can restore it. Presumably then it won't have to
send WM_PAINT to the client beneath it. No such luck. There is tons of
memory available and it sure enough saves bitmaps for popup dialog boxes
to restore quickly. Why won't it do it for my tiny little window?
I register the class with:
wc.style=CS_SAVEBITS;
and then I create the window with:
hwndxy=CreateWindow("xy",NULL,
WS_CHILD | WS_VISIBLE | WS_CAPTION | WS_BORDER | WS_SYSMENU,
0,0,
200,GetSystemMetrics(SM_CYCAPTION),
hwnd,
(HMENU)1, //child id=1
hinstance,
NULL);
Technical Details
Message-ID:
<1992Oct16.024604.7120@emr1.emr.ca>Path:
arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!torn!cunews!nrcnet0!emr1!jagrantShow Full Headers
Complete Article Headers
Newsgroups: comp.os.ms-windows.programmer.misc Path: arc1-ca.pugleaf.net!sparky!uunet!utcsri!skule.ecf!torn!cunews!nrcnet0!emr1!jagrant From: jagrant@emr1.emr.ca (John Grant) Subject: CS_SAVEBITS doesn't work? Message-ID: <1992Oct16.024604.7120@emr1.emr.ca> Sender: john a. grant Organization: Geological Survey of Canada Date: Fri, 16 Oct 1992 02:46:04 GMT Lines: 30