Shell_NotifyIcon xp提示無法顯示問題

    /*
    
    1、 解決辦法一共兩個
    摘自msdn
    Setting cbSize to this value enables all the version 5.0 and 6.0 enhancements. 
    For earlier versions, the size of the pre-6.0 structure is given by the NOTIFYICONDATA_V2_SIZE constant
    and the pre-5.0 structure is given by the NOTIFYICONDATA_V1_SIZE constant. Initialize the cbSize member as follows. 

    nid.cbSize = NOTIFYICONDATA_V2_SIZE;
   
    2、

    #define _WIN32_WINNT 0x0501

    */
    m_nid.cbSize = NOTIFYICONDATA_V2_SIZE;//sizeof(NOTIFYICONDATA);
    m_nid.uFlags = NIF_INFO;
    m_nid.dwInfoFlags = dwInfoFlags; // NIIF_WARNING | NIIF_INFO;  
    m_nid.uTimeout = uTimeout;
    lstrcpy(m_nid.szInfoTitle, L"xxxx");
    lstrcpy(m_nid.szInfo, szMsg);

    bRet = ::Shell_NotifyIcon(NIM_MODIFY, &m_nid);

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章