Click here to Skip to main content
15,902,275 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralPrinting Debug Without Printer :: MFC Pin
valikac12-Oct-02 6:08
valikac12-Oct-02 6:08 
GeneralRe: Printing Debug Without Printer :: MFC Pin
Joaquín M López Muñoz12-Oct-02 6:16
Joaquín M López Muñoz12-Oct-02 6:16 
GeneralRe: Printing Debug Without Printer :: MFC Pin
valikac12-Oct-02 6:31
valikac12-Oct-02 6:31 
GeneralNanosecond timer resolution for Windows OS Pin
jrthatcher12-Oct-02 6:02
jrthatcher12-Oct-02 6:02 
GeneralRe: Nanosecond timer resolution for Windows OS Pin
MaximE12-Oct-02 11:34
MaximE12-Oct-02 11:34 
GeneralCDC::DrawText Pin
xeonboy12-Oct-02 5:36
xeonboy12-Oct-02 5:36 
GeneralRe: CDC::DrawText Pin
Joaquín M López Muñoz12-Oct-02 6:13
Joaquín M López Muñoz12-Oct-02 6:13 
GeneralRe: CDC::DrawText Pin
xeonboy12-Oct-02 16:25
xeonboy12-Oct-02 16:25 
Joaquín M López Muñoz wrote:
If you don't specify this switch, I think DrawText leaves the rect untouched.

Hi there and thanks a lot, Joaquin! But I do think that DrawText(...) do fit this rect to the overall size of the text.

I did an experiment on a dialog-based program with a grey background. I called CDC::DrawText(...) as in :

<br />
void CMyProgramDlg::OnPaint()<br />
{<br />
   //....irrelevant code....<br />
   else<br />
   {<br />
       CPaintDC dc(this);<br />
       dc.DrawText("I am Xeon.",CRect(10,10,1000,1000),NULL);<br />
       CDialog::OnPaint();<br />
   }<br />
}


And guess what? The text is drawn within a rectangle that fits the text exactly, cos' u see, the background color of the text is white, and the style is OPQAUE. And white against a grey background, we can easily see the size of the rect used to hold the text. Smile | :)

Joaquín M López Muñoz wrote:
. Unless otherwise noted, functions tend to behave the same across OSs. I don't see any reason to think this is different for DrawText. Have you detected any anomaly?

No.....I haven't a chance to detect any anomalies, cos' I don't have more than 1 OS to test out. But 'm always really suspicious of a same program running on different Windows OSes. I've heard that lotsof programs behave in different ways across different OSes, and that's a total headache.

Big Grin | :-D

......
GeneralDev Studio AddIn - Getting OnIdle() to work. Pin
John Clayton12-Oct-02 5:27
John Clayton12-Oct-02 5:27 
GeneralLocating *my* icon in the system tray Pin
Taka Muraoka12-Oct-02 3:20
Taka Muraoka12-Oct-02 3:20 
QuestionIs Winsock XP different?? Pin
zbyrat12-Oct-02 2:44
zbyrat12-Oct-02 2:44 
AnswerRe: Is Winsock XP different?? Pin
Mike Nordell12-Oct-02 5:56
Mike Nordell12-Oct-02 5:56 
GeneralRe: Is Winsock XP different?? Pin
zbyrat12-Oct-02 6:22
zbyrat12-Oct-02 6:22 
GeneralMemory leak Pin
suresh_sathya12-Oct-02 2:23
suresh_sathya12-Oct-02 2:23 
GeneralRe: Memory leak Pin
MaximE12-Oct-02 11:29
MaximE12-Oct-02 11:29 
QuestionHow can i simple add a JPG image to my Dialog based application Pin
whofmans12-Oct-02 1:54
whofmans12-Oct-02 1:54 
AnswerRe: How can i simple add a JPG image to my Dialog based application Pin
Michael P Butler12-Oct-02 2:00
Michael P Butler12-Oct-02 2:00 
AnswerRe: How can i simple add a JPG image to my Dialog based application Pin
Nish Nishant12-Oct-02 2:06
sitebuilderNish Nishant12-Oct-02 2:06 
GeneralCopy - rename Pin
Brakanjan12-Oct-02 1:49
Brakanjan12-Oct-02 1:49 
GeneralRe: Copy - rename Pin
Nish Nishant12-Oct-02 2:09
sitebuilderNish Nishant12-Oct-02 2:09 
GeneralRe: Copy - rename Pin
Brakanjan12-Oct-02 2:25
Brakanjan12-Oct-02 2:25 
GeneralRe: Copy - rename Pin
Nish Nishant12-Oct-02 3:50
sitebuilderNish Nishant12-Oct-02 3:50 
GeneralRe: Copy - rename Pin
Maximilien12-Oct-02 5:31
Maximilien12-Oct-02 5:31 
Questionhow to develop web stress test software? Pin
ricklau12-Oct-02 1:02
ricklau12-Oct-02 1:02 
AnswerRe: how to develop web stress test software? Pin
Nish Nishant12-Oct-02 1:06
sitebuilderNish Nishant12-Oct-02 1:06 

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.