Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-06 Thread Jonas Maebe


On 04 Jan 2006, at 23:46, Hans Mårtensson wrote:

When I compile this source code with FPC 1.0.10, it produces a  
program that makes a window with one menu item. When you click on  
it, a dialogue box pops up.


But when I compile the same source code with FPC 2.0.2, I still get  
a program that makes the window. But the dialogue box does not  
show, when you click the menu item.


I hope someone else can take it over from here, because I don't have  
Windows (or even a computer which can run Windows).



Jonas___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-06 Thread Hans Mårtensson

Jonas Maebe wrote:



On 04 Jan 2006, at 23:46, Hans Mårtensson wrote:

When I compile this source code with FPC 1.0.10, it produces a  
program that makes a window with one menu item. When you click on  
it, a dialogue box pops up.


But when I compile the same source code with FPC 2.0.2, I still get  
a program that makes the window. But the dialogue box does not  show, 
when you click the menu item.



I hope someone else can take it over from here, because I don't have  
Windows (or even a computer which can run Windows).




OK, thank you for your help so far.
I will try to do further experiments in order to locate the problem.
I think it must be in the data structure that defines the dialog box, 
which the two compiler versions generate differently.


I appreciate very much the work done by the people behind FPC.
Not only because it is free and advanced, but also because Pascal is 
nicer than any other programming language I have seen, in my opinion


Hans Mårtensson

___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-06 Thread Jonas Maebe


On 06 Jan 2006, at 15:37, Hans Mårtensson wrote:


OK, thank you for your help so far.
I will try to do further experiments in order to locate the problem.
I think it must be in the data structure that defines the dialog  
box, which the two compiler versions generate differently.


You can try writing the size of the structure using sizeof(), and the  
individual offset using things like "pointer(@recordvar.field) -  
pointer(@recordvar)", and then compare the values between the 1.0.10  
and 2.0.2 version.



I appreciate very much the work done by the people behind FPC.
Not only because it is free and advanced, but also because Pascal  
is nicer than any other programming language I have seen, in my  
opinion


Thanks!


Jonas___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-06 Thread Martin Schreiber
On Friday 06 January 2006 12.32, Jonas Maebe wrote:
> I hope someone else can take it over from here, because I don't have
> Windows (or even a computer which can run Windows).

The problem is in rtl/win32/wininc/struct.inc, the smallint's were integer's:

DLGTEMPLATE = packed record //from rtl/win32/wininc/struct.inc
  style : DWORD;
  dwExtendedStyle : DWORD;
  cdit : WORD;
  x : smallint; //integer;
  y : smallint; //integer;
  cx : smallint; //integer;
  cy : smallint; //integer;
   end;

 pdlgtemplate = ^dlgtemplate;
 DLGITEMTEMPLATE = packed record
  style : DWORD;
  dwExtendedStyle : DWORD;
  x : smallint; //integer;
  y : smallint; //integer;
  cx : smallint; //integer;
  cy : smallint; //integer;
  id : WORD;
   end; 

Who makes the bug report?

Martin
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal


Re: [fpc-pascal] Problem with FPC2.0.2 and windows

2006-01-06 Thread Jonas Maebe


On 06 Jan 2006, at 19:12, Martin Schreiber wrote:


I hope someone else can take it over from here, because I don't have
Windows (or even a computer which can run Windows).


The problem is in rtl/win32/wininc/struct.inc, the smallint's were  
integer's:


Thanks, I've committed your changes. If someone can verifies it works  
in 2.1.1 tomorrow, I'll merge it back to 2.0.3 as well.



Jonas
___
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal