Du bist nicht angemeldet.

Stilllegung des Forums
Das Forum wurde am 05.06.2023 nach über 20 Jahren stillgelegt (weitere Informationen und ein kleiner Rückblick).
Registrierungen, Anmeldungen und Postings sind nicht mehr möglich. Öffentliche Inhalte sind weiterhin zugänglich.
Das Team von spieleprogrammierer.de bedankt sich bei der Community für die vielen schönen Jahre.
Wenn du eine deutschsprachige Spieleentwickler-Community suchst, schau doch mal im Discord und auf ZFX vorbei!

Werbeanzeige

1

06.11.2007, 19:26

Fehler beim Erstellen eines Windows Fensters

Hallo,
also ich habe folgendes Problem: Ich möchte ganz simpel ein WINAPI Fenster erstellen und habe folgenden Code dafür (stand in dem Buch, welches ich grad lese^^):

C-/C++-Quelltext

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
#include "stdafx.h"

int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR lpCmdLine, int nCmdShow){
    WNDCLASSEX winClass;
    MSG        uMsg;
    memset(&uMsg,0,sizeof(uMsg));

    winClass.lpszClassName = "MY_WINDOWS_CLASS";

    winClass.vbSize = sizeof(WNDCLASSEX);

    winClass.style = CS_HREDRAW | CS_VREDRAW;

    winClass.lpfnWndProc = WindowProc;

    winClass.hInstance = hInstance;

    winClass.hIcon=LoadIcon(hInstance, (LPCTSTR)IDI_ICON1);

    winClass.hIconSm = LoadIcon(hInstance, (LPCTSTR)IDI_DIRECTX_ICON);

    winClass.hCursor = LoadCursor(NULL, IDC_ARROW);

    winClass.hbrBackground = (HBRUSH)GetStockObject(Black_BRUSH);

    winClass.lpszMenuName = NULL;
    winClass.cbClsExtra = 0;

    winClass.cbWndExtra = 0;
    }

Die Datei stdafx.h beinhaltet nur include Anweisungen ich denke die muss ich jetzt nicht einfügen. Also beim kompilieren kommt folgender Fehler:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
1>------ Erstellen gestartet: Projekt: CreateWindow, Konfiguration: Debug Win32 ------
1>Kompilieren...
1>WinMain().cpp
1>e:\projekte\createwindow\createwindow\winmain().cpp(8) : error C2440: '=': 'const char [17]' kann nicht in 'LPCWSTR' konvertiert werden
1>        Die Typen, auf die verwiesen wird, sind nicht verknüpft; die Konvertierung erfordert einen reinterpret_cast-Operator oder eine Typumwandlung im C- oder Funktionsformat.
1>e:\projekte\createwindow\createwindow\winmain().cpp(10) : error C2039: 'vbSize': Ist kein Element von 'tagWNDCLASSEXW'
1>        e:\programme\microsoft platform sdk for windows server 2003 r2\include\winuser.h(1485): Siehe Deklaration von 'tagWNDCLASSEXW'
1>e:\projekte\createwindow\createwindow\winmain().cpp(14) : error C2065: 'WindowProc': nichtdeklarierter Bezeichner
1>e:\projekte\createwindow\createwindow\winmain().cpp(16) : error C2065: 'hInstance': nichtdeklarierter Bezeichner
1>e:\projekte\createwindow\createwindow\winmain().cpp(18) : error C2065: 'IDI_ICON1': nichtdeklarierter Bezeichner
1>e:\projekte\createwindow\createwindow\winmain().cpp(20) : error C2065: 'IDI_DIRECTX_ICON': nichtdeklarierter Bezeichner
1>e:\projekte\createwindow\createwindow\winmain().cpp(24) : error C2065: 'Black_BRUSH': nichtdeklarierter Bezeichner
1>Das Buildprotokoll wurde unter "file://e:\Projekte\CreateWindow\CreateWindow\Debug\BuildLog.htm" gespeichert.
1>CreateWindow - 7 Fehler, 0 Warnung(en)


Danke im voraus

PS: ich benutze Visual c++ 2005 Express Edition

Das Gurke

Community-Fossil

Beiträge: 1 996

Wohnort: Pinneberg

Beruf: Schüler

  • Private Nachricht senden

3

06.11.2007, 19:35

ich habs installiert und auch in die Verzeichnisse geschrieben
(E:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\Include
E:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\Bin
und E:\Programme\Microsoft Platform SDK for Windows Server 2003 R2\Lib)
MFG

