Bitmap sappear as different colors
-
The bitmap is being used by other owner-drawn dialogs and the color is fine. The bitmap is 10x10 pixels and is suppose to represent a 'phillips screw'. I use this bitmap in a non-owner drawn dialog as a static resource placed in specific locations on the dialog. I can not find a specific palette withing the project. All colors have been defined withing include files. When viewed on my PC at my desk, there is no change in color on this bitmap when I use them as static controls on the dialog. On the PC where the application is actually used, this bitmap is displayed in a color that is not as deep a black color as found on the desk PC. And as previously mentioned, the screen attributes are the same on both PCs and both run Windows 2000. So, the confusion remains as to why the bitmap shows up as two different shades of black. Any ideas why? Thanks.
John P.
jparken wrote:
The bitmap is being used by other owner-drawn dialogs and the color is fine.
Then I still ask - What code are you using to draw the bitmap? What format is the bitmap (bits-per-pixel and planes)? There must be something about the way you are handling the bitmap that differs from the working code :) Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
jparken wrote:
The bitmap is being used by other owner-drawn dialogs and the color is fine.
Then I still ask - What code are you using to draw the bitmap? What format is the bitmap (bits-per-pixel and planes)? There must be something about the way you are handling the bitmap that differs from the working code :) Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
The bitmap is included as a 'picture property' part of the dialog. I'm not 'drawing' the bitmap. All I do is place it in a location on the dialog resource.
John P.
-
The bitmap is included as a 'picture property' part of the dialog. I'm not 'drawing' the bitmap. All I do is place it in a location on the dialog resource.
John P.
Sorry for the confusion :) What is the "'picture property' part of the dialog"? You're NOT using a picture (static) control? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
Sorry for the confusion :) What is the "'picture property' part of the dialog"? You're NOT using a picture (static) control? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
The picture property is a static control (defined with an IDC_xxxxx). If you select 'Picture' from the toolbar, it will default to IDC_STATIC. But the color on the picture (bitmap) is different when running the application on separate PCs. Hope this explains the problem more clearly. Thanks for your time.
John P.
-
The picture property is a static control (defined with an IDC_xxxxx). If you select 'Picture' from the toolbar, it will default to IDC_STATIC. But the color on the picture (bitmap) is different when running the application on separate PCs. Hope this explains the problem more clearly. Thanks for your time.
John P.
hmm I can't imagine why it would draw differently on different PCs. Can you post the exact control resource code for the static control from the .RC file and any code you use to manipulate the control? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
hmm I can't imagine why it would draw differently on different PCs. Can you post the exact control resource code for the static control from the .RC file and any code you use to manipulate the control? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
From the .RC file:
CONTROL 197,IDC\_STATIC,"Static",SS\_BITMAP,12,15,10,10 CONTROL 197,IDC\_SCREW2,"Static",SS\_BITMAP,195,15,10,10 CONTROL 197,IDC\_SCREW3,"Static",SS\_BITMAP,195,55,10,10 CONTROL 197,IDC\_SCREW4,"Static",SS\_BITMAP,12,55,10,10
And I don't manipulate the the static control once I have it placed on the dialog (which happens to be a numeric keypad). The bitmap is nothing more than a representation of a small phillips screw head. As I said in prior postings, this same bitmap is used throughout the total project of numerous dialogs, and all of them make use of this bitmap at the corners of the dialogs.
John P.
-
From the .RC file:
CONTROL 197,IDC\_STATIC,"Static",SS\_BITMAP,12,15,10,10 CONTROL 197,IDC\_SCREW2,"Static",SS\_BITMAP,195,15,10,10 CONTROL 197,IDC\_SCREW3,"Static",SS\_BITMAP,195,55,10,10 CONTROL 197,IDC\_SCREW4,"Static",SS\_BITMAP,12,55,10,10
And I don't manipulate the the static control once I have it placed on the dialog (which happens to be a numeric keypad). The bitmap is nothing more than a representation of a small phillips screw head. As I said in prior postings, this same bitmap is used throughout the total project of numerous dialogs, and all of them make use of this bitmap at the corners of the dialogs.
John P.
jparken wrote:
I don't manipulate the the static control once I have it placed on the dialog
Don't you set a bitmap to the control?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
jparken wrote:
I don't manipulate the the static control once I have it placed on the dialog
Don't you set a bitmap to the control?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
Maybe I don't understand the question, but I select and place the bitmap on the dialog in the location I desire. Is that not setting the bitmap to the control? I set the control name in the Properties box, instead of accepting the standard IDC_STATIC for all four of them.
John P.
-
Maybe I don't understand the question, but I select and place the bitmap on the dialog in the location I desire. Is that not setting the bitmap to the control? I set the control name in the Properties box, instead of accepting the standard IDC_STATIC for all four of them.
John P.
ACK never mind - You showed the bitmap ID in the resource :doh: Well, I can't imagine why it would draw different! The bitmap is 10x15 and you can tell the shade of black is different? :) Good eye! What if you make a new bitmap, filled with black, and substitute it in the resource. Does that show as black or gray? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
-
ACK never mind - You showed the bitmap ID in the resource :doh: Well, I can't imagine why it would draw different! The bitmap is 10x15 and you can tell the shade of black is different? :) Good eye! What if you make a new bitmap, filled with black, and substitute it in the resource. Does that show as black or gray? Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
I haven't tried that. It will take a while to do though. This app is running on a flight simulator, so I can only try this when the simulator is not in use, so it may be next week before I can get back to you. Thanks for all your assistance!
John P.