Click here to Skip to main content
15,904,024 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Verify if my library(dll) is corrupted? Pin
Hans Dietrich10-Feb-11 7:29
mentorHans Dietrich10-Feb-11 7:29 
GeneralRe: Verify if my library(dll) is corrupted? Pin
Guido-210-Feb-11 21:56
Guido-210-Feb-11 21:56 
QuestionChecking Internet Connection Pin
T.RATHA KRISHNAN10-Feb-11 0:31
T.RATHA KRISHNAN10-Feb-11 0:31 
AnswerRe: Checking Internet Connection Pin
Rajesh R Subramanian10-Feb-11 0:43
professionalRajesh R Subramanian10-Feb-11 0:43 
GeneralRe: Checking Internet Connection Pin
T.RATHA KRISHNAN10-Feb-11 0:53
T.RATHA KRISHNAN10-Feb-11 0:53 
AnswerRe: Checking Internet Connection Pin
Rajesh R Subramanian10-Feb-11 0:59
professionalRajesh R Subramanian10-Feb-11 0:59 
GeneralRe: Checking Internet Connection Pin
T.RATHA KRISHNAN10-Feb-11 1:06
T.RATHA KRISHNAN10-Feb-11 1:06 
GeneralRe: Checking Internet Connection Pin
Rajesh R Subramanian10-Feb-11 2:20
professionalRajesh R Subramanian10-Feb-11 2:20 
GeneralRe: Checking Internet Connection Pin
Member 392263910-Feb-11 2:25
Member 392263910-Feb-11 2:25 
GeneralRe: Checking Internet Connection Pin
T.RATHA KRISHNAN10-Feb-11 2:56
T.RATHA KRISHNAN10-Feb-11 2:56 
GeneralRe: Checking Internet Connection Pin
T.RATHA KRISHNAN10-Feb-11 3:11
T.RATHA KRISHNAN10-Feb-11 3:11 
AnswerRe: Checking Internet Connection Pin
Pravin Patil, Mumbai10-Feb-11 0:52
Pravin Patil, Mumbai10-Feb-11 0:52 
AnswerRe: Checking Internet Connection Pin
PJ Arends12-Feb-11 9:22
professionalPJ Arends12-Feb-11 9:22 
QuestionDialog base application Pin
Nikesh Jagtap9-Feb-11 23:55
Nikesh Jagtap9-Feb-11 23:55 
AnswerRe: Dialog base application Pin
CPallini10-Feb-11 0:17
mveCPallini10-Feb-11 0:17 
AnswerRe: Dialog base application Pin
User 742933810-Feb-11 7:39
professionalUser 742933810-Feb-11 7:39 
QuestionConnect to FoxPro C++ Pin
Schehaider_Aymen9-Feb-11 23:22
Schehaider_Aymen9-Feb-11 23:22 
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.

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.