Click here to Skip to main content
15,914,162 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: MoveFile Problem Pin
CPallini17-Sep-08 21:38
mveCPallini17-Sep-08 21:38 
Questionhow to add Ip address in the registry value Pin
adhilingam17-Sep-08 3:02
adhilingam17-Sep-08 3:02 
AnswerRe: how to add Ip address in the registry value Pin
Iain Clarke, Warrior Programmer17-Sep-08 5:21
Iain Clarke, Warrior Programmer17-Sep-08 5:21 
GeneralRe: how to add Ip address in the registry value Pin
adhilingam21-Sep-08 20:51
adhilingam21-Sep-08 20:51 
AnswerRe: how to add Ip address in the registry value Pin
Mark Salsbery17-Sep-08 6:05
Mark Salsbery17-Sep-08 6:05 
GeneralRe: how to add Ip address in the registry value Pin
adhilingam18-Sep-08 20:43
adhilingam18-Sep-08 20:43 
QuestionHow to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Dhiraj kumar Saini17-Sep-08 3:01
Dhiraj kumar Saini17-Sep-08 3:01 
AnswerRe: How to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Iain Clarke, Warrior Programmer17-Sep-08 6:03
Iain Clarke, Warrior Programmer17-Sep-08 6:03 
Well, work it through...

You have a CListCtrl, and you want to do something with the header.

CHeaderCtrl *pHeader = m_pMyListCtrl->GetHeaderCtrl ();


Now you can manipulate the header.

Looking at the docs for CHeaderCtrl, you have a "setitem" function.

It takes an item number, and a HD_ITEM struct. Burrowing deeper, you just have to set the mask of the struct to say "my text field is valid", and the text field to your new string.

HD_ITEM hdItem = {0};
TCHAR buf [128];
lstrcpy (buf, _T("Hello"));
hdItem.mask = HDI_TEXT;
hdItem.pszTest = buf; // can almost certainly cast from a constant string.

pHeader->SetItem (n, &hdItem);


That's all nicely untested, but should work a treat.

Good luck,

Iain.
GeneralRe: How to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Dhiraj kumar Saini18-Sep-08 1:23
Dhiraj kumar Saini18-Sep-08 1:23 
GeneralRe: How to set the Text of a CListCtrl Column Header dynamically in mfc Pin
Iain Clarke, Warrior Programmer18-Sep-08 1:41
Iain Clarke, Warrior Programmer18-Sep-08 1:41 
QuestionHow can set font of property sheet or property pages? Pin
Le@rner17-Sep-08 2:57
Le@rner17-Sep-08 2:57 
AnswerRe: How can set font of property sheet or property pages? Pin
Iain Clarke, Warrior Programmer17-Sep-08 6:11
Iain Clarke, Warrior Programmer17-Sep-08 6:11 
QuestionChange directory when selcting the File Type Pin
hai palla17-Sep-08 2:56
hai palla17-Sep-08 2:56 
AnswerRe: Change directory when selcting the File Type Pin
Michael Schubert17-Sep-08 4:35
Michael Schubert17-Sep-08 4:35 
QuestionRe: Change directory when selcting the File Type Pin
David Crow17-Sep-08 7:00
David Crow17-Sep-08 7:00 
QuestionSpeech-to-Text Programme compilation error ...... Pin
CoolDude287817-Sep-08 2:56
CoolDude287817-Sep-08 2:56 
AnswerRe: Speech-to-Text Programme compilation error ...... Pin
enhzflep17-Sep-08 3:19
enhzflep17-Sep-08 3:19 
GeneralRe: Speech-to-Text Programme compilation error ...... Pin
CoolDude287817-Sep-08 4:48
CoolDude287817-Sep-08 4:48 
GeneralRe: Speech-to-Text Programme compilation error ...... Pin
enhzflep17-Sep-08 6:49
enhzflep17-Sep-08 6:49 
QuestionHow can I get the pressure of the use of the touchpad notebook Pin
armctec17-Sep-08 2:49
armctec17-Sep-08 2:49 
QuestionProcess Handle Pin
Ali Tavakol17-Sep-08 2:40
Ali Tavakol17-Sep-08 2:40 
AnswerRe: Process Handle [modified] Pin
Roger Stoltz17-Sep-08 2:55
Roger Stoltz17-Sep-08 2:55 
QuestionIs Cdrtools(CD/DVD authoring tools) source code available in VC++ or .Net? Pin
Karthik.M17-Sep-08 2:32
Karthik.M17-Sep-08 2:32 
QuestionPlease Help me any body......... Pin
m_mun17-Sep-08 2:22
m_mun17-Sep-08 2:22 
QuestionRe: Please Help me any body......... Pin
CPallini17-Sep-08 5:42
mveCPallini17-Sep-08 5:42 

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.