Click here to Skip to main content
16,006,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Simple Chat Program Pin
Ravi Bhavnani2-Mar-05 10:51
professionalRavi Bhavnani2-Mar-05 10:51 
GeneralRe: Simple Chat Program Pin
rct233332-Mar-05 11:12
rct233332-Mar-05 11:12 
GeneralRe: Simple Chat Program Pin
Ravi Bhavnani2-Mar-05 12:47
professionalRavi Bhavnani2-Mar-05 12:47 
GeneralRe: Simple Chat Program Pin
ThatsAlok2-Mar-05 18:15
ThatsAlok2-Mar-05 18:15 
QuestionHow to click a bitmap into a bitmap? MFC, Visual C++6 Pin
VogelH2-Mar-05 10:01
professionalVogelH2-Mar-05 10:01 
AnswerRe: How to click a bitmap into a bitmap? MFC, Visual C++6 Pin
Christian Graus2-Mar-05 11:08
protectorChristian Graus2-Mar-05 11:08 
GeneralRe: How to click a bitmap into a bitmap? MFC, Visual C++6 Pin
VogelH2-Mar-05 21:31
professionalVogelH2-Mar-05 21:31 
GeneralRe: How to click a bitmap into a bitmap? MFC, Visual C++6 Pin
Christian Graus3-Mar-05 11:13
protectorChristian Graus3-Mar-05 11:13 
This is a disaster. DON'T use CClientDC, for starters the bitmap probably isn't there, it's probably being drawn there in OnPaint. do all drawing there. Store your mouse position in a variable and call Invalidate to force a paint message.

THEN you need to create a CDC and select the bitmap into it, then draw the text into the CDC. THEN when you draw the bitmap into the CDC passed into the paint handler, it will have the text drawn onto it, instead of both the bitmap and the text being seperately drawn onto the screen.

Just to mess you up even more - if you use a CBitmap, it will be the bit depth of the screen, you can't change that. You should get a DIBSection wrapper instead, then you can specify bit depth.


Christian

I have several lifelong friends that are New Yorkers but I have always gravitated toward the weirdo's. - Richard Stringer
GeneralRe: How to click a bitmap into a bitmap? MFC, Visual C++6 Pin
VogelH4-Mar-05 0:05
professionalVogelH4-Mar-05 0:05 
QuestionExit Program? Pin
Larsson2-Mar-05 9:08
Larsson2-Mar-05 9:08 
AnswerRe: Exit Program? Pin
David Crow2-Mar-05 9:17
David Crow2-Mar-05 9:17 
AnswerRe: Exit Program? Pin
Blake Miller2-Mar-05 10:37
Blake Miller2-Mar-05 10:37 
GeneralRe: Exit Program? Pin
Ed K2-Mar-05 11:09
Ed K2-Mar-05 11:09 
GeneralRe: Exit Program? Pin
Antony M Kancidrowski2-Mar-05 11:28
Antony M Kancidrowski2-Mar-05 11:28 
GeneralRe: Exit Program? Pin
Blake Miller2-Mar-05 11:31
Blake Miller2-Mar-05 11:31 
Generalconnect() timeout Pin
Alexander M.,2-Mar-05 7:24
Alexander M.,2-Mar-05 7:24 
GeneralRe: connect() timeout Pin
ThatsAlok2-Mar-05 18:44
ThatsAlok2-Mar-05 18:44 
GeneralCapturing Inactive Desktop Pin
harshi2-Mar-05 6:50
harshi2-Mar-05 6:50 
GeneralRe: Capturing Inactive Desktop Pin
Blake Miller2-Mar-05 7:22
Blake Miller2-Mar-05 7:22 
GeneralWindow within a window Pin
__makaveli__2-Mar-05 6:24
__makaveli__2-Mar-05 6:24 
GeneralRe: Window within a window Pin
Maximilien2-Mar-05 6:34
Maximilien2-Mar-05 6:34 
GeneralRe: Window within a window Pin
__makaveli__2-Mar-05 7:49
__makaveli__2-Mar-05 7:49 
GeneralRe: Window within a window Pin
David Crow2-Mar-05 9:03
David Crow2-Mar-05 9:03 
GeneralRe: Window within a window Pin
__makaveli__2-Mar-05 9:10
__makaveli__2-Mar-05 9:10 
GeneralRe: Window within a window Pin
David Crow2-Mar-05 9:15
David Crow2-Mar-05 9:15 

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.