1. RE: RE: Windows program error

Yes, it works.  I have Windows XP professional.
I e-mailed you the source code.

Derek Parnell wrote:
> Philip,
> you were trying to create a StatusBar control. I'm guessing you are 
> using an old version of Windows, maybe earlier than Win98 2nd Edition.
> 
> Does this program work...
> 
> ------------
> include win32lib.ew
> constant w = create(Window, "", 0, 0, 0, 300, 300, 0),
>          s = create(StatusBar, "", w, 0, 0, 0, 0, 0)
> WinMain(w, Normal)
> 
> ------------
> If not, you may need to move to a more modern version of Windows.
> 
> I'm not saying for certain this is the problem; I'm still probing...
> --------
> cheers,
> Derek
> 
> ----- Original Message -----
> From: "Philip D." <philip1987 at hotmail.com>
> Date: Tuesday, December 10, 2002 11:16 am
> Subject: RE: Windows program error
> 
>

new topic     » topic index » view message » categorize

2. RE: RE: Windows program error

Thanks for sending the code...

This:

onKeyDown[331,{}] = routine_id("onKeyDown_left")
onKeyDown[333,{}] = routine_id("onKeyDown_right")
onKeyDown[328,{}] = routine_id("onKeyDown_up")
onKeyDown[336,{}] = routine_id("onKeyDown_down")

is not a valid way to program.

replace them with this:

onKeyDown[snake_window] = routine_id("onKeyDown_snake_window")

and replace all of the old procedures with this:

procedure onKeyDown_snake_window(integer key, integer shift)
		if key = VK_LEFT then
		  kbc = 331
		elsif key = VK_RIGHT then
		  kbc = 333
		elsif key = VK_UP then
		  kbc = 328
		elsif key = VK_DOWN then
		  kbc = 336
		end if
end procedure

and it works a little better.

I also had to rename the function text() to txt(), because you already had a
variable called the same thing. Btw, have a look at the built-in function sprint.
It does the same thing as txt.

I also took the flag out of the status_bar and made it this:
	status_bar=create(StatusBar,status_text,snake_window,0,0,0,0,0)

and it removed all the hWnd problems, and replaced them with other run-time
problems. You haven't put more than a few chars of comments in the entire thing,
so it's a little difficult to debug, but at least they're your errors, not some
strange win32lib thing.





-----Original Message-----
From: Philip D. [mailto:philip1987 at hotmail.com]
Sent: Tuesday, 10 December 2002 12:18
To: EUforum
Subject: RE: RE: Windows program error



Yes, it works.  I have Windows XP professional.
I e-mailed you the source code.

Derek Parnell wrote:
> Philip,
> you were trying to create a StatusBar control. I'm guessing you are 
> using an old version of Windows, maybe earlier than Win98 2nd Edition.
> 
> Does this program work...
> 
> ------------
> include win32lib.ew
> constant w = create(Window, "", 0, 0, 0, 300, 300, 0),
>          s = create(StatusBar, "", w, 0, 0, 0, 0, 0)
> WinMain(w, Normal)
> 
> ------------
> If not, you may need to move to a more modern version of Windows.
> 
> I'm not saying for certain this is the problem; I'm still probing...
> --------
> cheers,
> Derek
> 
> ----- Original Message -----
> From: "Philip D." <philip1987 at hotmail.com>
> Date: Tuesday, December 10, 2002 11:16 am
> Subject: RE: Windows program error
> 
> 





***********************************************************************




***********************************************************************

new topic     » goto parent     » topic index » view message » categorize

3. RE: RE: Windows program error

The part of the code that made that error appear was this:

include Win32Lib.ew
constant Window1 = createEx( Window, "Window1", 0, Default, Default, 400, 300,
0, 0 )
constant status_bar=create(StatusBar,"test",Window1,0,0,0,0,{CCS_BOTTOM})
WinMain( Window1,Normal )

Is CCS_BOTTOM supposed to be a statusbar flag?

-----Original Message-----
From: Dan Moyer [mailto:DANIELMOYER at prodigy.net]
Subject: Re: RE: Windows program error



Even worked on an old, creaky, archaic, cobwebed non-modern Win98 1st ed  :)

Dan Moyer

----- Original Message ----- 
From: "Derek Parnell" <ddparnell at bigpond.com>
To: "EUforum" <EUforum at topica.com>
Sent: Monday, December 09, 2002 5:08 PM
Subject: Re: RE: Windows program error


> 
> Philip,
> you were trying to create a StatusBar control. I'm guessing you are 
> using an old version of Windows, maybe earlier than Win98 2nd Edition.
> 
> Does this program work...
> 
> ------------
> include win32lib.ew
> constant w = create(Window, "", 0, 0, 0, 300, 300, 0),
>          s = create(StatusBar, "", w, 0, 0, 0, 0, 0)
> WinMain(w, Normal)
> 
> ------------
> If not, you may need to move to a more modern version of Windows.
> 
> I'm not saying for certain this is the problem; I'm still probing...
> --------
> cheers,
> Derek
> 
> ----- Original Message -----
> From: "Philip D." <philip1987 at hotmail.com>
> Date: Tuesday, December 10, 2002 11:16 am
> Subject: RE: Windows program error
> 
> 





***********************************************************************




***********************************************************************

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu