Click here to Skip to main content
15,907,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Diffrent language string data problem? Pin
Andrew Brock23-Jan-11 23:51
Andrew Brock23-Jan-11 23:51 
GeneralRe: Diffrent language string data problem? Pin
Le@rner23-Jan-11 23:53
Le@rner23-Jan-11 23:53 
AnswerRe: Diffrent language string data problem? Pin
ShilpiP24-Jan-11 0:39
ShilpiP24-Jan-11 0:39 
QuestionMulti Threaded program With allegro. Pin
Thilina.madush23-Jan-11 23:16
Thilina.madush23-Jan-11 23:16 
AnswerRe: Multi Threaded program With allegro. Pin
Andrew Brock23-Jan-11 23:54
Andrew Brock23-Jan-11 23:54 
GeneralRe: Multi Threaded program With allegro. Pin
Thilina.madush24-Jan-11 0:02
Thilina.madush24-Jan-11 0:02 
GeneralRe: Multi Threaded program With allegro. Pin
Andrew Brock24-Jan-11 0:07
Andrew Brock24-Jan-11 0:07 
QuestionHow to set a icon to the column of the CListCtrl Pin
yu-jian23-Jan-11 21:06
yu-jian23-Jan-11 21:06 
I find some code to set it.
But there no image appear in the CListCtrl's column.

HDITEM headerItem;
headerItem.mask = HDI_FORMAT;
CHeaderCtrl* pHeaderCtrl = GetHeaderCtrl();

if(iColumn != m_iCurrentSortItem) {
    pHeaderCtrl->GetItem(m_iCurrentSortItem, &headerItem);
    headerItem.fmt &= ~(HDF_IMAGE | HDF_BITMAP_ON_RIGHT);
    pHeaderCtrl->SetItem(m_iCurrentSortItem, &headerItem);
    m_iCurrentSortItem = iColumn;
    m_imlHeaderCtrl.DeleteImageList();
}

//place new arrow unless we were given an invalid column
if(iColumn >= 0 && pHeaderCtrl->GetItem(iColumn, &headerItem)) {
    m_atSortArrow = atType;

    HINSTANCE hInstRes = AfxFindResourceHandle(MAKEINTRESOURCE(m_atSortArrow), RT_BITMAP);
    if (hInstRes != NULL){
        HBITMAP hbmSortStates = (HBITMAP)::LoadImage(hInstRes, MAKEINTRESOURCE(m_atSortArrow), IMAGE_BITMAP, 0, 0, LR_CREATEDIBSECTION | LR_LOADMAP3DCOLORS);
        if (hbmSortStates != NULL){
            CBitmap bmSortStates;
            bmSortStates.Attach(hbmSortStates);

            CImageList imlSortStates;
            if (imlSortStates.Create(14, 14, ILC_COLOR32 | ILC_MASK, 1, 0)){
                VERIFY( imlSortStates.Add(&bmSortStates, RGB(255, 0, 255)) != -1 );

                //imlSortStates.SetBkColor(GetSysColor(COLOR_BTNFACE));

                (void)pHeaderCtrl->SetImageList(&imlSortStates);
                m_imlHeaderCtrl.DeleteImageList();
                m_imlHeaderCtrl.Attach(imlSortStates.Detach());
            }
        }
    }
    headerItem.mask |= HDI_IMAGE;
    headerItem.fmt |= HDF_IMAGE | HDF_BITMAP_ON_RIGHT;
    headerItem.iImage = 0;
    pHeaderCtrl->SetItem(iColumn, &headerItem);
}

AnswerRe: How to set a icon to the column of the CListCtrl Pin
ShilpiP23-Jan-11 22:45
ShilpiP23-Jan-11 22:45 
AnswerRe: How to set a icon to the column of the CListCtrl Pin
David Crow24-Jan-11 4:21
David Crow24-Jan-11 4:21 
QuestionMouse move over Tray Icon, the icon disappear. [modified][Solved] Pin
yu-jian23-Jan-11 14:47
yu-jian23-Jan-11 14:47 
AnswerRe: Mouse move over Tray Icon, the icon disappear. Pin
Stephen Hewitt23-Jan-11 19:28
Stephen Hewitt23-Jan-11 19:28 
AnswerRe: Mouse move over Tray Icon, the icon disappear. Pin
Malli_S23-Jan-11 23:05
Malli_S23-Jan-11 23:05 
GeneralRe: Mouse move over Tray Icon, the icon disappear. Pin
yu-jian24-Jan-11 0:45
yu-jian24-Jan-11 0:45 
GeneralRe: Mouse move over Tray Icon, the icon disappear. Pin
Stephen Hewitt24-Jan-11 1:43
Stephen Hewitt24-Jan-11 1:43 
GeneralRe: Mouse move over Tray Icon, the icon disappear. Pin
Malli_S24-Jan-11 2:05
Malli_S24-Jan-11 2:05 
GeneralRe: Mouse move over Tray Icon, the icon disappear. Pin
yu-jian24-Jan-11 15:32
yu-jian24-Jan-11 15:32 
GeneralRe: Mouse move over Tray Icon, the icon disappear. Pin
yu-jian24-Jan-11 15:30
yu-jian24-Jan-11 15:30 
Questionwhat is wrong with this code? Pin
aesthetic.crazy22-Jan-11 8:41
aesthetic.crazy22-Jan-11 8:41 
AnswerRe: what is wrong with this code? Pin
PIEBALDconsult22-Jan-11 10:15
mvePIEBALDconsult22-Jan-11 10:15 
AnswerRe: what is wrong with this code? Pin
CPallini22-Jan-11 10:39
mveCPallini22-Jan-11 10:39 
AnswerRe: what is wrong with this code? Pin
T210222-Jan-11 13:08
T210222-Jan-11 13:08 
AnswerRe: what is wrong with this code? [modified] Pin
Richard MacCutchan22-Jan-11 21:35
mveRichard MacCutchan22-Jan-11 21:35 
AnswerRe: what is wrong with this code? Pin
Aescleal23-Jan-11 6:34
Aescleal23-Jan-11 6:34 
GeneralRe: what is wrong with this code? Pin
Adam Roderick J23-Jan-11 19:04
Adam Roderick J23-Jan-11 19:04 

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.