November 08, 2024, 04:47:14 PM

News:

IWBasic runs in Windows 11!


2.0 Issues

Started by Rock Ridge Farm (Larry), March 12, 2011, 06:21:07 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sapero

I can't tell you, because I am uploading files to Larry, and Larry builds the setup and uploads it to ionicwind server.

Repaint problem in the IDE has been solved, Larry will upload a new setup today.

Rock Ridge Farm (Larry)

Re-compiled and uploaded.

Larry

ckoehn

I encounter this error on compiling this program.

$include "windowssdk.inc"

window w1
OPENWINDOW w1,0,0,640,480,@MINBOX|@MAXBOX|@SIZE,0,"Test Window",&main

Gradient(w1,0,0,0,255,0,0)

WAITUNTIL w1=0
END

SUB main
SELECT @MESSAGE
CASE @IDCREATE
CENTERWINDOW w1

CASE @IDCLOSEWINDOW
CLOSEWINDOW w1

CASE @IDSIZE
Gradient(w1,0,0,0,255,0,0)

ENDSELECT

return 0

ENDSUB

SUB Gradient (window mWin, int sRed, int sGreen, int sBlue, int eRed, int eGreen, int eBlue)
int l,t,w,h
float dRed,dGreen,dBlue,cRed,cGreen,cBlue

GETCLIENTSIZE mWin,l,t,w,h

SETWINDOWCOLOR mWin,rgb(sRed,sGreen,sBlue)

dRed=eRed-sRed
dGreen=eGreen-sGreen
dBlue=eBlue-sBlue

FOR i=0 to h
cRed=sRed+(dRed*i/h)
cGreen=sGreen+(dGreen*i/h)
cBlue=sBlue+(dBlue*i/h)

'RECT mWin,0,i,w,i+5,rgb(cRed,cGreen,cBlue),rgb(cRed,cGreen,cBlue)
'LINE mWin,0,i,w,i,rgb(cRed,cGreen,cBlue)',rgb(cRed,cGreen,cBlue)
ELLIPSE mWin,i/2,i/2,w-i,h-i,rgb(cRed,cGreen,cBlue),rgb(cRed,cGreen,cBlue)
NEXT i
ENDSUB



LarryMc

I compiled the program without any issue at all.

Have you downloaded and installed the latest version of IWB2?

Have you downloaded and installed the latest version of Sapero's Include files?

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Hi, Chaps,

Looking good so far. Compiled three of my programs with no problems
Can double-click a source or project file, and it opens into the IDE
Scrollbars looking OK, as well. Testing further...

Brian

sapero

Ckoehn, you have enabled Do not generate vftable in classes compiler option

If you still need it active, move the CIWBasicBaseUnknownClass class below the second option:
$option "novtable push"
$option "novtable off"
' here: class CIWBasicBaseUnknownClass ... endclass
$option "novtable pop"

ckoehn

Thanks sapero.  That was the problem.

Later,
Clint

talun

Hi,
While I was writing some simple wrappers for GDI+ functions, I noticed that if you enable the option to optimized builds, the GDI+ initialization fails; compiled without optimization everything seems to work fine.
Below I've attached a simple example of code that reproduces the problem, just try to compile with or without optimization enabled.
Please note that I am using the latest version of the include file (April 11, 2011)


$include "windowssdk.inc"
$include "gdiplus.inc"

UINT gdi_token
INT gdi_status
window win

OPENWINDOW win,0,0,800,600,@MINBOX|@MAXBOX|@SIZE,0,"Gdi+ Test",&main
WAITUNTIL win = 0

END


'------------------------------------------------------------------------------
sub main

select @message

CASE @IDCREATE
CENTERWINDOW win
gdi_status = Gdip_Init(gdi_token)
messagebox win, Gdip_Message(gdi_status),"GDI+ Report"
CASE @IDCLOSEWINDOW
Gdip_end(gdi_token)
closewindow win
end select

return 0

end sub


