Guest User

Untitled

a guest
Jul 19th, 2015
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.20 KB | None | 0 0
  1. //---------------------------------------------------------------------------
  2. #include <windows.h>
  3. #include "string.h"
  4.  
  5. //---------------------------------------------------------------------------
  6.  
  7. LPCTSTR Caption = "Ankieta";
  8.  
  9. INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
  10.                    LPSTR lpCmdLine, int nCmdShow)
  11. {
  12.     HWND hWnd = GetConsoleWindow();
  13.     ShowWindow( hWnd, SW_HIDE );
  14.    
  15.     int result = MessageBox( NULL,"Czy lubisz system windows?",Caption, MB_YESNO | MB_ICONQUESTION);
  16.  
  17.     switch(result)
  18.     {
  19.         case IDYES:
  20.             MessageBox( NULL,"Dziekujemy za uznanie!",NULL, MB_OK | MB_ICONINFORMATION);
  21.             break;
  22.         case IDNO:
  23.             {
  24.                 int counter = 500;
  25.                 while(counter > 0)
  26.                 {
  27.                      char title[21];
  28.                      sprintf(title, "Pozostalo klikniec: %d",counter);
  29.                      MessageBox(NULL, "To teraz sobie chuju poklikasz!",title ,MB_OK | MB_ICONWARNING);
  30.                      counter--;
  31.               }
  32.              break;
  33.             }
  34.     }
  35.  
  36.     return 0;
  37. }
  38. //---------------------------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment