delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2000/10/25/04:57:59

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Message-ID: <89B0CF7B746AD211954A0008C75D90E303B377B8@gzs-mail-2.gzs.de>
From: =?iso-8859-1?Q?=22Quo=DF=2C_Clemens=22?= <clemens DOT quoss AT gzs DOT de>
To: "'cygwin AT sources DOT redhat DOT com'" <cygwin AT sources DOT redhat DOT com>
Subject: newbie question: hellowin on Windows NT
Date: Wed, 25 Oct 2000 10:51:38 +0200
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2448.0)

------_=_NextPart_000_01C03E60.CB8233F0
Content-Type: text/plain;
	charset="iso-8859-1"

Hello,

I'm rather new to writing programs with Cygnus, so
I decided to start with the hellowin example 
from C. Petzolds book 'Programming Windows'.

After some amendments to the source it 
compiled cleanly. Having compiled with '-mwindows'
I have no problems to start it from the cygwin 
bash command line. The windows starts nicely.

But compiling with '-mwindows -mno-cygwin' and
starting hellowin.exe directly from Windows NT explorer,
brings no result. There is a background task in the 
task manager named 'hellowin.exe', but no window
is shown.

In Windows 98, it works. So it seems to be a problem
with the Windows NT version and cygwin.

I included the source 'hellowin.c' and the output of
'cygcheck -s -r -v hellowin.exe' after having compiled
with '-mno-cygwin' option.

Your help is very much appreciated.

TIA

Clemens Quoss

 <<hellowin.c>>  <<tocygwin.txt>> 


------_=_NextPart_000_01C03E60.CB8233F0
Content-Type: application/octet-stream;
	name="hellowin.c"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="hellowin.c"

/* -----------------------------------------------------------------=0A=
   HELLOWIN.C -- Gibt "Hello, Windows!" in einem eigenen Fenster aus=0A=
                 (c) Charles Petzold, 1992=0A=
   ----------------------------------------------------------------- =
*/=0A=
=0A=
#include <windows.h>=0A=
=0A=
long FAR PASCAL _export WndProc (HWND, UINT, UINT, LONG) ;=0A=
=0A=
/* added following code snippet to avoid warning when linking under=0A=
   cygwin */=0A=
=0A=
#ifdef __CYGWIN__=0A=
WinMainCRTStartup() { mainCRTStartup(); }=0A=
#endif=0A=
=0A=
/* changed PASCAL to APIENTRY and HANDLE to HINSTANCE to get clean=0A=
   compile under cygwin =0A=
=0A=
int PASCAL WinMain (HANDLE hInstance, HANDLE hPrevInstance,=0A=
		LPSTR lpszCmdParam, int nCmdShow)=0A=
=0A=
*/=0A=
=0A=
int APIENTRY WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,=0A=
		LPSTR lpszCmdParam, int nCmdShow)=0A=
=0A=
	{=0A=
	static char szAppName[] =3D "HelloWin" ;=0A=
	HWND        hwnd ;=0A=
        MSG         msg ;=0A=
        WNDCLASS    wndclass ;=0A=
=0A=
	if (!hPrevInstance)=0A=
	   { wndclass.style         =3D CS_HREDRAW | CS_VREDRAW ;=0A=
             wndclass.lpfnWndProc   =3D WndProc ;=0A=
             wndclass.cbClsExtra    =3D 0 ;=0A=
             wndclass.hInstance     =3D hInstance ;=0A=
             wndclass.hIcon         =3D LoadIcon (NULL, =
IDI_APPLICATION) ;=0A=
             wndclass.hCursor       =3D LoadCursor ( NULL, IDC_ARROW) =
;=0A=
             wndclass.hbrBackground =3D GetStockObject (WHITE_BRUSH) =
;=0A=
             wndclass.lpszMenuName  =3D NULL ;=0A=
             wndclass.lpszClassName =3D szAppName ;=0A=
             RegisterClass (&wndclass) ;=0A=
             }=0A=
=0A=
	hwnd =3D CreateWindow (szAppName,           // Fensterklassenname=0A=
                       "Das erste Programm",      // Titelleiste=0A=
                       WS_OVERLAPPEDWINDOW,       // Fensterstil=0A=
                       CW_USEDEFAULT,             // Fensterposition, =
x=0A=
                       CW_USEDEFAULT,             // Fensterposition, =
y=0A=
                       CW_USEDEFAULT,             // horizontale =
Gr=F6=DFe=0A=
                       CW_USEDEFAULT,             // vertikale =
Gr=F6=DFe=0A=
                       NULL,                      // Handle =
Parent-Window=0A=
                       NULL,                      // Handle Men=FC=0A=
                       hInstance,                 // Handle =
Programmkopie=0A=
                       NULL) ;                    // =
Spezialparameter=0A=
=0A=
	ShowWindow (hwnd, nCmdShow) ;=0A=
	UpdateWindow (hwnd) ;=0A=
=0A=
	while (GetMessage (&msg, NULL, 0, 0))=0A=
		{=0A=
		TranslateMessage (&msg) ;=0A=
		DispatchMessage (&msg) ;=0A=
		}=0A=
	return msg.wParam ;=0A=
	}=0A=
