Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

When I try to access the hDC of my dynamic layer the result is always 0. Is there a way to get a non zero hDC from a layer that inherits BaseDynamicLayer?

public class BalloonCalloutLayer : BaseDynamicLayer
{

public override void DrawDynamicLayer(esriDynamicDrawPhase DynamicDrawPhase, IDisplay display, IDynamicDisplay dynamicDisplay)
{

int hdc = display.hDC; //This is always 0
}

}
share|improve this question
    
Why are you needing the hDC? Not sure but when this gets called OpenGL has been initialized and is ready for OpenGL drawing requests. If you aren't using the dynamic display, have you tried overriding ILayer.Draw instead? –  Kirk Kuykendall Jul 14 '11 at 16:17
    
@Kirk Kuykendall Well for this example, I am using the DynamicDisplay. Right now I'm drawing hover ballons with an invisible top window because of the issue with balloon callouts in DD they look like this iterationx.posterous.com/34293301, so I thought I'd use GDI+ instead. –  patrick Jul 14 '11 at 16:27
    
Yeah, those DD labels look bad. Still, GDI+ sure will slow you down. Have you looked into DD with MOLE? The military usually has the resources to figure this stuff out. –  Kirk Kuykendall Jul 14 '11 at 17:14
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.