' -------------------------------------------------------------
sub Gdip_Init(UINT GDI_Token byref),int

   GdiPlusStartupInput GDI_Start
   int gdi_ret

   GDI_Start.GdiplusVersion = 1
   
   gdi_ret  = GdiPlusStartup(&GDI_Token,&GDI_Start,NULL)

   return gdi_ret

end sub


'----------------------------------------------------------------
sub Gdip_End(uint gdi_tok)

GdiPlusShutdown(gdi_tok)

end sub

'----------------------------------------------------------
sub Gdip_Message(int StatusNum),string

select StatusNum
case  0 : return "Gdi+ initialization was successful"
case  1 : return "Generic Error"
case  2 : return "Invalid Parameter"
case  3 : return "Out Of Memory"
case  4 : return "Object Busy"
case  5 : return "Insufficient Buffer"
case  6 : return "Not Implemented"
case  7 : return "Win32 Error"
case  8 : return "Wrong State"
case  9 : return "Aborted"
case 10 : return "File Not Found"
case 11 : return "Value Overflow"
case 12 : return "Access Denied"
case 13 : return "Unknown Image Format"
case 14 : return "Font Family Not Found"
case 15 : return "Font Style Not Found"
case 16 : return "Not TrueType Font"
case 17 : return "Unsupported Gdiplus Version"
case 18 : return "Gdiplus Not Initialized"
case 19 : return "Property Not Found"
case 20 : return "Property Not Supported"
end select

return ""

end sub





Any suggestions?

thanks

Sergio

sapero

Invalid forum ;D
You need to initialize all members of GdiplusStartupInput structure before calling GdiplusStartup:
sub Gdip_Init(UINT GDI_Token byref),int

   GdiplusStartupInput GDI_Start=0

Egil

April 15, 2011, 05:24:14 AM #159 Last Edit: April 15, 2011, 05:26:14 AM by Egil
Quote from: Brian Pugh on April 14, 2011, 12:12:35 PM
Can double-click a source or project file, and it opens into the IDE

That still does not work here.
But after new download and reinstall last night, code ( made with v1.8 ) now compiles whithout error messages.

I should like to know how other users with non-english Win7 systems get along, and why does the double-click a file open the file in IDE work with EB v.1.783, and not with IWB1.8 and IWB2.0 ? ? ?
Support Amateur Radio  -  Have a ham  for dinner!

talun

April 15, 2011, 05:27:12 AM #160 Last Edit: April 15, 2011, 05:29:03 AM by talun
QuoteYou need to initialize all members of GdiplusStartupInput structure before calling GdiplusStartup:
Better that way.   :D
At least I learned that I can initialize a UDT in a single step ::).

Thank you very much

Sergio

LarryMc

Quote from: Egil on April 15, 2011, 05:24:14 AM
Quote from: Brian Pugh on April 14, 2011, 12:12:35 PM
Can double-click a source or project file, and it opens into the IDE
....why does the double-click a file open the file in IDE work with EB v.1.783, and not with IWB1.8 and IWB2.0 ? ? ?
EB v1.737 was the last version created by the previous owner.
IWBv1.8 and above were created from what LarryS was given to work with.
Some things had to be re-created because they weren't there.

Your problem can be resolved.  It could possibly have already been resolved if so much time had not been spent on the "hacker" who has been intent upon causing IW as much grief as possible.

Here's what I would try (if you haven't already done so).
1.Uninstall any and all copies of IWB2.0 on your computer.
2.Run install as admin
3.Install in a new empty folder.
4. When prompted to register file extentensions, do so. If not promptedthen select Tools/Register extensions when the IDE opens.
5. Close IDE
6. Dbl-clk iwb file and see if it opens
7. If it doesn't, open IDE and then dbl-clk iwb file to see if it will open file.

Let us know what happens (with as much detail as possible).

Thanks

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Egil

Thanks Larry,
Works just fine now! Had done everything you listed before, except for uninstalling the program before new install. (I was told weeks ago by LarryS NOT to uninstall before installing an updated version) :-\
When I first clicked on a source file to see if it opened, it was impossible  to get Windows7 to accept that iwbdev.exe should open the file. But when I checked ddehelper.exe instead, my source files now open in the IDE.

