Click here to Skip to main content
15,887,434 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Connect to FoxPro C++ Pin
CPallini9-Feb-11 23:43
mveCPallini9-Feb-11 23:43 
GeneralRe: Connect to FoxPro C++ Pin
Schehaider_Aymen9-Feb-11 23:50
Schehaider_Aymen9-Feb-11 23:50 
QuestionListControl Problem Pin
rjkg9-Feb-11 23:20
rjkg9-Feb-11 23:20 
AnswerRe: ListControl Problem Pin
Nuri Ismail9-Feb-11 23:51
Nuri Ismail9-Feb-11 23:51 
QuestionWindows Forms UI Pin
pix_programmer9-Feb-11 22:39
pix_programmer9-Feb-11 22:39 
AnswerRe: Windows Forms UI Pin
Schehaider_Aymen9-Feb-11 23:39
Schehaider_Aymen9-Feb-11 23:39 
Questionhow to select the text of windows client area Pin
sarfaraznawaz9-Feb-11 22:08
sarfaraznawaz9-Feb-11 22:08 
AnswerRe: how to select the text of windows client area Pin
Niklas L10-Feb-11 22:31
Niklas L10-Feb-11 22:31 
C++
void GetFormattedData( PVOID pBuf, DWORD dwOffset, CString &szFormatted )
{
  BYTE *SETBUFF = ((BYTE*)(pBuf)) + dwOffset ;
  szFormatted.Format(_T("%08d: %.2X %.2X "), dwOffset, SETBUFF[0], SETBUFF[1]);
}

for(int i = Start; i <= End; i++)
{
  GetFormattedData(m_lpData, (i + m_nVScrollBarPos )* m_cyChar, szFormatted);
  m_pDC.TextOut((1 - m_nHScrollBarPos) * m_cxChar, i * m_cyChar, szFormatted);
}


A bit unclear description.
sarfaraznawaz wrote:
how i had display the text see ..............

Do you want to know how to display ellipsis at the end of the string if it's too long? You could use CDC::DrawText()[^] with DT_END_ELLIPSIS formatting instead of TextOut().
sarfaraznawaz wrote:
I am trying to select the text of client area which i had paint by using the textout().

If, on the other hand, you want to be able to select portions of the text, you would be better off using an edit control. You can style them to look like you need them too (mostly true), removing frames and such.

If you want to let the user only select the entire text, you could respond to WM_LBUTTONDOWN events within your text rectangle, and redraw the text with a different background color set in the DC.

GeneralRe: how to select the text of windows client area Pin
sarfaraznawaz11-Feb-11 0:39
sarfaraznawaz11-Feb-11 0:39 
GeneralRe: how to select the text of windows client area Pin
Niklas L11-Feb-11 0:59
Niklas L11-Feb-11 0:59 
GeneralRe: how to select the text of windows client area Pin
sarfaraznawaz15-Feb-11 19:43
sarfaraznawaz15-Feb-11 19:43 
GeneralRe: how to select the text of windows client area Pin
Niklas L16-Feb-11 2:00
Niklas L16-Feb-11 2:00 
GeneralRe: how to select the text of windows client area Pin
sarfaraznawaz21-Feb-11 18:39
sarfaraznawaz21-Feb-11 18:39 
GeneralRe: how to select the text of windows client area Pin
Niklas L21-Feb-11 20:22
Niklas L21-Feb-11 20:22 
GeneralRe: how to select the text of windows client area Pin
sarfaraznawaz21-Feb-11 22:31
sarfaraznawaz21-Feb-11 22:31 
GeneralRe: how to select the text of windows client area Pin
Niklas L21-Feb-11 22:55
Niklas L21-Feb-11 22:55 
GeneralRe: how to select the text of windows client area Pin
sarfaraznawaz27-Feb-11 18:24
sarfaraznawaz27-Feb-11 18:24 
GeneralRe: how to select the text of windows client area Pin
Niklas L27-Feb-11 23:07
Niklas L27-Feb-11 23:07 
GeneralRe: how to select the text of windows client area Pin
sarfaraznawaz4-Mar-11 1:55
sarfaraznawaz4-Mar-11 1:55 
GeneralRe: how to select the text of windows client area Pin
Niklas L4-Mar-11 9:52
Niklas L4-Mar-11 9:52 
QuestionHow to use PostMessage function to Close the Recorder of MS-Window-XP Pin
cerne1840@yahoo.com9-Feb-11 17:05
cerne1840@yahoo.com9-Feb-11 17:05 
AnswerRe: How to use PostMessage function to Close the Recorder of MS-Window-XP Pin
Cool_Dev9-Feb-11 19:06
Cool_Dev9-Feb-11 19:06 
AnswerRe: How to use PostMessage function to Close the Recorder of MS-Window-XP Pin
User 74293389-Feb-11 19:56
professionalUser 74293389-Feb-11 19:56 
AnswerRe: How to use PostMessage function to Close the Recorder of MS-Window-XP Pin
Cool_Dev9-Feb-11 20:11
Cool_Dev9-Feb-11 20:11 
QuestionHeight of combo-box Pin
includeh109-Feb-11 7:07
includeh109-Feb-11 7:07 

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.