Pessoal, tenho um código de uma janela em C, eu queria um código orientado a objetos em C++ mas não encontro em lugar nenhum. Alguém pode ajudar?
#include <windows.h>
#include <stdlib.h>
LRESULT CALLBACK WindowProcedure(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain(HINSTANCE hThisInstance, HINSTANCE hPrevInstance, LPSTR lpszArgument, int nFunsterStil){
HWND hwnd;
MSG messages;
WNDCLASSEX wincl;
wincl.hInstance = hThisInstance;
wincl.lpszClassName = "WindowsAppl";
wincl.lpfnWndProc = WindowProcedure;
wincl.style = CS_DBLCLKS;
wincl.cbSize = sizeof (WNDCLASSEX);
wincl.hIcon = LoadIcon (NULL, IDI_APPLICATION);
wincl.hIconSm = LoadIcon (NULL, IDI_APPLICATION);
wincl.hCursor = LoadCursor (NULL, IDC_ARROW);
wincl.lpszMenuName = NULL;
wincl.cbClsExtra = 0;
wincl.cbWndExtra = 0;
wincl.hbrBackground = (HBRUSH) COLOR_BACKGROUND;
if(!RegisterClassEx (&wincl)){
return 0;
}
hwnd = CreateWindowEx(0, "WindowsAppl", "Hello World", WS_OVERLAPPEDWINDOW, 350, 250, 300, 300, HWND_DESKTOP, NULL, hThisInstance, NULL);
ShowWindow(hwnd, nFunsterStil);
while(GetMessage(&messages, NULL, 0, 0)){
TranslateMessage(&messages);
DispatchMessage(&messages);
}
return messages.wParam;
}
LRESULT CALLBACK WindowProcedure(HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam){
switch(message){
case WM_CREATE:
break;
case WM_COMMAND:
break;
case WM_DESTROY:
PostQuitMessage (0);
break;
default:
return DefWindowProc (hwnd, message, wParam, lParam);
}
return 0;
}
Obs: procurei muito mas parece que não existe interface gráfica em C++ na internet.