static void windowsClose() { HINSTANCE inst; inst = websGetInst(); UnregisterClass(ME_NAME, inst); }
static void windowsClose() { HINSTANCE inst; inst = websGetInst(); UnregisterClass(BIT_PRODUCT, inst); }
/* Create a taskbar entry. Register the window class and create a window */ static int windowsInit() { HINSTANCE inst; WNDCLASS wc; /* Window class */ HMENU hSysMenu; HWND hwnd; inst = websGetInst(); wc.style = CS_HREDRAW | CS_VREDRAW; wc.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); wc.hCursor = LoadCursor(NULL, IDC_ARROW); wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = inst; wc.hIcon = NULL; wc.lpfnWndProc = (WNDPROC) websWindProc; wc.lpszMenuName = wc.lpszClassName = ME_NAME; if (! RegisterClass(&wc)) { return -1; } /* Create a window just so we can have a taskbar to close this web server */ hwnd = CreateWindow(ME_NAME, ME_TITLE, WS_MINIMIZE | WS_POPUPWINDOW, CW_USEDEFAULT, 0, 0, 0, NULL, NULL, inst, NULL); if (hwnd == NULL) { return -1; } /* Add the about box menu item to the system menu */ hSysMenu = GetSystemMenu(hwnd, FALSE); if (hSysMenu != NULL) { AppendMenu(hSysMenu, MF_SEPARATOR, 0, NULL); } ShowWindow(hwnd, SW_SHOWNORMAL); UpdateWindow(hwnd); return 0; }