Article View: alt.msdos.programmer
Article #1091Borland C/C++ blues
From: Lady of the BitMode
Date: Fri, 08 Jan 1993 05:58
Date: Fri, 08 Jan 1993 05:58
43 lines
1773 bytes
1773 bytes
Hello, a have a question about borland c++/c 3.1.
I running win3.1 under dos5.0. I own borland c/c++ 3.1.
WHen I compile and execute the following code the windows just vanishes
away before I can cause an event to happen to exit WaitMessage function
call. Also, the text part of the button on the window is blank.
Basically, the program is terminating before anythings happends and all the the defined window get is a captions and a outline of aa button.
Why ?, I copied this program out of a book. does anyone know why it won't run.
actual code followins.
*All code is small*
test.c:
=============================================================================
#include <windows.h>
int PASCAL WinMain( HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine,
int nCmdShow )
{
HWND hWnd;
hWnd= CreateWindow( "BUTTON", "PRESS ME", BS_PUSHBUTTON,
10, 10, 100, 100, NULL, NULL, hInstance, NULL ) ;
ShowWindow( hWnd, nCmdShow ) ;
WaitMessage();
return 0;
}
test.def
=============================================================================
EXETYPE WINDOWS
STUB 'WINSTUB.EXE'
CODE PRELOAD MOVEABLE
DATA PRELOAD MOVEABLE MULTIPLE
HEAPSIZE 1024
STACKSIZE 5120
test.prj
=============================================================================
test.c
test.def
Technical Details
Message-ID:
<1993Jan8.055812.26546@wariat.org>Path:
arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!usenet.ins.cwru.edu!wariat!ericaShow Full Headers
Complete Article Headers
Newsgroups: alt.msdos.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!spool.mu.edu!agate!usenet.ins.cwru.edu!wariat!erica From: erica@wariat.org (Lady of the BitMode) Subject: Borland C/C++ blues Message-ID: <1993Jan8.055812.26546@wariat.org> Organization: Akademia Pana Kleksa, Public Access Uni* Site Distribution: usa Date: Fri, 8 Jan 1993 05:58:12 GMT Lines: 43