是否已弃用Windows API“ CreateIconFromResourceEx”?

时间:2019-11-07 05:51:09

标签: windows api visual-c++ windows-api-code-pack

如果我卸载此更新“ CreateIconFromResourceEx”,则Windows更新“ Update for Microsoft Windows(KB4517389)”后Windows API“ CreateIconFromResourceEx”将不起作用,但是尚无任何关于弃用“ CreateIconFromResourceEx“ API。

int offset = LookupIconIdFromDirectoryEx(bCursorBuff, TRUE, 0, 0, LR_DEFAULTSIZE|LR_SHARED);

if (offset != 0) 
{                                   
    HICON m_hIcon = CreateIconFromResourceEx(bCursorBuff + offset, 0 , TRUE, 0x30000, 0, 0, LR_DEFAULTSIZE|LR_SHARED); 

    if(m_hIcon == NULL)
    {                       
        MessageBox(NULL, _T("Exception :: CreateIconFromResourceEx failde."),_T("message"),MB_OK|MB_SYSTEMMODAL);
    }           
}

1 个答案:

答案 0 :(得分:0)

int offset = LookupIconIdFromDirectoryEx(bCursorBuff, TRUE, 0, 0, LR_SHARED);

if (offset != 0) 
{                                   
    HICON m_hIcon = CreateIconFromResourceEx(bCursorBuff + offset, bCursorBuffSize , TRUE, 0x30000, 0, 0, LR_SHARED); 

    if(m_hIcon == NULL)
    {                       
        MessageBox(NULL, _T("Exception :: CreateIconFromResourceEx failde."),_T("message"),MB_OK|MB_SYSTEMMODAL);
    }           
}