Thanks again!
Support Amateur Radio  -  Have a ham  for dinner!

LarryMc

Quote from: Egil on April 15, 2011, 08:01:24 AM
(I was told weeks ago by LarryS NOT to uninstall before installing an updated version) :-\
And normally you shouldn't have to uninstall but the area where we were having problems could only be reset by uninstalling in this case.

Glad you're over the hump.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

billhsln

It seems that the assembler does not like file names with a single quote in it.

My Errors:

Compiling...
Evan's DVD Cataloger.iwb
File: C:\Users\Public\Documents\IWBasic\MyProgs\Bill's DVD Cataloger.a (415) warning: unterminated string
File: C:\Users\Public\Documents\IWBasic\MyProgs\Bill's DVD Cataloger.iwb (103) warning: unterminated string
No Errors

Linking...
IWBasicLinker v1.12 Copyright © 2009,2010 Ionic Wind Software
Generating C:\Users\Public\Documents\IWBasic\MyProgs\Bill's DVD Cataloger.exe
Build completed

It still compiles, just complains.

Thanks,
Bill
When all else fails, get a bigger hammer.

AdrianFox

Doesn't using a single quote make it think the rest of the line is a comment?
Adrian Fox

billhsln

A single quote in IWB does make it a comment, but it seems in the Assembly code, it complains about it.

Here is the code that it is complaining about:

call PopHeap
%line 89 C:\Users\Public\Documents\IWBasic\MyProgs\Bill's DVD Cataloger.iwb
jmp $Aborted
L00003:
mov eax, $dcnt
mov dword[eax], 0
mov eax,STR00011
push eax ; delete=0
mov eax, $DVD_Path
push eax ; delete=0
call $GetFilesFL
mov eax, $Ofile
push 65542
push eax
call $CLOSEFILE
%line 98 C:\Users\Public\Documents\IWBasic\MyProgs\Bill's DVD Cataloger.iwb
jmp $Final
$Aborted:


Bill
When all else fails, get a bigger hammer.

sapero

April 17, 2011, 05:28:15 PM #167 Last Edit: April 20, 2011, 12:58:51 PM by sapero
Fixed, all paths passed to %line macro will be quoted. That was the second problematic character: ~'

obelisk

I just re-installed the latest version of the setup file and I get a virus warning.

LarryMc

Quote from: obelisk on April 25, 2011, 07:30:43 AM
I just re-installed the latest version of the setup file and I get a virus warning.

After reading your post I redownloaded and installed( with the exact same install zip file) and had no problem.
I use AVG for my antivirus checker.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Oh no! Following this thread, I thought I would do the same as Larry,
and downloaded the latest installation. Now I can't compile my latest program.
Stops with:

Linking...
IWBasicLinker v1.12 Copyright © 2009,2010 Ionic Wind Software
Unresolved external _sprintf
Error: Unresolved extern _sprintf
Error(s) in linking Telegrapher.exe

I thought this was a problem with USING, which I am NOT using in my program

Any ideas?

Brian

PS: I can always go back to the previous installation

Brian

OK, re-installed my previously saved IWB2 version, and I am using Sapero's headers
from April 10, and everything is now compiling OK

Are there any later headers that I need to use to solve my _sprintf problem?

Brian

sapero

Brian, I've just checked the /libs directory, and could not find any reference to "_sprintf" symbol.
Your code, or an additional library must use it.

If you have a tool able to search in binary files (like totalcmd), try to find "_sprintf" using case sensitive and whole word settings. Search in /libs and project directory.

If you don't want to search, copy crtdll.lib from the "working" installation to the current, but save it (in /libs folder) as _crtdll.lib (or whatever you like), and then $USE it in your project.

Brian

Downloaded Total Commander, and searched in my working installation
and project directory - not found

The only includes I'm using is Fletchie's ctl.inc and commctrl.inc, as well as
your windows.sdk inc

Now going to try the same with the latest installer - will let you know

Brian

Brian

Sapero,

OK, reinstalled the latest update, and it found _sprintf in
c:\program files\iwbdev\libs\iwbstd.lib

I will go back to the previous install until we're fixed!

Brian