syn
11-24-2007, 09:32 PM
Hi,
I just started developing a gauge two days ago and I'm already suffering MS' lack of documentation.
My intention is to create a Radiogoniometer gauge for multiplayer ATC, to use it with the tower view. I started by using de SDK.FlightInfo gauge as a template.
After I finished programming the gauge I decided to change the background from the black one to a map of the zone in which I intend to control traffic, and here I encountered the problem.
With the default bitmaps from the SDK I have no problem at all, everything works fine, but when I put my own bitmap the drawing code stops working.
I attach the relevant parts of the code in case someone can see where the cause of the problem may be.
MAKE_STATIC
(
VDFMap_image,
BMP_FLIGHT_MAP_BLANK,
NULL,
NULL,
IMAGE_USE_ERASE|IMAGE_USE_BRIGHT|IMAGE_CREATE_DIBSECTION,
0,
MAP_LEFT_BORDER, MAP_TOP_BORDER
)
PELEMENT_HEADER VDFMap_next[] = { &VDFMap_image.header, NULL };
MAKE_STATIC
(
VDFMap_background,
BMP_FLIGHT_MAP_BACKGROUND,
VDFMap_next,
NULL,
IMAGE_USE_TRANSPARENCY,
0,
0,0
)
PELEMENT_HEADER VDFMap_list = &VDFMap_background.header;
------------------------------------------------
and in the callback I get the HDC this way:
PELEMENT_STATIC_IMAGE pelement = (PELEMENT_STATIC_IMAGE)(pgauge->elements_list[0]->next_element[0]);
if (pelement)
{
PIXPOINT dim = pelement->image_data.final->dim;
HDC hdc = pelement->hdc;
Graphics graphics(hdc);
-------------------------------------------------------
Can anyone help me here?? Im really stuck...
Thanks
I just started developing a gauge two days ago and I'm already suffering MS' lack of documentation.
My intention is to create a Radiogoniometer gauge for multiplayer ATC, to use it with the tower view. I started by using de SDK.FlightInfo gauge as a template.
After I finished programming the gauge I decided to change the background from the black one to a map of the zone in which I intend to control traffic, and here I encountered the problem.
With the default bitmaps from the SDK I have no problem at all, everything works fine, but when I put my own bitmap the drawing code stops working.
I attach the relevant parts of the code in case someone can see where the cause of the problem may be.
MAKE_STATIC
(
VDFMap_image,
BMP_FLIGHT_MAP_BLANK,
NULL,
NULL,
IMAGE_USE_ERASE|IMAGE_USE_BRIGHT|IMAGE_CREATE_DIBSECTION,
0,
MAP_LEFT_BORDER, MAP_TOP_BORDER
)
PELEMENT_HEADER VDFMap_next[] = { &VDFMap_image.header, NULL };
MAKE_STATIC
(
VDFMap_background,
BMP_FLIGHT_MAP_BACKGROUND,
VDFMap_next,
NULL,
IMAGE_USE_TRANSPARENCY,
0,
0,0
)
PELEMENT_HEADER VDFMap_list = &VDFMap_background.header;
------------------------------------------------
and in the callback I get the HDC this way:
PELEMENT_STATIC_IMAGE pelement = (PELEMENT_STATIC_IMAGE)(pgauge->elements_list[0]->next_element[0]);
if (pelement)
{
PIXPOINT dim = pelement->image_data.final->dim;
HDC hdc = pelement->hdc;
Graphics graphics(hdc);
-------------------------------------------------------
Can anyone help me here?? Im really stuck...
Thanks