Click to See Complete Forum and Search --> : SetWindowText in eVC4


2die4
01-07-2004, 04:51 AM
Could somebody tell me why I cannot change windowtext of Static text or Radio Button with such a code:
CStatic* pStat;
pStat = (CStatic*) GetDlgItem(IDC_STATIC);
pStat->SetWindowText(_T("NewText"));

I use PocketPC 2003 platform

Christian
02-01-2004, 05:48 AM
Your problem results from your ID for the static field (IDC_STATIC). eVC4.0 like all VC-Versions I worked with, uses IDC_STATIC as ID for static-fields which will not be edited by the programmer. Try using IDC_STATIC1 or any other name and it should work.