0 comments

MasterX3D in C Language with code

                                        MasterX3D Program in C-Language
Program:-

#include "MasterX3D.h"
// CreateMaster3D
bool MasterX3DHWND::CreateMaster3D(char* title, int x, int y, int width, int height,HICON icon,HCURSOR cur,WNDPROC proc,COLORREF back_color)
{
     WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, proc, 0L, 0L,
                      GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
                      title, NULL };
    RegisterClassEx( &wc );

    hwnd = CreateWindow(title, title,
                              WS_OVERLAPPEDWINDOW, 100, 100, 300, 300,
                              GetDesktopWindow(), NULL, wc.hInstance, NULL );

    if(InitD3D())
    {
      ShowWindow( hwnd, SW_SHOWDEFAULT );
      UpdateWindow( hwnd);

        return true;
    }
    else
    {
        MessageBox(0,"Unable To Initilize DirectX8","Error",MB_OK | MB_ICONERROR);
        DestroyWindow(hwnd);
        return false;
    }
}
// initilize program looop
WPARAM MasterX3DHWND::InitLoop(void (*updatex)(MASTERSCREEN))
{
    update = updatex;
    MSG msg;
    ZeroMemory( &msg, sizeof(msg) );
    while( msg.message!=WM_QUIT )
    {
        if( PeekMessage( &msg, NULL, 0U, 0U, PM_REMOVE ) )
        {
            TranslateMessage( &msg );
            DispatchMessage( &msg );
        }
        else
 
Toggle Footer
Top