November 17, 200322 yr Hi,There are a lot of examples of how to change colors in a bmp in GDI+ and the Color class does contain a method to set a new value.However I have tried this many times and had no luck.Here is the algorithmByte Brightness = 0xFF; Color green(brightness, 0x00, 0xFF, 0x00);rendergauge{...Make argb (brigness, ....) --this is in the the sdkgreen.setvalue(argb);}Mousefunctionbrightdownbrightness--;Any ideas? Has anyone else managed to do this?Also has anyone been successful in making their own class defenitions and methods in FS9? Mine compiles and runs but once you press alt, FS9 exits.ThanksJon
November 17, 200322 yr I'm not at home at the moment, I'll have to check in detail later. The problem of exiting on "ALT" looks, as if you "hook" to the bitmap in the wrong time. You can't use PANEL_SERVICE_CONNECT_TO_WINDOW and PANEL_SERVICE_DISCONNECT for hooking to the MAKE_STATIC, since the pointers get invalid on resizing, these both service_ids are only for starting/stopping GDI+. You can either use all GDI+ drawing code in the PANE_SERVICE_PRE_DRAW or choose the the servide_ids for contructiing/destructing with care.Arne Bartels
November 17, 200322 yr Hi Arne,Im not sure what you mean by "hooking the bitmap" but I do have code in those to functions for things other then gdi+ (mainly for initialization destruction of my own class objects). Also it looks like my drawing functions are only being called once and not updating with time. They do resize approriatly when they need to but other then that, it looks like they are only being called once.Any ideas?Thanksjon
November 17, 200322 yr So are you just trying to change the alpha of a bitmap, before drawing it?If so, try using a colormatrix. I used something like this to turn my bitmap into an alpha shadow:ImageAttributes ia;ColorMatrix colorMatrix = { 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, .50f, 0.0f, 0.0f, 0.0f, 0.0f, 0.0f, 1.0f};ia.SetColorMatrix(&colorMatrix, ColorMatrixFlagsDefault, ColorAdjustTypeBitmap); Matt KaprockiFor fastest support, please submit a ticket at http://support.precisionmanuals.com
Create an account or sign in to comment