Click here to Skip to main content
15,905,316 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCDateTimeCtrl Pin
ganesh_IT5-Oct-10 19:01
ganesh_IT5-Oct-10 19:01 
AnswerRe: CDateTimeCtrl Pin
_AnsHUMAN_ 5-Oct-10 19:35
_AnsHUMAN_ 5-Oct-10 19:35 
AnswerRe: CDateTimeCtrl Pin
Sameerkumar Namdeo5-Oct-10 19:44
Sameerkumar Namdeo5-Oct-10 19:44 
AnswerRe: CDateTimeCtrl Pin
cccfff7778-Oct-10 1:09
cccfff7778-Oct-10 1:09 
Questionproblems with using print data Pin
dusk855-Oct-10 16:03
dusk855-Oct-10 16:03 
AnswerRe: problems with using print data Pin
Peter_in_27805-Oct-10 16:25
professionalPeter_in_27805-Oct-10 16:25 
GeneralRe: problems with using print data Pin
dusk855-Oct-10 17:08
dusk855-Oct-10 17:08 
GeneralRe: problems with using print data Pin
Peter_in_27805-Oct-10 17:23
professionalPeter_in_27805-Oct-10 17:23 
GeneralRe: problems with using print data Pin
dusk855-Oct-10 17:41
dusk855-Oct-10 17:41 
GeneralRe: problems with using print data Pin
Peter_in_27805-Oct-10 18:00
professionalPeter_in_27805-Oct-10 18:00 
GeneralRe: problems with using print data Pin
dusk855-Oct-10 20:06
dusk855-Oct-10 20:06 
GeneralRe: problems with using print data Pin
Peter_in_27805-Oct-10 20:17
professionalPeter_in_27805-Oct-10 20:17 
AnswerRe: problems with using print data Pin
Luc Pattyn5-Oct-10 16:40
sitebuilderLuc Pattyn5-Oct-10 16:40 
QuestionVS2010 & SDK 7.1 Pin
Fareed Rizkalla5-Oct-10 12:43
Fareed Rizkalla5-Oct-10 12:43 
QuestionMySQL 5.0 and Visual C++ 6....do they work together? Pin
ns5-Oct-10 7:48
ns5-Oct-10 7:48 
AnswerRe: MySQL 5.0 and Visual C++ 6....do they work together? Pin
_Flaviu17-Mar-13 21:09
_Flaviu17-Mar-13 21:09 
QuestionString Pin
Fareed Rizkalla5-Oct-10 6:16
Fareed Rizkalla5-Oct-10 6:16 
AnswerRe: String Pin
Richard MacCutchan5-Oct-10 6:49
mveRichard MacCutchan5-Oct-10 6:49 
GeneralRe: String Pin
Fareed Rizkalla5-Oct-10 8:20
Fareed Rizkalla5-Oct-10 8:20 
GeneralRe: String Pin
Moak5-Oct-10 8:36
Moak5-Oct-10 8:36 
GeneralRe: String Pin
Richard MacCutchan5-Oct-10 9:05
mveRichard MacCutchan5-Oct-10 9:05 
AnswerRe: String PinPopular
Moak5-Oct-10 6:59
Moak5-Oct-10 6:59 
GeneralRe: String Pin
Richard MacCutchan5-Oct-10 21:37
mveRichard MacCutchan5-Oct-10 21:37 
AnswerRe: String PinPopular
Luc Pattyn5-Oct-10 8:37
sitebuilderLuc Pattyn5-Oct-10 8:37 
QuestionCannot display icon in tree. Help! Pin
Brad Reichenbach5-Oct-10 4:44
Brad Reichenbach5-Oct-10 4:44 
Hello. I created a new icon in the resource view called "IDI_OBJECT_GLOBAL_VAR". In my "View" cpp, I added the icon to my HICON ( along with a bunch of other icons that work) using the following:

hIcon[ICON_INDEX_OBJ_GLOBAL_VAR] = AfxGetApp()->LoadIcon(IDI_OBJECT_GLOBAL_VAR);


This is then added to a tree list :

for( GUShort index = 0;
index < ICON_INDEX_MAXIMUM;
index++ )
{
m_TreeImageList.Add( hIcon[ index ] );
}

GetTreeCtrl().SetImageList( &m_TreeImageList, TVSIL_NORMAL );


When I go to insert an item with the icon, I use the following:

// Add the new item into the tree beneath the parent item
hNewItem = GetTreeCtrl().InsertItem( label,
ICON_INDEX_OBJ_GLOBAL_VAR,
ICON_INDEX_OBJ_GLOBAL_VAR,
parentTreeItem,
hInsertAfter );


The item itself is placed in the tree, but the icon NEVER displays. It's just blank. Any help on this would be appreciated. Thanks!

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.