Das Gurke

Community-Fossil

Beiträge: 1 996

Wohnort: Pinneberg

Beruf: Schüler

  • Private Nachricht senden

4

06.11.2007, 19:39

Sorry, ich hab einfach nur die Standardantwort gegeben :oops: Hat in 99% der Fälle bisher weitergeholfen.

C-/C++-Quelltext

1
1>e:\projekte\createwindow\createwindow\winmain().cpp(8) : error C2440: '=': 'const char [17]' kann nicht in 'LPCWSTR' konvertiert werden 
Schreib mal deine Strings in folgender Notation:

C-/C++-Quelltext

1
L"Ich bin ein String"
und informier dich hier im Forum über Unicode.

Ansonsten hast du unter anderem noch Variablen falsch geschrieben (hInstance?) und definierst nirgends den Windowproc.

Das ist mir auf die Schnelle aufgefallen und mit Sicherheit nicht alles. Schau lieber nochmal ins Buch!

grek40

Alter Hase

Beiträge: 1 491

Wohnort: Dresden

  • Private Nachricht senden

5

06.11.2007, 19:41

Entweder der Fehler liegt beim Buch oder bei deinem Verständnis vom Buch ;)

1. Fehler -> über UNICODE schlau machen
2. Fehler -> cbSize heißt das gute Teil, wenn man mal nen Blick in die Doku riskiert
3. Fehler -> kein Wunder, da is keine WindowProc im Code zu sehen!
4. Fehler -> das selbe mit hInstance, nur dass da eine andere Variable existiert, die du eigentlich meinst
...

kein Bock hier für dich jeden Kleinkram aufzulisten, aber die Tendenz sollte klar sein ;)


// Klasse, wieder mal zu langsam geschrieben :lol:

6

06.11.2007, 19:49

ok danke habt mir schonmal geholfen die Fehler sind weg musste nur noch gewisse Sachen hinzufügen und andere löschen^^
Nur kommt jetzt beim verknüpfen folgendes:

Quellcode

1
2
3
4
5
6
7
8
9
10
1>Kompilieren...
1>WinMain().cpp
1>Verknüpfen...
1>WinMain().obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__GetStockObject@4" in Funktion "_WinMain@16".
1>WinMain().obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__LoadCursorW@8" in Funktion "_WinMain@16".
1>WinMain().obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__DefWindowProcW@16" in Funktion ""long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)".
1>WinMain().obj : error LNK2019: Verweis auf nicht aufgelöstes externes Symbol "__imp__PostQuitMessage@4" in Funktion ""long __stdcall WindowProc(struct HWND__ *,unsigned int,unsigned int,long)" (?WindowProc@@YGJPAUHWND__@@IIJ@Z)".
1>E:\Projekte\CreateWindow\Debug\CreateWindow.exe : fatal error LNK1120: 4 nicht aufgelöste externe Verweise.
1>Das Buildprotokoll wurde unter "file://e:\Projekte\CreateWindow\CreateWindow\Debug\BuildLog.htm" gespeichert.
1>CreateWindow - 5 Fehler, 0 Warnung(en)


Der Code ist jetzt:

C-/C++-Quelltext

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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
#include "stdafx.h"

HWND              g_hWnd       = NULL;
LPDIRECT3D9       g_pD3D       = NULL;
LPDIRECT3DDEVICE9 g_pd3dDevice = NULL;



int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                   LPSTR lpCmdLine, int nCmdShow);
LRESULT CALLBACK WindowProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
void init(void);
void shutDown(void);
void render(void);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmdLine, int nCmdShow){
    WNDCLASSEX winClass;
    MSG        uMsg;
    memset(&uMsg,0,sizeof(uMsg));

    winClass.lpszClassName = L"MY_WINDOWS_CLASS";

    winClass.cbSize = sizeof(WNDCLASSEX);

    winClass.style = CS_HREDRAW | CS_VREDRAW;

    winClass.lpfnWndProc = WindowProc;

    winClass.hInstance = hInstance;

    //winClass.hIcon           = LoadIcon(hInstance, (LPCTSTR)IDI_DIRECTX_ICON);


    //winClass.hIconSm = LoadIcon(hInstance, (LPCTSTR)IDI_DIRECTX_ICON);


    winClass.hCursor = LoadCursor(NULL, IDC_ARROW);

    winClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);

    winClass.lpszMenuName = NULL;
    winClass.cbClsExtra = 0;

    winClass.cbWndExtra = 0;
    }   

