Jump to content
Sign in to follow this  
Guest harry3

GDI Gauges

Recommended Posts

Guest harry3

Hi,I had to make a little gauge with GDI because it doesn't work on the "bitmap-way".No problem with the gauge, it works fine.But I've noticed something 'strange'.I can't get a GDI Gauge work if there is just 1 MAKE_STATIC used. It just works when I've got 2 MAKE_STATICs in the gauge.To get the pelement for the 2nd MAKE_STATIC, I wrote:PELEMENT_STATIC_IMAGE pelement = (PELEMENT_STATIC_IMAGE)(pgauge->elements_list[0]->next_element[0]); If there's just 1 MAKE_STATIC, shouldn't that just be enough?:PELEMENT_STATIC_IMAGE pelement = (PELEMENT_STATIC_IMAGE)(pgauge); Another question: What does the option "IMAGE_CREATE_DIBSECTION" in MAKE_STATIC mean?Thanks in advance,Harry

Share this post


Link to post
Share on other sites
Guest adameke777

PELEMENT_STATIC_IMAGE pelement = (PELEMENT_STATIC_IMAGE)( pgauge->elements_list<0> ) ;

Share this post


Link to post
Share on other sites
Guest harry3

Thanks!Regards,Harry

Share this post


Link to post
Share on other sites

>Another question: What does the option>"IMAGE_CREATE_DIBSECTION" in MAKE_STATIC mean?Harry, the DIBSECTION is a "Device Independent Bitmap Section..." It creates the "bitmap drawing surface" which is referenced by the HDC (Handle to Device Context).


Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Share this post


Link to post
Share on other sites
Guest harry3

>>Another question: What does the option>>"IMAGE_CREATE_DIBSECTION" in MAKE_STATIC mean?>>Harry, the DIBSECTION is a "Device Independent Bitmap>Section..." It creates the "bitmap drawing surface" which is>referenced by the HDC (Handle to Device Context).Thanks once again :-)Regards,Harry

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...