自定义显示MessageBox

HHOOK   hHook; 
LRESULT   __stdcall   CBTHookProc(   long   nCode,WPARAM   wParam,LPARAM   lParam) 
{ 
    if   (nCode==HCBT_ACTIVATE) 
    { 
    SetDlgItemText((HWND)wParam,IDYES, "123 "); 
    SetDlgItemText((HWND)wParam,IDNO   , "456 "); 
    SetDlgItemText((HWND)wParam,IDOK, "789 "); 
    SetDlgItemText((HWND)wParam,IDCANCEL, "去死 "); 
    UnhookWindowsHookEx(hHook); 
    } 
    return   0; 
} 
//使用方法: 
hHook=SetWindowsHookEx(WH_CBT,(HOOKPROC)CBTHookProc,AfxGetInstanceHandle(),NULL);
MessageBox(NULL,"","",MB_YESNOCANCEL);

帖子: 点击打开链接

你可能感兴趣的:(自定义显示MessageBox)