LRESULT CALLBACK WindowProc( HWND   hWnd, 
                             UINT   msg, 
                             WPARAM wParam, 
                             LPARAM lParam )
{
    switch( msg )
    {
        case WM_KEYDOWN:
        {
            switch( wParam )
            {
                case VK_ESCAPE:
                    PostQuitMessage(0);
                    break;
            }
        }
        break;

        case WM_CLOSE:
        {
            PostQuitMessage(0);
        }
        
        case WM_DESTROY:
        {
            PostQuitMessage(0);
        }
        break;

        default:
        {
            return DefWindowProc( hWnd, msg, wParam, lParam );
        }
        break;
    }

    return 0;
}

void init( void )
{
    g_pD3D = Direct3DCreate9( D3D_SDK_VERSION );

    if( g_pD3D == NULL )
    {
        
        return;
    }

    int nMode = 0;
    D3DDISPLAYMODE d3ddm;
    bool bDesiredAdapterModeFound = false;

    int nMaxAdapterModes = g_pD3D->GetAdapterModeCount( D3DADAPTER_DEFAULT, 
                                                        D3DFMT_X8R8G8B8 );

    for( nMode = 0; nMode < nMaxAdapterModes; ++nMode )
    {
        if( FAILED( g_pD3D->EnumAdapterModes( D3DADAPTER_DEFAULT, 
                                              D3DFMT_X8R8G8B8, nMode, &d3ddm ) ) )
        {
            return;
        }

        if( d3ddm.Width != 640 || d3ddm.Height != 480 )
            continue;

        if( d3ddm.Format != D3DFMT_X8R8G8B8 )
            continue;
        if( d3ddm.RefreshRate != 75 )
            continue;

        bDesiredAdapterModeFound = true;
        break;
    }

    if( bDesiredAdapterModeFound == false )
    {
        return;
    }

    if( FAILED( g_pD3D->CheckDeviceType( D3DADAPTER_DEFAULT,
                                         D3DDEVTYPE_HAL,
                                         D3DFMT_X8R8G8B8,
                                         D3DFMT_X8R8G8B8,
                                         FALSE ) ) )
    {
        return;
    }

    if( FAILED( g_pD3D->CheckDeviceFormat( D3DADAPTER_DEFAULT,
                                           D3DDEVTYPE_HAL,
                                           D3DFMT_X8R8G8B8,
                                           D3DUSAGE_DEPTHSTENCIL,
                                           D3DRTYPE_SURFACE,
                                           D3DFMT_D16 ) ) )
    {

        return;
    }


    D3DCAPS9 d3dCaps;

    if( FAILED( g_pD3D->GetDeviceCaps( D3DADAPTER_DEFAULT,
                                       D3DDEVTYPE_HAL, &d3dCaps ) ) )
    {

        return;
    }

    DWORD flags = 0;

    if( d3dCaps.VertexProcessingCaps != 0 )
        flags = D3DCREATE_HARDWARE_VERTEXPROCESSING;
    else
        flags = D3DCREATE_SOFTWARE_VERTEXPROCESSING;



    D3DPRESENT_PARAMETERS d3dpp;
    memset(&d3dpp, 0, sizeof(d3dpp));
    
    d3dpp.Windowed               = FALSE;
    d3dpp.EnableAutoDepthStencil = TRUE;
    d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
    d3dpp.SwapEffect             = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferWidth        = 640;
    d3dpp.BackBufferHeight       = 480;
    d3dpp.BackBufferFormat       = D3DFMT_X8R8G8B8;
    d3dpp.PresentationInterval   = D3DPRESENT_INTERVAL_IMMEDIATE;

    if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd,
                                      flags, &d3dpp, &g_pd3dDevice ) ) )
    {

        return;
    }
}

void shutDown( void )
{
    if( g_pd3dDevice != NULL )
        g_pd3dDevice->Release();

    if( g_pD3D != NULL )
        g_pD3D->Release();
}

void render( void )
{
    g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET,
                         D3DCOLOR_COLORVALUE(0.0f,1.0f,0.0f,1.0f), 1.0f, 0 );

    g_pd3dDevice->BeginScene();

    g_pd3dDevice->EndScene();

    g_pd3dDevice->Present( NULL, NULL, NULL, NULL );
}


PS: Die kommentierten Zeilen wollten i-wie net und da dachte ich das klappt auch ohne XD deswegen hab ich die kommentiert wollt net löschen^^

