Click here to Skip to main content
15,918,050 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMicrosoft SDK and VC++ integration question. Pin
Michael Liu25-Oct-02 2:09
Michael Liu25-Oct-02 2:09 
GeneralWindows Message Pin
Shamoon25-Oct-02 2:03
Shamoon25-Oct-02 2:03 
GeneralRe: Windows Message Pin
Maximilien25-Oct-02 2:33
Maximilien25-Oct-02 2:33 
GeneralRe: Windows Message Pin
Paul M Watt25-Oct-02 5:04
mentorPaul M Watt25-Oct-02 5:04 
GeneralRe: Windows Message Pin
pba_25-Oct-02 11:46
pba_25-Oct-02 11:46 
GeneralFont Calculation for a String . Pin
Muhammad Kamran25-Oct-02 1:40
Muhammad Kamran25-Oct-02 1:40 
GeneralRe: Font Calculation for a String . Pin
Daniel Turini25-Oct-02 2:24
Daniel Turini25-Oct-02 2:24 
GeneralRe: Font Calculation for a String . Pin
Muhammad Kamran25-Oct-02 2:39
Muhammad Kamran25-Oct-02 2:39 
Yes Performance. i am to calculate font size to display it with in
a rect. i am to do it for at different angles . and for for more than
200 entities at a time.
i have done it with GetOutputTextExtent but it becomes too slow.
my function is like this.

long counter=1;
long Y1 =0;
long Y2 =0;
long X1=0;
long X2=0;

if(Vertical==TRUE)
{
tfont->SetEscapement(900);
Y1=rect->top;
Y2 = rect->bottom;
X1 = rect->left;
X2 = rect->right;
}
else
{
Y1 = rect->left;
Y2 = rect->right;
X1 = rect->top;
X2 = rect->bottom;
}
while(true)
{
font->SetHeight(counter);
CFont * oldfont = pDC->SelectObject(font);
// Problem each time i am selecting it in device context to check for new
// size. that makes it slow

CSize sz =pDC->GetOutputTextExtent(*txt);

if(sz.cx>=(Y2-Y1)||sz.cy>=(X2-X1)) //text size is equal to rect
{
pDC->SelectObject(oldfont);
return counter; // so return counter;
}
pDC->SelectObject(oldfont);
counter++;
}
return counter;



GeneralRe: Font Calculation for a String . Pin
dabs25-Oct-02 3:40
dabs25-Oct-02 3:40 
General_tfullpath(..) for http:// paths Pin
Anonymous25-Oct-02 1:12
Anonymous25-Oct-02 1:12 
GeneralRe: _tfullpath(..) for http:// paths Pin
Anonymous25-Oct-02 2:15
Anonymous25-Oct-02 2:15 
QuestionFront Page Automation is worthy ? Pin
Braulio Dez25-Oct-02 0:00
Braulio Dez25-Oct-02 0:00 
AnswerRe: Front Page Automation is worthy ? Pin
Anonymous25-Oct-02 1:43
Anonymous25-Oct-02 1:43 
QuestionHow to show a BITMAP under win98 Pin
24-Oct-02 23:05
suss24-Oct-02 23:05 
AnswerRe: How to show a BITMAP under win98 Pin
Rickard Andersson2025-Oct-02 0:20
Rickard Andersson2025-Oct-02 0:20 
GeneralRe: How to show a BITMAP under win98 Pin
Willem Hofmans25-Oct-02 0:38
sussWillem Hofmans25-Oct-02 0:38 
GeneralRe: How to show a BITMAP under win98 Pin
Rickard Andersson2025-Oct-02 5:51
Rickard Andersson2025-Oct-02 5:51 
AnswerCan anyone help me please? Pin
Willem Hofmans25-Oct-02 4:34
sussWillem Hofmans25-Oct-02 4:34 
General.NonModal() ? Dialog Pin
Anonymous24-Oct-02 22:16
Anonymous24-Oct-02 22:16 
GeneralRe: .NonModal() ? Dialog Pin
Nish Nishant24-Oct-02 22:47
sitebuilderNish Nishant24-Oct-02 22:47 
GeneralRe: .NonModal() ? Dialog Pin
Daniel Strigl24-Oct-02 22:55
Daniel Strigl24-Oct-02 22:55 
GeneralRe: .NonModal() ? Dialog Pin
Nish Nishant24-Oct-02 23:33
sitebuilderNish Nishant24-Oct-02 23:33 
GeneralRe: .NonModal() ? Dialog Pin
Daniel Strigl24-Oct-02 23:38
Daniel Strigl24-Oct-02 23:38 
Generalany one good at.. Pin
Mel Feik24-Oct-02 22:15
Mel Feik24-Oct-02 22:15 
GeneralRe: any one good at.. Pin
Anonymous24-Oct-02 22:50
Anonymous24-Oct-02 22:50 

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.