Drawing fliker

myhmyh Global Mapper UserPosts: 21
edited September 2008 in SDK
Hi

In my sample application when files that have been shown are large and
i want refresh or repaint them ( i.e. in Zooming time ) i see drawing fliker !

it dosent differ Erasing background flag in Draw function be True or False.

This problem dosent ocur in Global Mapper Software .
also this is in Global Mapper Sample .

(i am programming in vc++6 )

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2008
    You need to draw to an offscreen bitmap and then BitBlt that to the screen. The Global Mapper application does this, but for simplicity the sample application does not.

    The basic steps are to simple create an offscreen DC and and offscreen bitmap, select that offscreen bitmap into the offscreen DC, render to the offscreen DC (i.e. use GM_DrawLayerList), then BitBlt the contents of the offscreen DC to your paint DC once you complete drawing. This should eliminate any flicker.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
  • myhmyh Global Mapper User Posts: 21
    edited September 2008
    Dear Mike

    hmmm Ok thanks !

    is it possible using Direct Draw ?
    and have any advantage ?
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited September 2008
    There is not really any advantage to using DirectDraw with the Global Mapper SDK, but if you want to use it you would likely want to use the GM_DrawLayerListToMemory function to render the SDK data to a memory buffer that you have tied to a DirectDraw surface.

    Let me know if I can be of further assistance.

    Thanks,

    Mike
    Global Mapper Support
    support@globalmapper.com
Sign In or Register to comment.