Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Empfohlene Antworten

Veröffentlicht

Hallo,

die Erstellung eines simplen Fensters klappt nicht ganz so wie ich mir das vorstelle.

Fehlermeldung ist

--

Kompilierung läuft...

Uebung2.c

Linker-Vorgang läuft...

Uebung2.obj : error LNK2001: Nichtaufgeloestes externes Symbol _WndProc@16

Debug/Gampp Uebeung2.exe : fatal error LNK1120: 1 unaufgeloeste externe Verweise

Fehler beim Ausführen von link.exe.

--



#define STRICT

#include <windows.h>


LRESULT CALLBACK WndProc (HWND, UINT, WPARAM, LPARAM);


HWND hMainWnd;

HINSTANCE hInstance;

MSG msg;

WNDCLASS wndclass;


int WINAPI WinMain (HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpszCmdLine, int nCmdShow)


{



	hInstance = hInst;


	wndclass.lpszClassName = "Grabo Uebung";

	wndclass.hInstance = hInst;

	wndclass.lpfnWndProc = WndProc;

	wndclass.style = CS_HREDRAW|CS_VREDRAW;

	wndclass.hIcon = LoadIcon (NULL, IDI_EXCLAMATION);

	wndclass.hCursor = LoadCursor (NULL, IDC_CROSS);

	wndclass.hbrBackground = (HBRUSH)GetStockObject (WHITE_BRUSH);

	wndclass.lpszMenuName = NULL;

	wndclass.cbClsExtra = 0;

	wndclass.cbWndExtra = 0;


	RegisterClass (&wndclass);


	hMainWnd = CreateWindow

	(

		"Grabo Uebung",

		"Meine Uebung",

		WS_OVERLAPPEDWINDOW,

		CW_USEDEFAULT, 0,

		CW_USEDEFAULT, 0,

		NULL,

		NULL,

		hInst,

		NULL);


	ShowWindow (hMainWnd, nCmdShow);




	while (GetMessage (&msg, NULL, 0, 0))

	{

		TranslateMessage (&msg);

		DispatchMessage (&msg);

	}


	return (int)msg.wParam;

}


Kann jemand helfen?

Danke!

Gruß,

DS

Du hast ein falsches Projekt erstellt. Du hast eine Konsolenanwendung ausgewählt die eine main() Funktion erwartet und die kann er nicht finden.

Was du willst ist eine normale Win32 Anwendung.

Ich habe ein Win32 Projekt erstellt, keine Win32 Konsolenanwendung.

Kaum macht mans richtig, schon funktionierts ;)

Vielen Dank für Deine Hilfe!!!

Erstelle ein Konto oder melde dich an, um einen Kommentar zu schreiben.

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.