Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
// Main.h
HWND CreateMainWindow(HINSTANCE);
HWND CreateMainWindow(HINSTANCE hinst)
{
WNDCLASSEX wndClass;
wndClass.cbSize=sizeof(WNDCLASSEX); //Größe angeben
wndClass.style =CS_DBLCLKS | CS_OWNDC| CS_HREDRAW |
CS_VREDRAW;
wndClass.lpfnWndProc=wndprocMain;
wndClass.cbClsExtra=0;
wndClass.cbWndExtra=0;
wndClass.hInstance=hinst;
wndClass.hbrBackground=(HBRUSH)
GetStockObject(WHITE_BRUSH);
wndClass.hCursor=LoadCursor(NULL, IDC_ARROW);
wndClass.lpszMenuName=NULL;
wndClass.lpszClassName="WindowClass";
wndClass.hIcon=LoadIcon(NULL, IDI_WINLOGO);
wndClass.hIconSm=LoadIcon(NULL, IDI_WINLOGO);
if(!RegisterClassEx(&wndClass))
return(FALSE);
return(CreateWindowEx(NULL,"WindowClass","Fenter",
WS_OVERLAPPEDWINDOW | WS_VISIBLE,0,0,400,300,
NULL, NULL,hinst,NULL));
}
// Main.cpp
#include <windows.h>
// any other headers...
#include "main.h"
// Prototype here:
LRESULT CALLBACK wndprocMain(HWND, UINT, WPARAM, LPARAM);
// Main Program entry:
int WINAPI WinMain(HINSTANCE hinstNew, HINSTANCE hinstOld,
LPSTR cmd, int show)
{
MSG msg;
HWND hwndMain
if(!(hwndMain=CreateMainWindow(hinstNew)))
return(FALSE);
while(GetMessage(&msg, 0, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return(TRUE)
}
// Main window procedure:
LRESULT CALLBACK wndprocMain(HWND hwnd, UINT msg,
WPARAM wparam, LPARAM lparam)
{
return(DefWindowProc(hwnd, msg, wparam,lparam));
}