Was müsste ich denn ändern, damit die Funktion Definiert ist?
Entschuldige bitte, aber ich bin noch anfänger.
EDIT:
Ah habs gefunden.
Ich muss also nur #define davor setzen.
aber danke
EDIT 2:
Oh jetzt kommt doch wieder ein Fehler:
QUELLCODE:
|
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
|
#define STRICT
#include <windows.h>
#include "stdafx.h"
#include <tchar.h>
const wchar_t szAppName[] = L"Ein eigenes Fenster";
const wchar_t szWinName[] = L"Titelleiste";
#define LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
HWND hWnd;
MSG msg;
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.lpfnWndProc = WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
wc.hIcon = LoadIcon(NULL,IDI_APPLICATION);
wc.hbrBackground = (HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszClassName = szAppName;
wc.lpszMenuName = NULL;
RegisterClass(&wc);
hWnd = CreateWindowW(szAppName,
L"Titelleiste",
WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, /* X-Position auf dem Monitor */
CW_USEDEFAULT, /* Y-Position auf dem Monitor */
CW_USEDEFAULT, /* Fensterbreite */
CW_USEDEFAULT, /* Fensterhoehe */
NULL,
NULL,
hInstance,
NULL);
return 0;
}
|
FEHLER:
Fehler 2 error C2065: 'WndProc': nichtdeklarierter Bezeichner c:\users\XXXX\desktop\programmierenlernen\erstesprojekt\erstesprojekt.cpp 17