Click here to Skip to main content
15,888,351 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
Chris Losinger17-Mar-14 4:21
professionalChris Losinger17-Mar-14 4:21 
NewsRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
econy17-Mar-14 4:30
econy17-Mar-14 4:30 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
Chris Losinger17-Mar-14 5:02
professionalChris Losinger17-Mar-14 5:02 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
econy17-Mar-14 5:06
econy17-Mar-14 5:06 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
econy17-Mar-14 5:19
econy17-Mar-14 5:19 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
Chris Losinger17-Mar-14 5:34
professionalChris Losinger17-Mar-14 5:34 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
econy17-Mar-14 16:11
econy17-Mar-14 16:11 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
Chris Losinger18-Mar-14 1:41
professionalChris Losinger18-Mar-14 1:41 
econy wrote:
But, the string "My Test" 's position is not at same position of Static text(IDC_STATIC_TXT1).

offset I guess is about 50 to 100 pixel.


could that be due to the DT_CENTER|DT_VCENTER flags?

econy wrote:
 

And if I change CPaintDC dc(pTxt1Static) to CPaintDC dc(this),


it should be CPaintDC dc(this). you're painting the dialog, after all, not the static control.

also, try making your static control a 'frame' type, not a static text. something like:
CONTROL "",IDC_DRAWING_FRAME,"Static",SS_ETCHEDFRAME,12,199,169,66

that gives you a rectangle with no text in it.

GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
Chris Losinger18-Mar-14 1:44
professionalChris Losinger18-Mar-14 1:44 
GeneralRe: MFC CreateCompatibleDC(), Drawtext() no display Pin
econy18-Mar-14 2:26
econy18-Mar-14 2:26 
QuestionMFC set Control color question [Solved] Pin
econy16-Mar-14 11:13
econy16-Mar-14 11:13 
AnswerRe: MFC set Control color question Pin
CPallini16-Mar-14 22:29
mveCPallini16-Mar-14 22:29 
GeneralRe: MFC set Control color question Pin
econy17-Mar-14 1:58
econy17-Mar-14 1:58 
GeneralRe: MFC set Control color question Pin
CPallini17-Mar-14 2:52
mveCPallini17-Mar-14 2:52 
QuestionCompiling DLL - what is the sequence of compilation? SOLVED Pin
Vaclav_16-Mar-14 8:53
Vaclav_16-Mar-14 8:53 
AnswerRe: Compiling DLL - what is the sequence of compilation? Pin
Richard MacCutchan16-Mar-14 23:11
mveRichard MacCutchan16-Mar-14 23:11 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Vaclav_17-Mar-14 3:47
Vaclav_17-Mar-14 3:47 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Gisle Vanem17-Mar-14 4:00
Gisle Vanem17-Mar-14 4:00 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Richard MacCutchan17-Mar-14 4:16
mveRichard MacCutchan17-Mar-14 4:16 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Vaclav_17-Mar-14 7:42
Vaclav_17-Mar-14 7:42 
GeneralRe: Compiling DLL - what is the sequence of compilation? Pin
Richard MacCutchan17-Mar-14 7:54
mveRichard MacCutchan17-Mar-14 7:54 
QuestionDrawText() blinking problem Pin
econy15-Mar-14 1:36
econy15-Mar-14 1:36 
AnswerRe: DrawText() blinking problem Pin
PJ Arends15-Mar-14 6:07
professionalPJ Arends15-Mar-14 6:07 
GeneralRe: DrawText() blinking problem Pin
econy15-Mar-14 6:33
econy15-Mar-14 6:33 
AnswerRe: DrawText() blinking problem Pin
Richard MacCutchan15-Mar-14 6:39
mveRichard MacCutchan15-Mar-14 6:39 

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.