| 551 | // then spins in a tight message processing loop until it terminates. |
| 552 | |
| 553 | int PASCAL WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, |
| 554 | LPSTR lpszCmdLine, int nCmdShow) |
| 555 | { |
| 556 | MSG msg; |
| 557 | WNDCLASS wndclass; |
| 558 | char ch; |
| 559 | #ifdef BETA |
| 560 | char sz[cchSzMax]; |
| 561 | #endif |
| 562 | |
| 563 | // Set up the window class shared by all instances of Astrolog. |
| 564 | |
| 565 | wi.hinst = hInstance; |
| 566 | if (!hPrevInstance) { |
| 567 | ClearB((pbyte)&wndclass, sizeof(WNDCLASS)); |
| 568 | wndclass.style = CS_HREDRAW | CS_VREDRAW | CS_BYTEALIGNWINDOW; |
| 569 | wndclass.lpfnWndProc = WndProc; |
| 570 | wndclass.cbClsExtra = 0; |
| 571 | wndclass.cbWndExtra = 0; |
| 572 | wndclass.hInstance = wi.hinst; |
| 573 | wndclass.hIcon = LoadIcon(wi.hinst, MAKEINTRESOURCE(icon)); |
| 574 | wndclass.hCursor = LoadCursor((HINSTANCE)NULL, IDC_ARROW); |
| 575 | wndclass.hbrBackground = (HBRUSH)(COLOR_WINDOW+1); |
| 576 | wndclass.lpszMenuName = MAKEINTRESOURCE(menu); |
| 577 | wndclass.lpszClassName = szAppName; |
| 578 | if (!RegisterClass(&wndclass)) { |
| 579 | PrintError("The window class could not be registered."); |
| 580 | return -1L; |
| 581 | } |
| 582 | } |
| 583 | |
| 584 | // Create the actual window to be used and drawn on by this instance. |
| 585 | |
| 586 | wi.hmenu = LoadMenu(wi.hinst, MAKEINTRESOURCE(menu)); |
| 587 | #ifndef PS |
| 588 | DeleteMenu(wi.hmenu, cmdSavePS, MF_BYCOMMAND); |
| 589 | DeleteMenu(wi.hmenu, cmdCopyPS, MF_BYCOMMAND); |
| 590 | #endif |
| 591 | #ifndef META |
| 592 | DeleteMenu(wi.hmenu, cmdSavePicture, MF_BYCOMMAND); |
| 593 | DeleteMenu(wi.hmenu, cmdCopyPicture, MF_BYCOMMAND); |
| 594 | #endif |
| 595 | #ifndef SVG |
| 596 | DeleteMenu(wi.hmenu, cmdSaveSVG, MF_BYCOMMAND); |
| 597 | DeleteMenu(wi.hmenu, cmdCopySVG, MF_BYCOMMAND); |
| 598 | #endif |
| 599 | #ifndef WIRE |
| 600 | DeleteMenu(wi.hmenu, cmdSaveWire, MF_BYCOMMAND); |
| 601 | DeleteMenu(wi.hmenu, cmdCopyWire, MF_BYCOMMAND); |
| 602 | #endif |
| 603 | #ifndef INTERPRET |
| 604 | DeleteMenu(wi.hmenu, cmdInterpret, MF_BYCOMMAND); |
| 605 | DeleteMenu(wi.hmenu, cmdHelpMeaning, MF_BYCOMMAND); |
| 606 | #endif |
| 607 | #ifndef ARABIC |
| 608 | DeleteMenu(wi.hmenu, cmdChartArabic, MF_BYCOMMAND); |
| 609 | #endif |
| 610 | #ifndef CONSTEL |
nothing calls this directly
no test coverage detected