another type fix for Visual Studio, QUIT_BUTTON_ID
This commit is contained in:
parent
77d1104880
commit
b4dc54b3e3
|
|
@ -1,3 +1,7 @@
|
|||
2011-08-05 Robert Larice
|
||||
* src/winmain.c :
|
||||
another type fix for Visual Studio, QUIT_BUTTON_ID
|
||||
|
||||
2011-08-05 Robert Larice
|
||||
* src/spicelib/devices/dev.c :
|
||||
fix broken commit `type fix for Visual Studio'
|
||||
|
|
|
|||
|
|
@ -47,6 +47,8 @@
|
|||
/* macro to ignore unused variables and parameters */
|
||||
#define NG_IGNORE(x) (void)x
|
||||
|
||||
#define QUIT_BUTTON_ID 2
|
||||
|
||||
/* Types */
|
||||
typedef char SBufLine[SBufSize+1]; // Eingabezeile
|
||||
|
||||
|
|
@ -443,7 +445,7 @@ static LRESULT CALLBACK MainWindowProc( HWND hwnd, UINT uMsg, WPARAM wParam, LPA
|
|||
if (HIWORD(wParam) == BN_CLICKED)
|
||||
if (ft_batchmode && (MessageBox(NULL, "Do you want to quit ngspice?", "Quit", MB_OKCANCEL|MB_ICONERROR)
|
||||
== IDCANCEL)) goto DEFAULT_AFTER;
|
||||
if (LOWORD(wParam) == 2) {
|
||||
if (LOWORD(wParam) == QUIT_BUTTON_ID) {
|
||||
SendMessage(GetParent((HWND)lParam), WM_CLOSE, 0, 0);
|
||||
}
|
||||
/* write all achieved so far to log file */
|
||||
|
|
@ -908,7 +910,7 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdLi
|
|||
/* Create "Quit" button */
|
||||
hwQuitButton = CreateWindow("BUTTON", "Quit", WS_CHILD |
|
||||
BS_PUSHBUTTON, 0, 0, QuitButtonLength,
|
||||
StatusElHeight, hwMain, (HMENU) 2, hInst, NULL);
|
||||
StatusElHeight, hwMain, (HMENU)(UINT_PTR)QUIT_BUTTON_ID, hInst, NULL);
|
||||
|
||||
if (!hwQuitButton) goto THE_END;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue