M
Tempestas schrieb:
Also ich habe das ausgewählt wegen dem C++. Allerdings habe ich keine Ahnung was das MFC heißt.
Hier ist ein Ausschnitt aus dem Code, da alle Elemente zu viel wären:
hWndH = CreateWindow("Nichtmetall", "", WS_CHILD | WS_VISIBLE | WS_BORDER, 20, 20, 40, 40, hWnd, (HMENU) ID_H, hInstNichtmetall, NULL);
1. Das richtige Forum wäre hier WinAPI
2. Anmerkungen:
Du hast eigene Klassen wie "Nichtmetall" registriert ?
Üblich bei StandardButton wäre z.B. in WM_CREATE sowas:
CreateWindow(TEXT("button"), TEST("egal"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
20, 20, 40, 40, hWnd, (HMENU) ID_H, ((LPCREATESTRUCT)lParam)->hInstance, NULL);
Für nicht StandardControls könnte der BS_OWNERDRAW und/oder BS_NOTIFY style notwendig werden.
Button Messages
http://msdn.microsoft.com/en-us/library/windows/desktop/bb775941.aspx
The WM_CTLCOLORBTN message is sent to the parent window of a button before drawing the button.
The parent window can change the button's text and background colors. However, only owner-drawn
buttons respond to the parent window processing this message.
http://msdn.microsoft.com/en-us/library/bb775501.aspx