Click here to Skip to main content
16,015,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can I convert LPCTSTR to CString ? Pin
SherTeks23-May-08 2:33
SherTeks23-May-08 2:33 
AnswerRe: How can I convert LPCTSTR to CString ? Pin
Cedric Moonen23-May-08 2:38
Cedric Moonen23-May-08 2:38 
GeneralRe: How can I convert LPCTSTR to CString ? Pin
SherTeks23-May-08 18:07
SherTeks23-May-08 18:07 
AnswerRe: How can I convert LPCTSTR to CString ? Pin
SherTeks23-May-08 18:47
SherTeks23-May-08 18:47 
GeneralRe: How can I convert LPCTSTR to CString ? Pin
Jijo.Raj24-May-08 1:21
Jijo.Raj24-May-08 1:21 
GeneralRe: How can I convert LPCTSTR to CString ? Pin
SherTeks25-May-08 18:16
SherTeks25-May-08 18:16 
QuestionEdit box cursor control ? Pin
Vaclav_23-May-08 1:24
Vaclav_23-May-08 1:24 
AnswerRe: Edit box cursor control ? [modified] Pin
Rajkumar R23-May-08 2:02
Rajkumar R23-May-08 2:02 
Vaclav_Sal wrote:
I need the cursor at the end of the set string.


HWND hwndDlg; // use Dialog Box Window here
HWND hwndEdit    = ::GetDlgItem(hwndDlg, IDC_EDIT1);
const TCHAR *szText  = _T("Edit Box String");
int nSelPos      = _tcslen(szText);

::SetWindowText(hwndEdit, szText);

// set the focus to Edit Box
::SendMessage(hwndDlg, WM_NEXTDLGCTL, (WPARAM)hwndEdit, TRUE);

// set the cursor to end of text
::SendMessage(hwndEdit, EM_SETSEL , (WPARAM)nSelPos, (LPARAM)nSelPos);

// move the cursor to view
::SendMessage(hwndEdit, (UINT) EM_SCROLLCARET, (WPARAM) 0, (LPARAM) 0);


modified on Friday, May 23, 2008 12:08 PM

GeneralSOLVED Re: Edit box cursor control ? Pin
Vaclav_23-May-08 4:47
Vaclav_23-May-08 4:47 
GeneralRe: SOLVED Re: Edit box cursor control ? Pin
Rajkumar R23-May-08 6:08
Rajkumar R23-May-08 6:08 
GeneralRe: SOLVED Re: Edit box cursor control ? Pin
Vaclav_23-May-08 7:16
Vaclav_23-May-08 7:16 
QuestionRe: SOLVED Re: Edit box cursor control ? Pin
Rajkumar R24-May-08 3:05
Rajkumar R24-May-08 3:05 
AnswerRe: SOLVED Re: Edit box cursor control ? Pin
Vaclav_24-May-08 4:18
Vaclav_24-May-08 4:18 
QuestionHow to conversion from upper case string to lower case in MFC. Pin
sumit.durg23-May-08 0:05
sumit.durg23-May-08 0:05 
AnswerRe: How to conversion from upper case string to lower case in MFC. Pin
toxcct23-May-08 0:13
toxcct23-May-08 0:13 
AnswerRe: How to conversion from upper case string to lower case in MFC. Pin
Rajesh R Subramanian23-May-08 0:25
professionalRajesh R Subramanian23-May-08 0:25 
QuestionRe: How to conversion from upper case string to lower case in MFC. Pin
Nelek23-May-08 1:22
protectorNelek23-May-08 1:22 
QuestionRe: How to conversion from upper case string to lower case in MFC. Pin
Maxim Zarus23-May-08 1:32
Maxim Zarus23-May-08 1:32 
AnswerRe: How to conversion from upper case string to lower case in MFC. Pin
Rajesh R Subramanian23-May-08 1:33
professionalRajesh R Subramanian23-May-08 1:33 
GeneralRe: How to conversion from upper case string to lower case in MFC. Pin
Nelek23-May-08 1:59
protectorNelek23-May-08 1:59 
GeneralRe: How to conversion from upper case string to lower case in MFC. Pin
Rajesh R Subramanian23-May-08 2:05
professionalRajesh R Subramanian23-May-08 2:05 
AnswerRe: How to conversion from upper case string to lower case in MFC. Pin
sumit.durg23-May-08 1:59
sumit.durg23-May-08 1:59 
GeneralRe: How to conversion from upper case string to lower case in MFC. Pin
Rajesh R Subramanian23-May-08 2:36
professionalRajesh R Subramanian23-May-08 2:36 
GeneralRe: How to conversion from upper case string to lower case in MFC. Pin
Nemanja Trifunovic23-May-08 4:49
Nemanja Trifunovic23-May-08 4:49 
AnswerRe: How to conversion from upper case string to lower case in MFC. Pin
manju#12323-May-08 1:04
manju#12323-May-08 1:04 

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.