=0A=
long FAR PASCAL _export WndProc (HWND hwnd, UINT message, =0A=
			UINT wParam, LONG lParam)=0A=
	{=0A=
	HDC		hdc ;=0A=
	PAINTSTRUCT	ps ;=0A=
	RECT		rect ;=0A=
=0A=
	switch (message) =0A=
		{ case WM_PAINT :=0A=
			hdc =3D BeginPaint (hwnd, &ps) ;=0A=
			GetClientRect (hwnd, &rect) ;=0A=
			DrawText (hdc, "Hello, Windows!", -1, &rect,=0A=
				DT_SINGLELINE | DT_CENTER | DT_VCENTER) ;=0A=
			EndPaint (hwnd, &ps) ;=0A=
			return 0 ;=0A=
		  case WM_DESTROY :=0A=
			PostQuitMessage (0) ;=0A=
			return 0 ;=0A=
		}=0A=
	return DefWindowProc (hwnd, message, wParam, lParam) ;=0A=
	}=0A=
=0A=

------_=_NextPart_000_01C03E60.CB8233F0
Content-Type: text/plain;
	name="tocygwin.txt"
Content-Transfer-Encoding: quoted-printable
Content-Disposition: attachment;
	filename="tocygwin.txt"

Found: .\hellowin.exe=0A=
.\hellowin.exe - os=3D4.0 img=3D1.0 sys=3D4.0=0A=
  C:\WINNT\System32\crtdll.dll - os=3D4.0 img=3D4.0 sys=3D4.0=0A=
    "CRTDLL.dll" v0.0 ts=3D1995/12/9 5:26=0A=
    C:\WINNT\System32\KERNEL32.dll - os=3D4.0 img=3D4.0 sys=3D4.0=0A=
      "KERNEL32.dll" v0.0 ts=3D1998/10/13 9:38=0A=
      C:\WINNT\System32\ntdll.dll - os=3D4.0 img=3D4.0 sys=3D4.0=0A=
        "ntdll.dll" v0.0 ts=3D1998/10/8 20:30=0A=
  C:\WINNT\System32\GDI32.dll - os=3D4.0 img=3D4.0 sys=3D4.0=0A=
    "GDI32.dll" v0.0 ts=3D1998/9/23 6:27=0A=
    C:\WINNT\System32\ntdll.dll (already done)=0A=
    C:\WINNT\System32\KERNEL32.dll (already done)=0A=
    C:\WINNT\System32\USER32.dll - os=3D4.0 img=3D4.0 sys=3D4.0=0A=
      "USER32.dll" v0.0 ts=3D1998/10/13 9:39=0A=
      C:\WINNT\System32\ntdll.dll (already done)=0A=
      C:\WINNT\System32\KERNEL32.dll (already done)=0A=
      C:\WINNT\System32\GDI32.dll (recursive)=0A=
      C:\WINNT\System32\ADVAPI32.dll - os=3D4.0 img=3D4.0 sys=3D4.0=0A=
        "ADVAPI32.dll" v0.0 ts=3D1998/9/29 20:44=0A=
        C:\WINNT\System32\ntdll.dll (already done)=0A=
        C:\WINNT\System32\KERNEL32.dll (already done)=0A=
        C:\WINNT\System32\USER32.dll (recursive)=0A=
        C:\WINNT\System32\RPCRT4.dll - os=3D4.0 img=3D4.0 sys=3D4.0=0A=
          "RPCRT4.dll" v0.0 ts=3D1998/10/9 20:19=0A=
          C:\WINNT\System32\ntdll.dll (already done)=0A=
          C:\WINNT\System32\KERNEL32.dll (already done)=0A=
          C:\WINNT\System32\ADVAPI32.dll (recursive)=0A=
    C:\WINNT\System32\ADVAPI32.dll (already done)=0A=
  C:\WINNT\System32\KERNEL32.dll (already done)=0A=
  C:\WINNT\System32\USER32.dll (already done)=0A=