Danke im voraus

grek40

Alter Hase

Beiträge: 1 491

Wohnort: Dresden

  • Private Nachricht senden

7

06.11.2007, 20:46

GetStockObject braucht Gdi32.lib
LoadCursor braucht User32.lib
DefWindowProc braucht User32.lib
usw...

Einfach mal die SDK-Doku anschaun!

8

06.11.2007, 20:48

muss ich dass jetzt per include anweisung oder im linker hinzufügen???

Auf jedenfall schonmal danke für die Antwort!

9

06.11.2007, 20:53

oder einfach:

C-/C++-Quelltext

1
#pragma comment(lib, "gdi32.lib")
des weiteren wird in deinem Code kein Fenster erstellt sondern nur die Struktur angelegt, um eine zu Registrieren(was auch nicht gemacht wird).
Devil Entertainment :: Your education is our inspiration
Der Spieleprogrammierer :: Community Magazin
Merlin - A Legend awakes :: You are a dedicated C++ (DirectX) programmer and you have ability to work in a team? Contact us!
Siedler II.5 RttR :: The old settlers-style is comming back!

Also known as (D)Evil

10

06.11.2007, 21:08

ok danke an alle mir ist garnet aufgefallen dass CreateWindowEx fehlteXD

gut dass Programm lässt sich kompilieren doch noch ein Problem...^^
Das Programm schliest sich direkt man sieht garkein Fenster o.O
hier der ganze Code nochmal:

C-/C++-Quelltext

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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
#include "stdafx.h"

HWND              g_hWnd       = NULL;
LPDIRECT3D9       g_pD3D       = NULL;
LPDIRECT3DDEVICE9 g_pd3dDevice = NULL;
#pragma comment(lib, "gdi32.lib")
#pragma comment(lib, "User32.lib")


int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
                   LPSTR lpCmdLine, int nCmdShow);
LRESULT CALLBACK WindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
void init(void);
void shutDown(void);
void render(void);

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrev, LPSTR lpCmdLine, int nCmdShow){
    WNDCLASSEX winClass;
    MSG        msg;
    memset(&msg,0,sizeof(msg));

    winClass.lpszClassName = L"MY_WINDOWS_CLASS";

    winClass.cbSize = sizeof(WNDCLASSEX);

    winClass.style = CS_HREDRAW | CS_VREDRAW;

    winClass.lpfnWndProc = WindowProc;

    winClass.hInstance = hInstance;

    //winClass.hIcon           = LoadIcon(hInstance, (LPCTSTR)IDI_DIRECTX_ICON);


    //winClass.hIconSm = LoadIcon(hInstance, (LPCTSTR)IDI_DIRECTX_ICON);


    winClass.hCursor = LoadCursor(NULL, IDC_ARROW);

    winClass.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);

    winClass.lpszMenuName = NULL;
    winClass.cbClsExtra = 0;

    winClass.cbWndExtra = 0;
    if( RegisterClassEx(&winClass) == 0 )
        return E_FAIL;

    g_hWnd = CreateWindowEx( NULL, L"MY_WINDOWS_CLASS", 
                             L"Direct3D (DX9) - Full Screen",
                             WS_POPUP | WS_SYSMENU | WS_VISIBLE,
                             0, 0, 640, 480, NULL, NULL, hInstance, NULL );

    if( g_hWnd == NULL )
        return E_FAIL;

    ShowWindow( g_hWnd, nCmdShow );
    UpdateWindow( g_hWnd );

    init();

    while( msg.message != WM_QUIT )
    {
        if( PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
        { 
            TranslateMessage( &msg );
            DispatchMessage( &msg );
        }
        else
            render();
    }

    shutDown();

    UnregisterClass( L"MY_WINDOWS_CLASS", winClass.hInstance );

    return msg.wParam;
    }   

LRESULT CALLBACK WindowProc( HWND   hWnd, 
                             UINT   msg, 
                             WPARAM wParam, 
                             LPARAM lParam )
{
    switch( msg )
    {
        case WM_KEYDOWN:
        {
            switch( wParam )
            {
                case VK_ESCAPE:
                    PostQuitMessage(0);
                    break;
            }
        }
        break;

        case WM_CLOSE:
        {
            PostQuitMessage(0);
        }
        
        case WM_DESTROY:
        {
            PostQuitMessage(0);
        }
        break;

        default:
        {
            return DefWindowProc( hWnd, msg, wParam, lParam );
        }
        break;
    }

    return 0;
}


