Click here to Skip to main content
15,924,829 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Unmanaged Threading Pin
Jun Du13-Jun-06 12:25
Jun Du13-Jun-06 12:25 
GeneralRe: Unmanaged Threading Pin
Graham Bradshaw13-Jun-06 12:33
Graham Bradshaw13-Jun-06 12:33 
GeneralRe: Unmanaged Threading Pin
Joe Woodbury13-Jun-06 13:07
professionalJoe Woodbury13-Jun-06 13:07 
GeneralRe: Unmanaged Threading Pin
Arvind Bharti13-Jun-06 20:23
Arvind Bharti13-Jun-06 20:23 
GeneralRe: Unmanaged Threading Pin
Joe Woodbury13-Jun-06 21:19
professionalJoe Woodbury13-Jun-06 21:19 
GeneralRe: Unmanaged Threading Pin
Sarath C13-Jun-06 19:40
Sarath C13-Jun-06 19:40 
GeneralRe: Unmanaged Threading Pin
Jun Du14-Jun-06 4:15
Jun Du14-Jun-06 4:15 
QuestionCButton, BS_BITMAP, LoadImage Issue and Question. Pin
Maximilien13-Jun-06 10:38
Maximilien13-Jun-06 10:38 
I'm using a CButton with the BS_BITMAP flag to draw a simple bitmap button.

I load the bitmap like this :

m_hBitmap = (HBITMAP) ::LoadImage(AfxGetResourceHandle(), 
                                            MAKEINTRESOURCE(IDB_MY_BITMAP ), 
                                            IMAGE_BITMAP, 20, 18, LR_LOADMAP3DCOLORS  );


to draw it "transparent" on the button.

and set the bitmap like :

m_Button.SetBitmap( m_hBitmap );


This works well, EXCEPT when the button is disabled; when enabled, the transparent part is "transparent", and the non-transparent part display nicelly.

When the button is disabled, the WHOLE bitmap is drawn as a dark gray rectangle.

Is there a solution to that ? I would like the disable state ( that is computed automatically ) look like what disabled buttons on toolbars look like.

Also, The LoadImage with the LR_LOADMAP3DCOLOR flag seems to be working on Win2K, but when I try my application on WinXP the color substitution does not seem to be working fine, the bitmap background is not the same as the button color.
Is there a known issue with LoadImage on XP or with BS_BITMAP ?

Thank you all.

Max.



Maximilien Lincourt
Your Head A Splode - Strong Bad
QuestionRe: CButton, BS_BITMAP, LoadImage Issue and Question. Pin
David Crow13-Jun-06 10:43
David Crow13-Jun-06 10:43 
QuestionWriteConsole() problem Pin
CoffeeAddict1913-Jun-06 10:00
CoffeeAddict1913-Jun-06 10:00 
QuestionRe: WriteConsole() problem Pin
David Crow13-Jun-06 10:06
David Crow13-Jun-06 10:06 
AnswerRe: WriteConsole() problem Pin
CoffeeAddict1914-Jun-06 5:45
CoffeeAddict1914-Jun-06 5:45 
QuestionRe: WriteConsole() problem Pin
David Crow14-Jun-06 5:52
David Crow14-Jun-06 5:52 
QuestionNewbie needs help generating html files from user input via windows gui [modified] Pin
dstrain13-Jun-06 9:35
dstrain13-Jun-06 9:35 
AnswerRe: Newbie needs help generating html files from user input via windows gui Pin
Mark F.14-Jun-06 4:54
Mark F.14-Jun-06 4:54 
Questionlaunching notepad.exe and reading the current date/time Pin
Mahhouraaaaaa13-Jun-06 8:30
Mahhouraaaaaa13-Jun-06 8:30 
AnswerRe: launching notepad.exe and reading the current date/time [modified] Pin
Mark F.13-Jun-06 8:59
Mark F.13-Jun-06 8:59 
AnswerRe: launching notepad.exe and reading the current date/time Pin
Hamid_RT13-Jun-06 19:07
Hamid_RT13-Jun-06 19:07 
AnswerRe: launching notepad.exe and reading the current date/time Pin
Laxman Auti13-Jun-06 19:30
Laxman Auti13-Jun-06 19:30 
QuestionC++ Forum Pin
knoxplusplus13-Jun-06 8:24
knoxplusplus13-Jun-06 8:24 
QuestionHello a problem with Cstring :) Pin
Mahhouraaaaaa13-Jun-06 6:16
Mahhouraaaaaa13-Jun-06 6:16 
AnswerRe: Hello a problem with Cstring :) Pin
Neil Van Eps13-Jun-06 6:17
Neil Van Eps13-Jun-06 6:17 
GeneralRe: Hello a problem with Cstring :) Pin
Mahhouraaaaaa13-Jun-06 6:23
Mahhouraaaaaa13-Jun-06 6:23 
JokeRe: Hello a problem with Cstring :) Pin
Laxman Auti13-Jun-06 19:32
Laxman Auti13-Jun-06 19:32 
QuestionGUID array assignment issue Pin
act_x13-Jun-06 5:51
act_x13-Jun-06 5:51 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.