Click here to Skip to main content
15,892,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CHtmlEditCtrl problem :( Pin
«_Superman_»8-Jul-09 0:59
professional«_Superman_»8-Jul-09 0:59 
QuestionHow to get the index number of a Listbox item displayed in a message box Pin
kokilag7-Jul-09 23:30
kokilag7-Jul-09 23:30 
AnswerRe: How to get the index number of a Listbox item displayed in a message box Pin
Cedric Moonen7-Jul-09 23:38
Cedric Moonen7-Jul-09 23:38 
QuestionRe: How to get the index number of a Listbox item displayed in a message box Pin
CPallini8-Jul-09 0:01
mveCPallini8-Jul-09 0:01 
JokeRe: How to get the index number of a Listbox item displayed in a message box Pin
Rajesh R Subramanian8-Jul-09 0:49
professionalRajesh R Subramanian8-Jul-09 0:49 
QuestionDrawFocusRect Pin
kumar sanghvi7-Jul-09 23:04
kumar sanghvi7-Jul-09 23:04 
AnswerRe: DrawFocusRect Pin
Naveen7-Jul-09 23:33
Naveen7-Jul-09 23:33 
GeneralRe: DrawFocusRect Pin
kumar sanghvi8-Jul-09 1:06
kumar sanghvi8-Jul-09 1:06 
RectText is the client rect of the button
CRect rCalc(RectText);

UINT nVAlign = (nAlign & (DT_VCENTER | DT_TOP | DT_BOTTOM));
nAlign &= ~(DT_VCENTER | DT_TOP | DT_BOTTOM);

int nHeight = pDC->DrawText(sText, rCalc, nAlign | DT_CALCRECT);

if (RectText.Height() > nHeight)
{
if (nVAlign & DT_VCENTER)
RectText.DeflateRect(0, (RectText.Height() - nHeight) / 2);

else if (nVAlign & DT_BOTTOM)
RectText.top = RectText.bottom - nHeight;

else // top
RectText.bottom = RectText.top + nHeight;
}

if (RectText.Width() > rCalc.Width())
{
if (nAlign & DT_CENTER)
RectText.DeflateRect((rText.Width() - rCalc.Width()) / 2, 0);

else if (nAlign & DT_RIGHT)
RectText.left = RectText.right - rCalc.Width();

else // left
RectText.right = RectText.left + rCalc.Width();
}

and im using and im using pObject->DrawFocusRect((LPRECT)Recttext);

but it doesn"t draws the focus rect just around the text but it draws a rect which is less than the boundaries of the text....
GeneralRe: DrawFocusRect Pin
Naveen8-Jul-09 1:23
Naveen8-Jul-09 1:23 
GeneralRe: DrawFocusRect Pin
kumar sanghvi8-Jul-09 1:48
kumar sanghvi8-Jul-09 1:48 
QuestionControlling the folder views from a third party application. Pin
emmmatty17-Jul-09 22:16
emmmatty17-Jul-09 22:16 
AnswerRe: Controlling the folder views from a third party application. Pin
Stuart Dootson7-Jul-09 22:32
professionalStuart Dootson7-Jul-09 22:32 
GeneralRe: Controlling the folder views from a third party application. Pin
emmmatty17-Jul-09 23:35
emmmatty17-Jul-09 23:35 
GeneralRe: Controlling the folder views from a third party application. Pin
Stuart Dootson8-Jul-09 0:48
professionalStuart Dootson8-Jul-09 0:48 
GeneralRe: Controlling the folder views from a third party application. Pin
emmmatty18-Jul-09 1:53
emmmatty18-Jul-09 1:53 
QuestionC C++ Eclipse plugins Pin
Fatbuddha 17-Jul-09 22:12
Fatbuddha 17-Jul-09 22:12 
AnswerRe: C C++ Eclipse plugins Pin
CPallini7-Jul-09 22:38
mveCPallini7-Jul-09 22:38 
GeneralRe: C C++ Eclipse plugins Pin
Fatbuddha 18-Jul-09 1:10
Fatbuddha 18-Jul-09 1:10 
Questioncan we create thread in Single Threaded component Pin
pandit847-Jul-09 21:02
pandit847-Jul-09 21:02 
AnswerRe: can we create thread in Single Threaded component Pin
Roger Stoltz7-Jul-09 21:16
Roger Stoltz7-Jul-09 21:16 
GeneralRe: can we create thread in Single Threaded component Pin
Stuart Dootson7-Jul-09 21:37
professionalStuart Dootson7-Jul-09 21:37 
GeneralRe: can we create thread in Single Threaded component Pin
Roger Stoltz7-Jul-09 21:44
Roger Stoltz7-Jul-09 21:44 
Questionhow can i convert CString to int? Pin
mazizi7-Jul-09 20:19
mazizi7-Jul-09 20:19 
AnswerRe: how can i convert CString to int? Pin
«_Superman_»7-Jul-09 20:22
professional«_Superman_»7-Jul-09 20:22 
GeneralRe: how can i convert CString to int? Pin
mazizi7-Jul-09 21:46
mazizi7-Jul-09 21:46 

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.