Skip to main content
GameDev.net gamedev.net
🔒 Locked

Dev-c++ Directx errors

Started by kingpinzs May 31, 2003 at 12:04 AM 0 replies 650+ views
Original Post
kingpinzs
kingpinzs
H:\samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice\CreateDevice.cpp [Warning] In function `INT WinMain(HINSTANCE__*, HINSTANCE__*, CHAR*,: 156 H:\samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice\CreateDevice.cpp invalid conversion from void*'' to HINSTANCE__*'' 176 H:\samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice\CreateDevice.cpp invalid conversion from void*'' to HINSTANCE__*'' H:\samples\Multimedia\Direct3D\Tutorials\Tut01_CreateDevice\Makefile.win [Build Error] [CreateDevice.o] Error 1
INT WINAPI WinMain( HINSTANCE hInst, HINSTANCE, LPSTR, INT )
{
// Register the window class

WNDCLASSEX wc = { sizeof(WNDCLASSEX), CS_CLASSDC, MsgProc, 0L, 0L, 
GetModuleHandle(NULL), NULL, NULL, NULL, NULL,
"D3D Tutorial", NULL };
RegisterClassEx( &wc );

// Create the application''s window

HWND hWnd = CreateWindow( "D3D Tutorial", "D3D Tutorial 01: CreateDevice", 
WS_OVERLAPPEDWINDOW, 100, 100, 300, 300,
GetDesktopWindow(), NULL, wc.hInstance, NULL );

// Initialize Direct3D

if( SUCCEEDED( InitD3D( hWnd ) ) )
{ 
// Show the window

ShowWindow( hWnd, SW_SHOWDEFAULT );
UpdateWindow( hWnd );

// Enter the message loop

MSG msg; 
while( GetMessage( &msg, NULL, 0, 0 ) )
{
TranslateMessage( &msg );
DispatchMessage( &msg );
}
}

// Clean up everything and exit the app

Cleanup();
UnregisterClass( "D3D Tutorial", wc.hInstance );
return 0;
}

Also i can run it just fine in MSVC++ with no errors. I am using the right lib files and have every thing linked so what whould this be.

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.