Jump to content

dcooper

Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by dcooper

  1. QUOTE (PJM_labview @ Oct 8 2008, 12:26 PM)

    I believe LV use an antiquated version of the mesa.dll to render objects in the FP and BD. This dll is located under your resource folder (in here "C:\Program Files\National Instruments\LabVIEW 8.6\resource\mesa.dll" for a typical installation).

    As far as I know this dll has been customized by NI (I might be wrong here) but there might be some functions available in there for getting emf images of objects.

    Hmm there is a wglGetCurrentDC in there; may be this could get you somewhere.

    Let us know how it goes.

    PJM

    PS: You might want to update your profile to indicate that you are using LV 8.6

    Thanks for your help,

    I checked wglGetCurrentDC, but it returned 0. At least I know what LV is using for drawing. I just need to get better familar with mesa.

    Does anyone have an idea how I can pass the mesa hdc to CreateEnhMetaFileA? Is there a way to create a EMF with mesa? I assume there is not since EMF files are windows only, and mesa is cross platform.

    Another alternative is to use a Virtual Print Driver to create the EMF when using the Panel Print To Printer method, but this is an awkward solution.

    Any Ideas would be great!

  2. I am trying to get a emf image of a VI front panel in Microsoft Windows. I don't want to use jpeg, BMP, or png. I am using CreateEnhMetaFileA and SendMessage with WM_PRINT. I am able to get the image of the parent window with no problem. Unfortunatly, I found out the hard way that Labview Front Panel (CLIENT) and controls and indicators (Children windows) are not acually windows. So when I capture the Window Image, I only get the parent window. The rest is blank. How does Labview create controls in the Windows OS environment? I know LV is cross platform, but how do they get around this?

    Does anyone have any other ideas for how to get the image? I know I can get a EMF of a graph, but I want an EMF of the entire front panel.

    I have attached an example VI that works for getting screen shot of parent window. (Please excuse the messy vi, it is just for test)

    Thanks

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.