Click here to Skip to main content
15,896,606 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionChanging The Title & Icon Of Dialog Box At Run Time Pin
Joseph Marzbani17-May-08 8:05
Joseph Marzbani17-May-08 8:05 
AnswerRe: Changing The Title & Icon Of Dialog Box At Run Time Pin
Nelek17-May-08 8:26
protectorNelek17-May-08 8:26 
AnswerRe: Changing The Title & Icon Of Dialog Box At Run Time Pin
CPallini17-May-08 8:41
mveCPallini17-May-08 8:41 
GeneralRe: Changing The Title & Icon Of Dialog Box At Run Time Pin
Nelek18-May-08 0:42
protectorNelek18-May-08 0:42 
AnswerRe: Changing The Title & Icon Of Dialog Box At Run Time Pin
Peter Weyzen17-May-08 17:17
Peter Weyzen17-May-08 17:17 
AnswerRe: Changing The Title & Icon Of Dialog Box At Run Time Pin
Hamid_RT17-May-08 19:13
Hamid_RT17-May-08 19:13 
QuestionOnly one Icon in my treeview! Pin
CrocodileBuck17-May-08 8:00
CrocodileBuck17-May-08 8:00 
AnswerRe: Only one Icon in my treeview! Pin
Nathan Holt at EMOM17-May-08 8:45
Nathan Holt at EMOM17-May-08 8:45 
CrocodileBuck wrote:
SHGetFileInfo(sFile, 0, &sfi, sizeof(SHFILEINFO),SHGFI_SYSICONINDEX | SHGFI_SMALLICON);


When you create the tree control, you need to call SHGetFileInfo with SHGFI_SYSICONINDEX | SHGFI_SMALLICON, and get the return value, which is a handle to the system image list. You then need to set your tree view's small icon image list to be the system image list. After that, your tree view should show the right icons. The code would be something like this:

HANDLE hSystemImageList = SHGetFileInfo(sKnownFile, 0, &sfi, sizeof(SHELLFILEINFO), SHGFI_SYSICONINDEX | SHGFI_SMALLICON);
trCtrl.SetImageList(CImageList::FromHandle(hSystemImageList), TVSIL_NORMAL);


Nathan
GeneralRe: Only one Icon in my treeview! Pin
CrocodileBuck17-May-08 11:00
CrocodileBuck17-May-08 11:00 
AnswerRe: Only one Icon in my treeview! Pin
Iain Clarke, Warrior Programmer17-May-08 13:36
Iain Clarke, Warrior Programmer17-May-08 13:36 
GeneralRe: Only one Icon in my treeview! Pin
CrocodileBuck17-May-08 22:08
CrocodileBuck17-May-08 22:08 
GeneralRe: Only one Icon in my treeview! Pin
CrocodileBuck18-May-08 7:44
CrocodileBuck18-May-08 7:44 
GeneralRe: Only one Icon in my treeview! Pin
Iain Clarke, Warrior Programmer19-May-08 5:45
Iain Clarke, Warrior Programmer19-May-08 5:45 
QuestionHow do I use this api call for C++ Pin
luisgrimaldo17-May-08 6:15
luisgrimaldo17-May-08 6:15 
AnswerRe: How do I use this api call for C++ Pin
Hamid_RT17-May-08 6:40
Hamid_RT17-May-08 6:40 
GeneralRe: How do I use this api call for C++ Pin
luisgrimaldo17-May-08 7:14
luisgrimaldo17-May-08 7:14 
GeneralRe: How do I use this api call for C++ Pin
Hamid_RT17-May-08 7:25
Hamid_RT17-May-08 7:25 
GeneralRe: How do I use this api call for C++ Pin
luisgrimaldo17-May-08 8:06
luisgrimaldo17-May-08 8:06 
GeneralRe: How do I use this api call for C++ Pin
bob1697217-May-08 9:39
bob1697217-May-08 9:39 
GeneralRe: How do I use this api call for C++ Pin
Hamid_RT17-May-08 19:11
Hamid_RT17-May-08 19:11 
AnswerRe: How do I use this api call for C++ Pin
Hamid_RT17-May-08 6:51
Hamid_RT17-May-08 6:51 
GeneralRe: How do I use this api call for C++ Pin
ThatsAlok6-Jul-09 21:01
ThatsAlok6-Jul-09 21:01 
GeneralRe: How do I use this api call for C++ Pin
Hamid_RT7-Jul-09 1:06
Hamid_RT7-Jul-09 1:06 
Questionnot allowing the edit option for an combobox Pin
sunny_vc17-May-08 0:13
sunny_vc17-May-08 0:13 
AnswerRe: not allowing the edit option for an combobox Pin
Gary R. Wheeler17-May-08 0:20
Gary R. Wheeler17-May-08 0:20 

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.