Click here to Skip to main content
15,895,746 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: GDI leak in MFC MDI apps Pin
PJ Arends17-Oct-06 9:31
professionalPJ Arends17-Oct-06 9:31 
GeneralRe: GDI leak in MFC MDI apps Pin
Rob Caldecott17-Oct-06 9:37
Rob Caldecott17-Oct-06 9:37 
GeneralRe: GDI leak in MFC MDI apps Pin
PJ Arends17-Oct-06 9:45
professionalPJ Arends17-Oct-06 9:45 
GeneralFIXED! Pin
PJ Arends17-Oct-06 12:25
professionalPJ Arends17-Oct-06 12:25 
GeneralRe: FIXED! Pin
Mark Salsbery17-Oct-06 13:37
Mark Salsbery17-Oct-06 13:37 
Questionhow to extract the system icons and add them to our CImageList object?? Pin
indra2017-Oct-06 5:20
indra2017-Oct-06 5:20 
QuestionRe: how to extract the system icons and add them to our CImageList object?? Pin
David Crow17-Oct-06 5:25
David Crow17-Oct-06 5:25 
AnswerRe: how to extract the system icons and add them to our CImageList object?? Pin
indra2017-Oct-06 5:46
indra2017-Oct-06 5:46 
Doing the following to add to my own list, AddIcon is passing
but later when i am doing:
TreeView_SetImageList(hWnd, m_clTreeImageList.GetSafeHandle(), TVSIL_NORMAL);
the icons are not getting displayed.


// Lets Add Application defined Image List.. START
IMalloc* pMalloc;
SHGetMalloc(&pMalloc);
HIMAGELIST hSysImageList = NULL;
LPITEMIDLIST pidl = NULL;
SHGetSpecialFolderLocation(NULL, CSIDL_DESKTOP, &pidl);

SHFILEINFO sfi;
ZeroMemory(&sfi, sizeof(SHFILEINFO));
hSysImageList = (HIMAGELIST) SHGetFileInfo((LPCTSTR)pidl, 0,
&sfi, sizeof(SHFILEINFO), SHGFI_PIDL | SHGFI_SYSICONINDEX | SHGFI_SMALLICON);

pMalloc->Free(pidl);
if(!pMalloc)
pMalloc->Release();

//Images for the CoolCool Folders....

CImageList* pImgList = CImageList::FromHandle(hSysImageList);
m_nImgListCnt = pImgList->GetImageCount();

m_clTreeImageList.Create(16,16,ILC_COLOR32|ILC_MASK,0,1);
m_clTreeImageList.SetBkColor(GetSysColor(COLOR_3DFACE));

//IMAGEINFO pImageInfo;
HICON hIcon;

for(long cnt = 0; cnt < m_nImgListCnt; cnt++)
{
hIcon = pImgList->ExtractIcon(cnt);
int nRet = m_clTreeImageList.Add(hIcon);
}
QuestionRe: how to extract the system icons and add them to our CImageList object?? Pin
David Crow17-Oct-06 6:32
David Crow17-Oct-06 6:32 
AnswerRe: how to extract the system icons and add them to our CImageList object?? Pin
indra2017-Oct-06 22:44
indra2017-Oct-06 22:44 
GeneralRe: how to extract the system icons and add them to our CImageList object?? Pin
David Crow18-Oct-06 2:47
David Crow18-Oct-06 2:47 
GeneralRe: how to extract the system icons and add them to our CImageList object?? Pin
indra2018-Oct-06 20:10
indra2018-Oct-06 20:10 
QuestionRe: how to extract the system icons and add them to our CImageList object?? Pin
David Crow19-Oct-06 4:42
David Crow19-Oct-06 4:42 
Questionopening program Pin
Tara1417-Oct-06 4:48
Tara1417-Oct-06 4:48 
AnswerRe: opening program Pin
David Crow17-Oct-06 5:07
David Crow17-Oct-06 5:07 
GeneralRe: opening program Pin
Tara1417-Oct-06 6:47
Tara1417-Oct-06 6:47 
QuestionSerial Number Via USB Pin
VonHagNDaz17-Oct-06 3:43
VonHagNDaz17-Oct-06 3:43 
AnswerRe: Serial Number Via USB Pin
David Crow17-Oct-06 4:01
David Crow17-Oct-06 4:01 
GeneralRe: Serial Number Via USB Pin
VonHagNDaz17-Oct-06 4:20
VonHagNDaz17-Oct-06 4:20 
GeneralRe: Serial Number Via USB Pin
Cedric Moonen17-Oct-06 4:32
Cedric Moonen17-Oct-06 4:32 
GeneralRe: Serial Number Via USB Pin
VonHagNDaz17-Oct-06 4:42
VonHagNDaz17-Oct-06 4:42 
GeneralRe: Serial Number Via USB Pin
VonHagNDaz17-Oct-06 5:05
VonHagNDaz17-Oct-06 5:05 
QuestionRe: Serial Number Via USB Pin
David Crow17-Oct-06 5:10
David Crow17-Oct-06 5:10 
AnswerRe: Serial Number Via USB Pin
VonHagNDaz17-Oct-06 5:34
VonHagNDaz17-Oct-06 5:34 
QuestionRe: Serial Number Via USB Pin
David Crow17-Oct-06 6:22
David Crow17-Oct-06 6:22 

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.