=0A=
=0A=
Cygnus Win95/NT Configuration Diagnostics=0A=
Current System Time: Wed Oct 25 08:33:21 2000=0A=
=0A=
WinNT Ver 4.0 build 1381 Service Pack 4=0A=
=0A=
Path:	/usr/local/bin=0A=
	/usr/bin=0A=
	/usr/bin=0A=
	/cygdrive/c/WINNT/system32=0A=
	/cygdrive/c/WINNT=0A=
	/cygdrive/c/BIN/ZNW/Office=0A=
	/cygdrive/c/Programme/SNA/system=0A=
	.=0A=
	/cygdrive/c/DESIGN71=0A=
	/cygdrive/t/AE/ADVANTAG/OTHER/DJGPP/BIN=0A=
	/cygdrive/g/TOOLS=0A=
	/cygdrive/g/READIBMW=0A=
	/usr/bin=0A=
	.=0A=
=0A=
SysDir: C:\WINNT\System32=0A=
WinDir: C:\WINNT=0A=
=0A=
HOME =3D `/HOME/CLEMENS'=0A=
MAKE_MODE =3D `unix'=0A=
PWD =3D `/HOME/CLEMENS/src/hellowin'=0A=
USER =3D `clemens'=0A=
=0A=
!C: =3D `C:\cygwin\bin'=0A=
COMPUTERNAME =3D `WS_51042'=0A=
COMSPEC =3D `C:\WINNT\system32\cmd.exe'=0A=
DJGPP =3D `T:/AE/ADVANTAG/OTHER/DJGPP/DJGPP.ENV'=0A=
HOMEDRIVE =3D `C:'=0A=
HOMEPATH =3D `\'=0A=
HOSTNAME =3D `WS_51042'=0A=
HOSTTYPE =3D `i686'=0A=
INSTSERVER1 =3D `GZS-SW-1'=0A=
INSTSERVER2 =3D `GZS-SW-2'=0A=
LM_LICENSE_FILE =3D `C:\bin\gans\license.dat'=0A=
LOCATION =3D `Desk'=0A=
LOGONSERVER =3D `\\GZS-CNODE-1'=0A=
MACHTYPE =3D `i686-pc-cygwin'=0A=
ND_LANG =3D `enusasc'=0A=
NUMBER_OF_PROCESSORS =3D `1'=0A=
OLDPWD =3D `/HOME/CLEMENS/src'=0A=
OS2LIBPATH =3D `C:\WINNT\system32\os2\dll;'=0A=
OS =3D `Windows_NT'=0A=
OSTYPE =3D `cygwin'=0A=
PATHEXT =3D `.COM;.EXE;.BAT;.CMD'=0A=
PROCESSOR_ARCHITECTURE =3D `x86'=0A=
PROCESSOR_IDENTIFIER =3D `x86 Family 6 Model 5 Stepping 2, =
GenuineIntel'=0A=
PROCESSOR_LEVEL =3D `6'=0A=
PROCESSOR_REVISION =3D `0502'=0A=
PROMPT =3D `$P$G'=0A=
PS1 =3D `\[\033]0;\w\007=0A=
\033[32m\]\u@\h \[\033[33m\w\033[0m\]=0A=
$ '=0A=
RHIDEOPT =3D `-M'=0A=
RSX =3D `G:/RSX/BIN/RSX.EXE'=0A=
SHELL =3D `/bin/sh'=0A=
SHLVL =3D `1'=0A=
SNAROOT =3D `C:\Programme\SNA\system'=0A=
SYSTEMDRIVE =3D `C:'=0A=
SYSTEMROOT =3D `C:\WINNT'=0A=
TEMP =3D `/cygdrive/c/TEMP'=0A=
TERM =3D `cygwin'=0A=
USERDOMAIN =3D `GZS'=0A=
USERNAME =3D `i172cqu'=0A=
USERPROFILE =3D `C:\WINNT\Profiles\i172cqu'=0A=
WINDIR =3D `C:\WINNT'=0A=
_ =3D `/usr/bin/cygcheck'=0A=
=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\mounts v2=0A=
  (default) =3D `/cygdrive'=0A=
  cygdrive flags =3D 0x00000020=0A=
