News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Black&White System Image List!

Started by xandaz, June 10, 2013, 10:09:45 PM

Previous topic - Next topic

xandaz

   hey guys.... i'm trying to use the system imagelist to create a black and white alternative to it. BuildBWImageList    PROC    hWnd:DWORD

    local   hDC:DWORD
    local   hMemDC:DWORD
    local   hBitmap:DWORD
    local   cxIml:DWORD

    mov     tvis.hParent,0
    mov     tvis.hInsertAfter,TVI_LAST
    mov     tvis.item.imask,TVIF_IMAGE++TVIF_SELECTEDIMAGE
    invoke  GetDC,hWnd
    mov     hDC,eax
    invoke  CreateCompatibleDC,hDC
    mov     hMemDC,eax
    invoke  CreateCompatibleBitmap,hMemDC,cySysImlCheck
    mov     hBitmap,eax
    invoke  SelectObject,hMemDC,eax
    invoke  GetLogicalDriveStrings,sizeof TextBuffer/2,addr TextBuffer
    invoke  SHGetFileInfo,addr TextBuffer,addr shfi,sizeof shfi,SHGFI_SYSICONINDEX+SHGFI_SMALLICON
    mov     hSysIml,eax
    invoke  ImageList_GetImageCount,hSysIml
    dec     eax
    mov     cxIml,eax
    xor     ecx,ecx
loop_1:
    invoke  ImageList_Draw,hSysIml,0,hMemDC,0,0,ILD_NORMAL
       
             

    I'm stuck here. How does one then get the bitmap from hMemDC? Can someone help me out?
ty


xandaz