duilib 换背景

CControlUI* background = m_PaintManager.FindControl(_T("vlayout_background"));
if (background != NULL){
    TCHAR szBuf[MAX_PATH] = { 0 };
    _stprintf_s(szBuf, MAX_PATH - 1, _T("file='bk\\%s'"), _T("background2.png"));  //设置背景图片
    background->SetBkImage(szBuf);
}

你可能感兴趣的:(duilib)