MessageBox的6种样式展示

类别:编程语言 点击:0 评论:0 推荐:

#include <windows.h>

int WINAPI WinMain( HINSTANCE hinstance,
                                  HINSTANCE hprevinstance,
                                  PSTR Lcmdline,
                                  int cmdshow )
{
    int i;
    for( i = 0; i <= 5; ++i )
    {
        switch(i)
        {
            case 0: MessageBox( NULL, "hey! ling jie.","hello", MB_OK );
                    break;
            case 1: MessageBox( NULL, "hey! ling jie.","hello", MB_OKCANCEL );
                    break;
            case 2: MessageBox( NULL, "hey! ling jie.","hello", MB_ABORTRETRYIGNORE );
                   break;   
            case 3: MessageBox( NULL, "hey! ling jie.","hello", MB_YESNOCANCEL );
                  break;   
            case 4: MessageBox( NULL, "hey! ling jie.","hello", MB_YESNO );
                  break;   
            case 5: MessageBox( NULL, "hey! ling jie.","hello", MB_RETRYCANCEL );
                 break;   
            default: break;
     }
 }   

 return 0;
}

本文地址:http://com.8s8s.com/it/it27238.htm