Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

GDI Vector gauges in VC - help enclosed

Featured Replies

Hi,I have enclosed a "little help" for all programmers out there, who want to use their GDI Vector gauges in the VCs of FS2002. It is based on the FlightMap source from the MS panel SDK, with some changes and comments from me :-cool Chris Koegler

Hey Chris.Thank you very much for this example. I have tried it with the GDI+, but ran into problems.I have added the following to my code:hrgnDraw = CreateRectRgn( 0, 0, dim.x, dim.y);// create a rect. regionbefore the function that draws my gauge, thenInvertRgn(pelement->hdc, hrgnDraw);//we invert the colors of the rect region hereBitBlt( pelement->hdc, 0, 0, dim.x, dim.y, hdc, 0, 0, PATINVERT );right after the function, and before SET_OFF_SCREEN (pelement);All of this is in PANEL_SERVICE_PRE_DRAWAnd in the beggining of my code, right after the header, I have includedHRGN hrgnDraw;I do not, however, have the if (hrgnDraw) before I draw the function, for I am not sure what it protects against. I believe it would protect against the Region not being initialized, but I don't see why it wouldn't.The problem is the gauge does not show up. I added it just like I would any other gauge, to the C172 VC, but see nothing.Oh well, I am stepping into unkown territory here. Just wanted to see if I was doing it right, and if this should work with GDI+.

Hi Fabio,I do not use BitBlt for my GDI+ gauges, because there is another way to make them work in VCs, but I have tried it now with one of my GDI+ gauges, and it works fine for me. Maybe there is a difference in the way you write the GDI+ stuff, but normally it should work.Chris

Hi Chris. I've been following these threads with a lot of interest!You say there is another way? Can you explain?Thanks!Luhiss

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.