Also:
Abzählung.cpp:
|
Quellcode
|
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
#include <Windows.h>
#include <TriBase.h>
#include "..\\..\\Allgemeines\\InitWindow.h"
#include "..\\..\\Allgemeines\\Direct3DEnum.h"
#include "..\\..\\Allgemeines\\InitDirect3D.h"
#include "..\\..\\Allgemeines\\Allgemeines.h"
#include "resource1.h"
tbResult Render(float fNumSecsPassed)
{
return TB_OK;
}
tbResult Move(float fNumSecsPassed)
{
return TB_OK;
}
int WINAPI WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
char* pcCmdLine,
int iShowCmd)
{
SDirect3DParameters Direct3DParameters;
tbResult Result;
tbInit();
Result = GetDirect3DParameters(&Direct3DParameters);
if(Result == TB_ERROR)
{
MessageBox(NULL, "Fehler beim Abzählen!", "Fehler",
MB_OK | MB_ICONEXCLAMATION);
tbExit();
return 1;
}
else if(Result == TB_CANCELED)
{
tbExit();
return 0;
}
if(InitWindow(Direct3DParameters.VideoMode.Width,
Direct3DParameters.VideoMode.Height,
"Testfenster",
LoadIcon(hInstance, MAKEINTRESOURCE(IDI_ICON1))) == TB_ERROR)
{
MessageBox(NULL, "Fehler beim Erstellen des Fensters",
"Fehler", MB_OK | MB_ICONEXCLAMATION);
tbExit();
return 1;
}
if(InitDirect3D(&Direct3DParameters, g_hWindow) == TB_ERROR)
{
MessageBox(g_hWindow, "Fehler beim Init. von Direct3D!",
"Fehler", MB_OK | MB_ICONEXCLAMATION);
ExitWindow();
tbExit();
return 1;
}
tbDoMessageLoop(Render, Move);
ExitDirect3D();
ExitWindow();
tbExit();
return 0;
}
|
In der Ausgabe in der Kategorie "Erstellen" steht:
d:\TriBase\Include\DShowBaseClasses\wxutil.h(195) : warning C4312: 'Typumwandlung': Konvertierung von 'LONG' in größeren Typ 'PVOID'
d:\TriBase\Include\tbGUI.h(286) : warning C4267: '=': Konvertierung von 'size_t' nach 'int', Datenverlust möglich
Zu folgenden Lib's hab ich gelinkt:
[list]tribased.lib
d3d9.lib
dxerr9.lib[/list]
Folgende Quellcode-Dateien wurden ins Projekt eingefügt:
[list]Direct3DEnum.cpp
InitDirect3D.cpp
InitWindow.cpp[/list]
Und die Folgenden Header-Dateien hab ich auch ins Projekt eingefügt:
[list]Allgemeines.h
Direct3DEnum.h
InitDirect3D.h
InitWindow.h
resource1.h[/list]