Global Mapper v25.0

Drawing fliker

myh
myh Global Mapper User
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_mapper
    global_mapper Administrator
    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
  • myh
    myh Global Mapper User
    edited September 2008
    Dear Mike

    hmmm Ok thanks !

    is it possible using Direct Draw ?
    and have any advantage ?
  • global_mapper
    global_mapper Administrator
    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