Click here to Skip to main content
15,849,617 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMatrix! HELP!!!! Pin
Sunnygirl27-Jun-03 12:23
Sunnygirl27-Jun-03 12:23 
GeneralRe: Matrix! HELP!!!! Pin
valikac27-Jun-03 12:27
valikac27-Jun-03 12:27 
GeneralRe: Matrix! HELP!!!! Pin
Anonymous28-Jun-03 10:28
Anonymous28-Jun-03 10:28 
GeneralRe: Matrix! HELP!!!! Pin
valikac28-Jun-03 10:37
valikac28-Jun-03 10:37 
GeneralRe: Matrix! HELP!!!! Pin
Dominik Reichl27-Jun-03 21:59
Dominik Reichl27-Jun-03 21:59 
GeneralRe: Matrix! HELP!!!! Pin
Anonymous28-Jun-03 10:29
Anonymous28-Jun-03 10:29 
GeneralGetting the rect of the text in a Static Pin
Tommy2k27-Jun-03 12:21
Tommy2k27-Jun-03 12:21 
GeneralRe: Getting the rect of the text in a Static Pin
basementman27-Jun-03 12:41
basementman27-Jun-03 12:41 
To get the rect of the control or of the text itself?


// Control:
CRect oR;
CWnd *pStatic = GetDlgItem(IDC_THE_STATIC_CTRL);
pStatic->GetWindowRect(&oR);
ScreenToClient(&oR);

// bounding rectangle of static's text contents
CString cText;
GetDlgItemText(IDC_THE_STATIC_CTRL,cText);

CWnd *pStatic = GetDlgItem(IDC_THE_STATIC_CTRL);
pStatic->GetClientRect(&oR);

CDC *pDC = pStatic->GetDC();
pDC->DrawText(cText,&oR,DT_CALCRECT|DT_LEFT|DT_SINGLELINE|DT_TOP);
pStatic->ReleaseDC(pDC);

// oR now has the bounding rectangle needed to display the text.


 onwards and upwards... 
GeneralRe: Getting the rect of the text in a Static Pin
Tommy2k27-Jun-03 12:58
Tommy2k27-Jun-03 12:58 
GeneralRe: Getting the rect of the text in a Static Pin
John M. Drescher27-Jun-03 13:33
John M. Drescher27-Jun-03 13:33 
GeneralRe: Getting the rect of the text in a Static Pin
Tommy2k27-Jun-03 13:38
Tommy2k27-Jun-03 13:38 
GeneralRe: Getting the rect of the text in a Static Pin
valikac27-Jun-03 12:42
valikac27-Jun-03 12:42 
GeneralRead a line from a file HANDLE Pin
Blueapples27-Jun-03 12:14
Blueapples27-Jun-03 12:14 
GeneralRe: Read a line from a file HANDLE Pin
basementman27-Jun-03 12:43
basementman27-Jun-03 12:43 
GeneralRe: Read a line from a file HANDLE Pin
Blueapples27-Jun-03 13:00
Blueapples27-Jun-03 13:00 
GeneralRe: Read a line from a file HANDLE Pin
Toni7827-Jun-03 13:15
Toni7827-Jun-03 13:15 
GeneralRe: Read a line from a file HANDLE Pin
od@ananzi.co.za15-Sep-03 10:33
od@ananzi.co.za15-Sep-03 10:33 
QuestionMaking an MFC program? Pin
DaveE9th27-Jun-03 11:50
DaveE9th27-Jun-03 11:50 
AnswerRe: Making an MFC program? Pin
Toni7827-Jun-03 13:18
Toni7827-Jun-03 13:18 
GeneralRe: Making an MFC program? Pin
DaveE9th27-Jun-03 20:24
DaveE9th27-Jun-03 20:24 
GeneralRe: Making an MFC program? Pin
Toni7828-Jun-03 10:26
Toni7828-Jun-03 10:26 
QuestionRecommended reading on MFC? Pin
DaveE9th27-Jun-03 9:25
DaveE9th27-Jun-03 9:25 
AnswerRe: Recommended reading on MFC? Pin
Matt Newman27-Jun-03 9:29
Matt Newman27-Jun-03 9:29 
AnswerRe: Recommended reading on MFC? Pin
NormDroid27-Jun-03 10:51
professionalNormDroid27-Jun-03 10:51 
AnswerRe: Recommended reading on MFC? Pin
Cambalindo27-Jun-03 12:50
Cambalindo27-Jun-03 12: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.