No announcement yet.

Q: How to force a control to draw offscreen

  • Filter
  • Time
  • Show
Clear All
new posts

  • Q: How to force a control to draw offscreen

    I'm having fun coding my own front end. At the moment it's In the proof of concept phase. More specificly, I'm determining if I can sufficiently control MS MapPoint to do what I want.

    I one thing I realy want to do is rotate the map (2D & 3D). To do this, I just let map point do it's normal rendering, then grab the control's screen buffer to a bitmat and then manipulate the bitmap. My problem is that when ever the MP control is not directly visible on the screen (or partialy visible), it clips it's rending and I can't grab the whole map (as it is not completely rendered). Now this is normaly a desired behaviour for applications, but it prevents me from doing what I want to do: have MapPoint draw the map and then let me manipulate it's output for final rendering.

    So the question is: does any one here have a clue as to how I could force MapPoint to render offscreen and then have my code access that raster? Dont care if it's not nice, just that it works. One thing I'm thingking is binding the control's window DC to a DirectDraw7 surface. But not sure that it will work.

    [■■■■■■■■■■■■■■■■■■■■] 50%
    PC installed
    EPIA MII-12000, 256DDR, Opus 150, Xenarc, 30Gb/7200 HD, USB Wifi.
    Waiting for: GPS & Soft, eternal Sound Card + Amps.

  • #2
    Without writing some custom graphics driver?

    It's a hack, but you could use multimon, and have MapPoint on the secondary monitor (you needn't actually have a monitor plugged in, of course.) If your current vid card doesn't support dual head, there might be some software out there that fakes it, or you could throw in a old PCI vid card.

    Maybe there's a more elegant solution, but nothing's coming to me now.


    • #3
      Changing the DC used would be my first idea too.
      Now Galileo is real. Muhahahahaha :p