014
17.11.2005, 14:28 Uhr
~derfragemaster
Gast
|
[Linker Fehler] Unresolved external '_main' referenced from EPROGRAMME\BORLAND\CBUILDER6\LIB\C0X32.OBJ
C++: |
//---------------------------------------------------------------------------
#include <windows.h> const char szAppName[] = "Ein eigenes Fenster"; 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 = CreateWindow(szAppName, "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); ShowWindow(hWnd, iCmdShow); UpdateWindow(hWnd); while (GetMessage(&msg, NULL, 0, 0)) { TranslateMessage(&msg); DispatchMessage(&msg); } return msg.wParam; } LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_DESTROY: { PostQuitMessage(0); return 0; }} return DefWindowProc(hWnd, message, wParam, lParam); }
|
|