registerclass

Calling RegisterClass from C#?

I am trying to create a window (not a WinForm) using CreateWindowEx and RegisterClass. I have figured out how to use CreateWindowEx, but I am stuck on a few things with RegisterClass. In the WNDCLASS struct, how do I set these: WNDPROC lpfnWndProc It is a handle to the WndProc method that I want to have in C#. HINSTANCE hInstance What ...

How to access window class extra memory without a window handle?

I need to register a window class, and right after that set some data in it's extra memory section (the one cbClsExtra refers to) before any window of the class is being created. The problem is that SetClassLong expects a HWND in order to identify the class, instead of the class's name or atom. What's the way to acheive this? ...

RegisterClass fails with Error Code 2

I am creating a splash for a program that I'm making but RegisterClass keeps on failing (2: The system cannot find the file specified.) My code is this: WNDCLASS wc = {0}; wc.lpfnWndProc = DefWindowProc; wc.hInstance = g_hinstance; wc.hCursor = LoadCursor(NULL, IDC_ARROW); if (wc.hCursor == NULL) { #ifdef DEBUG log_debug("ShowSplas...