• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Search results

  1. Jim Johnson

    Two or more gauges calling the same update function

    Thank you both for the information. I was mistakenly thinking an async solution was being proposed. Which is a relief because doing that in enterprise applications running on servers was a nightmare and we didn't do any complex graphics rendering at all. Again thank you for the help, its...
  2. Jim Johnson

    Two or more gauges calling the same update function

    Thanks, I've been thinking about asynchronous behavior for a while. What I'm hearing in this thread is that you should multithread as a matter of course. Is this particular to GDI+ (or Direcx11) gauges being run while the non "graphics" gauges run in a separate thread? Or is it common to run...
  3. Jim Johnson

    Two or more gauges calling the same update function

    I want to thank everyone who helped me with this issue across two threads. What I have found through testing is essentially you can have all kinds of standard gauges Altimeter, Airspeed, Throttle, UHF Radio, etc., and 1 GDI+ gauge in a single DLL. However, if you have more than one GDI+ gauge...
  4. Jim Johnson

    Two or more gauges calling the same update function

    Thanks for the help. I'll try and implement your proposed solution. It may not be for the first release of the Tweet, it will be on a maintenance release.
  5. Jim Johnson

    Two or more gauges calling the same update function

    So separate them out into a GaugeDeclarations.cpp (it has no header) as in the example? If that structural change is necessary, the example has the module_init, module_deinit, and the GAUGESLINKAGE table in GaugeDeclarations.cpp. I have a bunch of other systems controlled by the T37 "main"...
  6. Jim Johnson

    Two or more gauges calling the same update function

    @JB3DG and @WarpD Thank you both for your help. @WarpD I had one callback/update function, then two...just to see what would happen. Then I just left it as two. Here's the gauges linkage table: ///////////////////////////////////////////////////////////////////////////// // Gauges Linkage...
  7. Jim Johnson

    Two or more gauges calling the same update function

    I split them out as combining them didn't have any different effect on the display or non-display of the gauges. Here's the DME Indicator that works: void FSAPI t37Update(PGAUGEHDR pGauge, int service_id, UINT_PTR extra_data) { switch (service_id) { case...
  8. Jim Johnson

    FSX Gauge doesn't unload...

    I had to do this for P3D v4.4 Thanks @ddawson!
  9. Jim Johnson

    Two or more gauges calling the same update function

    Here are the gauge declarations: ///////////////////////////////////////////////////////////////////////////// // T37 DMEIndicator Declaration ///////////////////////////////////////////////////////////////////////////// #define GAUGE_NAME "T37\0" //Note this is actually the DME Indicator...
  10. Jim Johnson

    Two or more gauges calling the same update function

    @WarpD Thanks for the information, I assumed that it was a numeric value. :) Earlier today I went back and looked at the example again and how for this solution I structured it. There is a single place that the whole HDC thing gets done in a base class. So that isn't what's stopping the...
  11. Jim Johnson

    Two or more gauges calling the same update function

    Guys, I finally had a chance to test this code today and when I went to get an HDC as in the example code above (which I simplified for this discussion) this is what I see in the debugger. Note that the earlier snippet was particular to the Gunsight class itself, this screenshot is the same call...
  12. Jim Johnson

    Two or more gauges calling the same update function

    @eric_marciano So to acquire an HDC I assume something like this example snippet would work: case PANEL_SERVICE_PRE_DRAW: PELEMENT_STATIC_IMAGE pelement = reinterpret_cast<PELEMENT_STATIC_IMAGE>(pGauge->elements_list[0]); if (pelement) {...
  13. Jim Johnson

    Two or more gauges calling the same update function

    @JB3DG Thank you for your help, I referred to it as an example as the base class (was derived from the example) and two derived classes that make up one of the gauges. @eric_marciano Thank you as well.
  14. Jim Johnson

    Two or more gauges calling the same update function

    @eric_marciano I think I found what your talking about now in the examples from this thread: https://www.fsdeveloper.com/forum/threads/gdi-draw-on-element_static_image.20863/#post-138397 Let me know if I'm not correct as it appears that you get and assign a device context from what I read above.
  15. Jim Johnson

    Two or more gauges calling the same update function

    Thank you @eric_marciano I have one follow-up the reference to an HDC variable (I'm familar with it, just never programmed in GDI+ before now); All I have is an HMODULE. I have one GDI+ gauge working, but the model hasn't caught up with the code yet on the other gauge so I have time to figure...
  16. Jim Johnson

    Two or more gauges calling the same update function

    After a few days of trial and error, looking in the SDK, other forums, and this one, I can't find where this is specified or prohibited. Is it possible for two or more gauges (GDI+), with the proper gauge declarations, utilize the same 18hz update function call in a DLL? Or does each gauge...
  17. Jim Johnson

    P3D v4 GDI+ and MAKE_STATIC macro

    What knowledge exactly are you looking for? Since this is a P3D v4 related post, have you looked at the examples in the 4.4 SDK? Also, an example SimObject implementation is included now with the PDK examples within the SDK. As far as SimObject animation goes this is the gauges forum. You...
  18. Jim Johnson

    P3D v4 GDI+ and MAKE_STATIC macro

    Cool, thank you very much.
  19. Jim Johnson

    P3D v4 GDI+ and MAKE_STATIC macro

    I'm working on an aircraft DLL and an associated aircraft that will need multiple GDI+ gauges, is there any way to have only one C++ driver/DLL (i.e. SDK.h and SDK.cpp to use the SDK example) yet have multiple GDI+ gauges specified? Or do I have to have one DLL for each gauge?
  20. Jim Johnson

    P3D v4 Dynamic Lights Inside VC

    In P3D v4 I created a dynamic light from the example given in the PDK, my impression was there wasn't an effect needed. The light would appear anywhere I positioned it as long as the camera was not within 1 meter of its location. Here's the draw call: void DrawLight(IObjectRendererV400*...
Back
Top