void init( void )
{
    g_pD3D = Direct3DCreate9( D3D_SDK_VERSION );

    if( g_pD3D == NULL )
    {

        return;
    }

    int nMode = 0;
    D3DDISPLAYMODE d3ddm;
    bool bDesiredAdapterModeFound = false;

    int nMaxAdapterModes = g_pD3D->GetAdapterModeCount( D3DADAPTER_DEFAULT, 
                                                        D3DFMT_X8R8G8B8 );

    for( nMode = 0; nMode < nMaxAdapterModes; ++nMode )
    {
        if( FAILED( g_pD3D->EnumAdapterModes( D3DADAPTER_DEFAULT, 
                                              D3DFMT_X8R8G8B8, nMode, &d3ddm ) ) )
        {
            return;
        }

        if( d3ddm.Width != 640 || d3ddm.Height != 480 )
            continue;

        if( d3ddm.Format != D3DFMT_X8R8G8B8 )
            continue;

        if( d3ddm.RefreshRate != 75 )
            continue;

        bDesiredAdapterModeFound = true;
        break;
    }

    if( bDesiredAdapterModeFound == false )
    {
        return;
    }

    if( FAILED( g_pD3D->CheckDeviceType( D3DADAPTER_DEFAULT,
                                         D3DDEVTYPE_HAL,
                                         D3DFMT_X8R8G8B8,
                                         D3DFMT_X8R8G8B8,
                                         FALSE ) ) )
    {
        return;
    }

    if( FAILED( g_pD3D->CheckDeviceFormat( D3DADAPTER_DEFAULT,
                                           D3DDEVTYPE_HAL,
                                           D3DFMT_X8R8G8B8,
                                           D3DUSAGE_DEPTHSTENCIL,
                                           D3DRTYPE_SURFACE,
                                           D3DFMT_D16 ) ) )
    {
        return;
    }


    D3DCAPS9 d3dCaps;

    if( FAILED( g_pD3D->GetDeviceCaps( D3DADAPTER_DEFAULT,
                                       D3DDEVTYPE_HAL, &d3dCaps ) ) )
    {
        return;
    }

    DWORD flags = 0;

    if( d3dCaps.VertexProcessingCaps != 0 )
        flags = D3DCREATE_HARDWARE_VERTEXPROCESSING;
    else
        flags = D3DCREATE_SOFTWARE_VERTEXPROCESSING;


    D3DPRESENT_PARAMETERS d3dpp;
    memset(&d3dpp, 0, sizeof(d3dpp));
    
    d3dpp.Windowed               = FALSE;
    d3dpp.EnableAutoDepthStencil = TRUE;
    d3dpp.AutoDepthStencilFormat = D3DFMT_D16;
    d3dpp.SwapEffect             = D3DSWAPEFFECT_DISCARD;
    d3dpp.BackBufferWidth        = 640;
    d3dpp.BackBufferHeight       = 480;
    d3dpp.BackBufferFormat       = D3DFMT_X8R8G8B8;
    d3dpp.PresentationInterval   = D3DPRESENT_INTERVAL_IMMEDIATE;

    if( FAILED( g_pD3D->CreateDevice( D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL, g_hWnd,
                                      flags, &d3dpp, &g_pd3dDevice ) ) )
    {
        return;
    }
}

void shutDown( void )
{
    if( g_pd3dDevice != NULL )
        g_pd3dDevice->Release();

    if( g_pD3D != NULL )
        g_pD3D->Release();
}

void render( void )
{
    g_pd3dDevice->Clear( 0, NULL, D3DCLEAR_TARGET,
                         D3DCOLOR_COLORVALUE(0.0f,1.0f,0.0f,1.0f), 1.0f, 0 );

    g_pd3dDevice->BeginScene();

    g_pd3dDevice->EndScene();

    g_pd3dDevice->Present( NULL, NULL, NULL, NULL );
}


dieser führt jediglich noch zu folgender warnung:
1>e:\projekte\createwindow\createwindow\winmain().cpp(75) : warning C4244: 'return': Konvertierung von 'WPARAM' in 'int', möglicher Datenverlust
was sich auf folgende Zeile bezieht: return msg.wParam;

hoffe ich verlang nicht zu viel von euch, sich den gesamten Code durch zulesen, aber ich weiß net woran das liegen kann.

Danke im voraus

MSG

Werbeanzeige