Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3355660
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T02:25:19+00:00 2026-05-18T02:25:19+00:00

I want to experiment with some D3D programming, but I hate writing code to

  • 0

I want to experiment with some D3D programming, but I hate writing code to create and manage Win32 windows. I really don’t like the native Win32 API. Is there any libraries or helper classes out there that make it easier to create and manage Win32 window objects?

Thanks

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T02:25:19+00:00Added an answer on May 18, 2026 at 2:25 am

    There is very little handling of Win32 windows you actually need to do.

    You could try this, for example:

    ATOM MyRegisterClass( HINSTANCE hInstance, TCHAR* szWindowClass );
    HWND InitInstance(HINSTANCE hInstance, int nCmdShow, TCHAR* szWindowClass, TCHAR* szTitle, int width, int height );
    
    int APIENTRY _tWinMain(HINSTANCE hInstance,
                         HINSTANCE hPrevInstance,
                         LPTSTR    lpCmdLine,
                         int       nCmdShow)
    {
        // TODO: Place code here.
        HACCEL hAccelTable;
    
        // Initialize global strings
        MyRegisterClass( hInstance, _T( "MyWinClass" ) );
    
        // Perform application initialization:
            HWND hWnd = InitInstance (hInstance, SW_SHOWDEFAULT, _T( "MyWinClass" ), _T( "D3D Renderer" ), 1024, 768 );
        if ( hWnd == NULL ) 
        {
            return FALSE;
        }
    
        // INIT D3D!
        // INIT D3D!
        // INIT D3D!
    
    
        MSG msg;
        msg.message = 0;
        // Main message loop:
        while( msg.message != WM_QUIT ) 
        {
            // DO D3D RENDERING!
            // DO D3D RENDERING!
            // DO D3D RENDERING!
    
            if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
            {
                TranslateMessage( &msg );
                DispatchMessage( &msg );
            }
            else
            {
                Sleep( 0 );
            }
        }
    
        // SHUTDOWN D3D!
        // SHUTDOWN D3D!
        // SHUTDOWN D3D!
    
        return 0;
    }
    
    ATOM MyRegisterClass( HINSTANCE hInstance, TCHAR* szWindowClass )
    {
        WNDCLASSEX wcex;
    
        wcex.cbSize = sizeof(WNDCLASSEX); 
    
        wcex.style          = CS_CLASSDC;
        wcex.lpfnWndProc    = (WNDPROC)WndProc;
        wcex.cbClsExtra     = 0;
        wcex.cbWndExtra     = 0;
        wcex.hInstance      = hInstance;
        wcex.hIcon          = NULL;
        wcex.hCursor        = NULL;
        wcex.hbrBackground  = (HBRUSH)(COLOR_WINDOW+1);
        wcex.lpszMenuName   = NULL;
        wcex.lpszClassName  = szWindowClass;
        wcex.hIconSm        = NULL;
    
        return RegisterClassEx(&wcex);
    }
    
    HWND InitInstance(HINSTANCE hInstance, int nCmdShow, TCHAR* szWindowClass, TCHAR* szTitle, int width, int height )
    {
       hInst = hInstance; // Store instance handle in our global variable
    
       HWND hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
          CW_USEDEFAULT, 0, width, height, NULL, NULL, hInstance, NULL);
    
       if ( hWnd == NULL )
       {
          return hWnd;
       }
    
       ShowWindow(ghWnd, nCmdShow);
       UpdateWindow(ghWnd);
    
       return hWnd;
    }
    

    And that is literally all the specifically windowing related code you need.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to experiment with terminals and colored output, but at the same time
I want to experiment with gevent , but after installing it I can't load
I want to do some experiment on SQL Server cluster to gain some experience
I want to experiment with some GPGPU in first place. I could have chosen
I'm new to Linux but want to experiment with aliases. I have a directory
While I make some (java) code, i feel the need to experiment and change
This is mostly an experiment , but I do think it does have some
I want to experiment with an idea I have of automatically localizing software, or
I want to experiment a bit with Jint on Monotouch and although the Jint-Mono
As an experiment we want to build our products using the Eclipse java compiler

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.