Announcement

Collapse
No announcement yet.

Freeze hDC

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Lance Edmonds
    replied
    Unless you create a bitmap and select it into the DC, the DC has no size... the bitmap specifies the 'boundary' (for lack of a better word) of the DC.

    From WIN32.HLP:
    CreateCompatibleDC:
    Before an application can use a memory device context for drawing operations, it must select a bitmap of the correct width and height into the device context. Once a bitmap has been selected, the device context can be used to prepare images that will be copied to the screen or printed.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Semen Matusovski
    replied
    Jules --
    I see in this sample
    Code:
    memdc = CreateCompatibleDC(hdc)
    hbit = CreateCompatibleBitmap(hdc, maxX, maxY)
    SelectObject memdc, hbit
    This way I know and it's works.
    I am surprised that it's necessary to create dummy bitmap, because in my code I execute BitBlt hdc -> hdcMem in any case.


    ------------------

    Leave a comment:


  • Jules Marchildon
    replied
    semen, this will answer your questions.

    creating a virtual window for supercharged repaints.

    [url]http://l]

    hth
    jules

    Leave a comment:


  • Semen Matusovski
    replied
    Lance --
    I understood idea. Thanks.

    One probem. It looks that in any case I should
    CreateCompatibleBitMap and select it into CreateCompatibleDC
    Is it so ?

    [This message has been edited by Semen Matusovski (edited April 07, 2000).]

    Leave a comment:


  • Lance Edmonds
    replied
    I gather you want to eliminate the "flicker"?

    The best way if to use a "hidden DC" and then just BltBit() it to the window during %WM_PAINT.

    ------------------
    Lance
    PowerBASIC Support
    mailto:[email protected][email protected]</A>

    Leave a comment:


  • Semen Matusovski
    started a topic Freeze hDC

    Freeze hDC

    Inside WM_PAINT I try to execute two covering each other TextOut
    (big font).
    I use different colors and it's visible blinking during a short time.
    Is it possible to "freeze" hDC from GetDC up to ReleaseDC ?
Working...
X
😀
🥰
🤢
😎
😡
👍
👎