Click here to Skip to main content
15,920,508 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: invalid number of parameters in ActiveX Pin
samira forooghi19-May-08 1:55
samira forooghi19-May-08 1:55 
AnswerRe: invalid number of parameters in ActiveX Pin
prasad_som18-May-08 1:04
prasad_som18-May-08 1:04 
QuestionGetControlUnknown Pin
subramanyeswari18-May-08 0:08
subramanyeswari18-May-08 0:08 
AnswerRe: GetControlUnknown Pin
JudyL_MD18-May-08 12:39
JudyL_MD18-May-08 12:39 
QuestionDraw on desktop Pin
capint17-May-08 23:06
capint17-May-08 23:06 
AnswerRe: Draw on desktop [modified] Pin
Nelek17-May-08 23:47
protectorNelek17-May-08 23:47 
GeneralRe: Draw on desktop Pin
capint18-May-08 2:07
capint18-May-08 2:07 
GeneralRe: Draw on desktop Pin
Nelek18-May-08 7:04
protectorNelek18-May-08 7:04 
QuestionSave data into a DataBase Pin
cuesdean florin17-May-08 21:46
cuesdean florin17-May-08 21:46 
AnswerRe: Save data into a DataBase Pin
David Crow19-May-08 4:45
David Crow19-May-08 4:45 
QuestionC# SendMessage in C++ Pin
luisgrimaldo17-May-08 17:59
luisgrimaldo17-May-08 17:59 
AnswerRe: C# SendMessage in C++ Pin
Hamid_RT17-May-08 19:12
Hamid_RT17-May-08 19:12 
QuestionNeed XML Alternative for Persisting Object Data Pin
Peter Weyzen17-May-08 16:28
Peter Weyzen17-May-08 16:28 
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 

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.