HKEY_CURRENT_USER\Software\Cygnus Solutions\Cygwin\Program Options=0A=
=0A=
a:  fd           N/A    N/A                    =0A=
c:  hd  NTFS    4110Mb  33% CP CS UN PA FC     SYSTEM=0A=
f:  net NTFS   52062Mb  56% CP CS UN PA FC     DATEN5=0A=
g:  net NTFS   208389Mb  75% CP CS UN PA FC     Daten1=0A=
j:  net CDFS      64Mb  50%                    JUKEMAN=0A=
r:  net NTFS   104190Mb  65% CP CS UN PA FC     DATEN2=0A=
s:  net NTFS   121558Mb  59% CP CS UN PA FC     DATEN3=0A=
t:  net NTFS   121558Mb  59% CP CS UN PA FC     DATEN3=0A=
v:  net NTFS    1458Mb  41% CP CS UN PA FC     WORK1=0A=
w:  net NTFS   52062Mb  56% CP CS UN PA FC     DATEN5=0A=
y:  net NTFS   208389Mb  75% CP CS UN PA FC     Daten1=0A=
=0A=
c:\cygwin\bin  /usr/bin  system  binmode=0A=
c:\cygwin\lib  /usr/lib  system  binmode=0A=
c:\cygwin  /        system  binmode=0A=
=0A=
Found: c:\cygwin\bin\bash.exe=0A=
Found: c:\cygwin\bin\cat.exe=0A=
Found: c:\cygwin\bin\cpp.exe=0A=
Found: c:\cygwin\bin\find.exe=0A=
Found: c:\cygwin\bin\gcc.exe=0A=
Found: t:\AE\ADVANTAG\OTHER\DJGPP\BIN\gcc.exe=0A=
Warning: c:\cygwin\bin\gcc.exe hides =
t:\AE\ADVANTAG\OTHER\DJGPP\BIN\gcc.exe=0A=
Found: c:\cygwin\bin\gdb.exe=0A=
Found: c:\cygwin\bin\ld.exe=0A=
Found: t:\AE\ADVANTAG\OTHER\DJGPP\BIN\ld.exe=0A=
Warning: c:\cygwin\bin\ld.exe hides =
t:\AE\ADVANTAG\OTHER\DJGPP\BIN\ld.exe=0A=
Found: c:\cygwin\bin\ls.exe=0A=
Found: c:\cygwin\bin\make.exe=0A=
Found: t:\AE\ADVANTAG\OTHER\DJGPP\BIN\make.exe=0A=
Warning: c:\cygwin\bin\make.exe hides =
t:\AE\ADVANTAG\OTHER\DJGPP\BIN\make.exe=0A=
Found: c:\cygwin\bin\sh.exe=0A=
=0A=
   83k 2000/06/11 c:\cygwin\bin\cygitcl30.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
                  "cygitcl30.dll" v0.0 ts=3D2000/6/11 3:34=0A=
   35k 2000/06/11 c:\cygwin\bin\cygitk30.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
                  "cygitk30.dll" v0.0 ts=3D2000/6/11 3:34=0A=
  402k 2000/06/11 c:\cygwin\bin\cygtcl80.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
                  "cygtcl80.dll" v0.0 ts=3D2000/6/11 3:30=0A=
    5k 2000/06/11 c:\cygwin\bin\cygtclpip80.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
   10k 2000/06/11 c:\cygwin\bin\cygtclreg80.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
                  "cygtclreg80.dll" v0.0 ts=3D2000/6/11 3:30=0A=
  639k 2000/06/11 c:\cygwin\bin\cygtk80.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
                  "cygtk80.dll" v0.0 ts=3D2000/6/11 3:34=0A=
  586k 2000/08/04 c:\cygwin\bin\cygwin1.dll - os=3D4.0 img=3D1.0 =
sys=3D4.0=0A=
                  "cygwin1.dll" v0.0 ts=3D2000/8/4 0:53=0A=
    Cygwin DLL version info:=0A=
        dll major: 1001=0A=
        dll minor: 4=0A=
        dll epoch: 19=0A=
        dll bad signal mask: 19005=0A=
        dll old termios: 5=0A=
        api major: 0=0A=
        api minor: 26=0A=
        shared data: 3=0A=
        dll identifier: cygwin1=0A=
        mount registry: 2=0A=
        cygnus registry name: Cygnus Solutions=0A=
        cygwin registry name: Cygwin=0A=
        program options name: Program Options=0A=
        cygwin mount registry name: mounts v2=0A=
        build date: Thu Aug 3 20:53:46 EDT 2000=0A=
        CVS tag: cygwin-1-1-4=0A=
        shared id: cygwin1S3=0A=
=0A=
Use -h to see help about each section=0A=


------_=_NextPart_000_01C03E60.CB8233F0
Content-Type: text/plain; charset=us-ascii

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
------_=_NextPart_000_01C03E60.CB8233F0--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019