Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Game Development
  4. What do you think of my game I made, strictly in Windows API?

What do you think of my game I made, strictly in Windows API?

Scheduled Pinned Locked Moved Game Development
graphicsgame-devjsonquestiondiscussion
3 Posts 3 Posters 13 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    andyharglesis
    wrote on last edited by
    #1

    Here is the source code:

    #include <windows.h>
    HDC hdc;
    HWND hwnd;
    PAINTSTRUCT ps;
    bool room1 = 0;
    short constupdate()
    {
    while(1)
    {
    InvalidateRect(hwnd, NULL, TRUE);
    }
    }
    int floor;
    static int x, y;
    int jmpjmp = x+5;
    int atpos = jmpjmp;
    bool right = 1;
    bool left = 0;
    void first();
    bool keyinroom = 1;
    bool havekey = 0;
    bool inmenu = 0;
    /* Declare Windows procedure */
    LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

    /* Make the class name into a global variable */

    = "CodeBlocksWindowsApp";

    int WINAPI WinMain (HINSTANCE hThisInstance,
    HINSTANCE hPrevInstance,
    LPSTR lpszArgument,
    int nCmdShow)
    {
    HWND hwnd; /* This is the handle for our window */
    MSG messages; /* Here messages to the application are saved */
    WNDCLASSEX wincl; /* Data structure for the windowclass */

    /\* The Window structure \*/
    wincl.hInstance = hThisInstance;
    wincl.lpszClassName = szClassName;
    wincl.lpfnWndProc = WindowProcedure;      /\* This function is called by windows \*/
    wincl.style = CS\_DBLCLKS;                 /\* Catch double-clicks \*/
    wincl.cbSize = sizeof (WNDCLASSEX);
    
    /\* Use default icon and mouse-pointer \*/
    wincl.hIcon = LoadIcon (NULL, IDI\_APPLICATION);
    wincl.hIconSm = LoadIcon (NULL, IDI\_APPLICATION);
    wincl.hCursor = LoadCursor (NULL, IDC\_ARROW);
    wincl.lpszMenuName = NULL;                 /\* No menu \*/
    wincl.cbClsExtra = 0;                      /\* No extra bytes after the window class \*/
    wincl.cbWndExtra = 0;                      /\* structure or the window instance \*/
    /\* Use Windows's default colour as the background of the window \*/
    wincl.hbrBackground = (HBRUSH) COLOR\_BACKGROUND+7;
    
    /\* Register the window class, and if it fails quit the program \*/
    if (!RegisterClassEx (&wincl))
        return 0;
    
    /\* The class is registered, let's create the program\*/
    hwnd = CreateWindowEx (
           0,                   /\* Extended possibilites for variation \*/
           szClassName,         /\* Classname \*/
           "Window's GDI Pixel Game",       /\* Title Text \*/
           WS\_OVERLAPPEDWINDOW, /\* default window \*/
           CW\_USEDEFAULT,       /\* Windows decides the position \*/
           CW\_USEDEFAULT,       /\* where the window ends up on the screen \*/
           544,                 /\* The program's width \*/
           375,
    
    L R 2 Replies Last reply
    0
    • A andyharglesis

      Here is the source code:

      #include <windows.h>
      HDC hdc;
      HWND hwnd;
      PAINTSTRUCT ps;
      bool room1 = 0;
      short constupdate()
      {
      while(1)
      {
      InvalidateRect(hwnd, NULL, TRUE);
      }
      }
      int floor;
      static int x, y;
      int jmpjmp = x+5;
      int atpos = jmpjmp;
      bool right = 1;
      bool left = 0;
      void first();
      bool keyinroom = 1;
      bool havekey = 0;
      bool inmenu = 0;
      /* Declare Windows procedure */
      LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

      /* Make the class name into a global variable */

      = "CodeBlocksWindowsApp";

      int WINAPI WinMain (HINSTANCE hThisInstance,
      HINSTANCE hPrevInstance,
      LPSTR lpszArgument,
      int nCmdShow)
      {
      HWND hwnd; /* This is the handle for our window */
      MSG messages; /* Here messages to the application are saved */
      WNDCLASSEX wincl; /* Data structure for the windowclass */

      /\* The Window structure \*/
      wincl.hInstance = hThisInstance;
      wincl.lpszClassName = szClassName;
      wincl.lpfnWndProc = WindowProcedure;      /\* This function is called by windows \*/
      wincl.style = CS\_DBLCLKS;                 /\* Catch double-clicks \*/
      wincl.cbSize = sizeof (WNDCLASSEX);
      
      /\* Use default icon and mouse-pointer \*/
      wincl.hIcon = LoadIcon (NULL, IDI\_APPLICATION);
      wincl.hIconSm = LoadIcon (NULL, IDI\_APPLICATION);
      wincl.hCursor = LoadCursor (NULL, IDC\_ARROW);
      wincl.lpszMenuName = NULL;                 /\* No menu \*/
      wincl.cbClsExtra = 0;                      /\* No extra bytes after the window class \*/
      wincl.cbWndExtra = 0;                      /\* structure or the window instance \*/
      /\* Use Windows's default colour as the background of the window \*/
      wincl.hbrBackground = (HBRUSH) COLOR\_BACKGROUND+7;
      
      /\* Register the window class, and if it fails quit the program \*/
      if (!RegisterClassEx (&wincl))
          return 0;
      
      /\* The class is registered, let's create the program\*/
      hwnd = CreateWindowEx (
             0,                   /\* Extended possibilites for variation \*/
             szClassName,         /\* Classname \*/
             "Window's GDI Pixel Game",       /\* Title Text \*/
             WS\_OVERLAPPEDWINDOW, /\* default window \*/
             CW\_USEDEFAULT,       /\* Windows decides the position \*/
             CW\_USEDEFAULT,       /\* where the window ends up on the screen \*/
             544,                 /\* The program's width \*/
             375,
      
      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Never mind the code you'll never get a job with hair like that!

      1 Reply Last reply
      0
      • A andyharglesis

        Here is the source code:

        #include <windows.h>
        HDC hdc;
        HWND hwnd;
        PAINTSTRUCT ps;
        bool room1 = 0;
        short constupdate()
        {
        while(1)
        {
        InvalidateRect(hwnd, NULL, TRUE);
        }
        }
        int floor;
        static int x, y;
        int jmpjmp = x+5;
        int atpos = jmpjmp;
        bool right = 1;
        bool left = 0;
        void first();
        bool keyinroom = 1;
        bool havekey = 0;
        bool inmenu = 0;
        /* Declare Windows procedure */
        LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);

        /* Make the class name into a global variable */

        = "CodeBlocksWindowsApp";

        int WINAPI WinMain (HINSTANCE hThisInstance,
        HINSTANCE hPrevInstance,
        LPSTR lpszArgument,
        int nCmdShow)
        {
        HWND hwnd; /* This is the handle for our window */
        MSG messages; /* Here messages to the application are saved */
        WNDCLASSEX wincl; /* Data structure for the windowclass */

        /\* The Window structure \*/
        wincl.hInstance = hThisInstance;
        wincl.lpszClassName = szClassName;
        wincl.lpfnWndProc = WindowProcedure;      /\* This function is called by windows \*/
        wincl.style = CS\_DBLCLKS;                 /\* Catch double-clicks \*/
        wincl.cbSize = sizeof (WNDCLASSEX);
        
        /\* Use default icon and mouse-pointer \*/
        wincl.hIcon = LoadIcon (NULL, IDI\_APPLICATION);
        wincl.hIconSm = LoadIcon (NULL, IDI\_APPLICATION);
        wincl.hCursor = LoadCursor (NULL, IDC\_ARROW);
        wincl.lpszMenuName = NULL;                 /\* No menu \*/
        wincl.cbClsExtra = 0;                      /\* No extra bytes after the window class \*/
        wincl.cbWndExtra = 0;                      /\* structure or the window instance \*/
        /\* Use Windows's default colour as the background of the window \*/
        wincl.hbrBackground = (HBRUSH) COLOR\_BACKGROUND+7;
        
        /\* Register the window class, and if it fails quit the program \*/
        if (!RegisterClassEx (&wincl))
            return 0;
        
        /\* The class is registered, let's create the program\*/
        hwnd = CreateWindowEx (
               0,                   /\* Extended possibilites for variation \*/
               szClassName,         /\* Classname \*/
               "Window's GDI Pixel Game",       /\* Title Text \*/
               WS\_OVERLAPPEDWINDOW, /\* default window \*/
               CW\_USEDEFAULT,       /\* Windows decides the position \*/
               CW\_USEDEFAULT,       /\* where the window ends up on the screen \*/
               544,                 /\* The program's width \*/
               375,
        
        R Offline
        R Offline
        Ravi Sant
        wrote on last edited by
        #3

        :wtf: Garbage Repost!!

        // ♫ 99 little bugs in the code, // 99 bugs in the code // We fix a bug, compile it again // 101 little bugs in the code ♫

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups