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

2006-01-08 Thread Hans Mårtensson
Martin Schreiber wrote: Copy the modified definition in type section of your program file: ... Yes, it works! Which means that if you put in your own type definitions, they will simply overrule the system definitions. I wasn't aware of that trick. So I can do with that until a corre

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

2006-01-08 Thread Martin Schreiber
On Sunday 08 January 2006 15.43, Hans Mårtensson wrote: > Now, I'm not familiar with the development of the PFC, > where and when can I download the corrected version of 2.0.2? Copy the modified definition in type section of your program file: Program test; // Program for testing dialogue boxes

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

2006-01-08 Thread Jonas Maebe
On 08 Jan 2006, at 15:43, Hans Mårtensson wrote: Now, I'm not familiar with the development of the PFC, where and when can I download the corrected version of 2.0.2? You can't, Martin Schreiber compiled his own corrected version. Jonas___ fpc-pasc

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

2006-01-08 Thread Hans Mårtensson
Martin Schreiber wrote: Your testcase worked for me with FPC 2.0.2 and the modified DLGTEMPLATE and DLGITEMTEMPLATE. Yes, I'm convinced that the problem lies where you have pointed it out. I have let my test program show sizeof(DLGTEMPLATE) and the output from the version compiled with 2.0

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

2006-01-08 Thread Hans Mårtensson
Jonas Maebe wrote: Can you check the date of the compiler with "fpc -iD"? As far as I know no new snapshot was built last night because of errors compiling the graph unit. Right. Even though the zip file date is more recent, the "fpc -D" returns: 2005/12/29 Hans Mårtensson

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

2006-01-07 Thread Martin Schreiber
On Saturday 07 January 2006 18.43, Hans Mårtensson wrote: > I have downloaded the 2.1.1 snapshot and compiled my testprogram with > it, and the problem is still there: no dialog box showes up. > Your testcase worked for me with FPC 2.0.2 and the modified DLGTEMPLATE and DLGITEMTEMPLATE. > Then,

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

2006-01-07 Thread Jonas Maebe
On 07 Jan 2006, at 18:43, Hans Mårtensson wrote: I have downloaded the 2.1.1 snapshot and compiled my testprogram with it, and the problem is still there: no dialog box showes up. Can you check the date of the compiler with "fpc -iD"? As far as I know no new snapshot was built last night b

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

2006-01-07 Thread Hans Mårtensson
Jonas Maebe wrote: On 06 Jan 2006, at 19:12, Martin Schreiber wrote: 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. I have dow

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

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

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 w

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

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

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

2006-01-04 Thread Hans Mårtensson
Jonas Maebe wrote: On 04 Jan 2006, at 21:51, Hans Mårtensson wrote: The type of pBoxtemplate is ^word. Is it not true that (dword(pBoxtemplate) and 1)=1 evaluates to TRUE, if and only if pBoxtemplate is NOT aligned to a word boundary (16 bit boundary)? And then, assuming pBoxtemplate is

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

2006-01-04 Thread Jonas Maebe
On 04 Jan 2006, at 21:51, Hans Mårtensson wrote: Does PPC 2.0.2 handle alignment of data the same way as former versions? The statements below have nothing to do with alignment. The type of pBoxtemplate is ^word. Is it not true that (dword(pBoxtemplate) and 1)=1 evaluates to TRUE, if and

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

2006-01-04 Thread Hans Mårtensson
Jonas Maebe wrote: On 04 Jan 2006, at 17:51, Hans Mårtensson wrote: Does PPC 2.0.2 handle alignment of data the same way as former versions? The statements below have nothing to do with alignment. Will the statements (the conditions) if (dword(pBoxtemplate) and 1)=1 then pBoxtemplate:=

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

2006-01-04 Thread Jonas Maebe
On 04 Jan 2006, at 17:51, Hans Mårtensson wrote: Does PPC 2.0.2 handle alignment of data the same way as former versions? The statements below have nothing to do with alignment. Will the statements (the conditions) if (dword(pBoxtemplate) and 1)=1 then pBoxtemplate:=nil; I can only thin

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

2006-01-04 Thread Tomas Hajny
Hans Mĺrtensson wrote: . . > Does PPC 2.0.2 handle alignment of data the same way as former versions? . . Actually, I don't think so - I believe the default alignment might have changed from 2 to 4 (at least this seems to be indicated by my simple test). You can check this easily for pBoxtempl

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

2006-01-04 Thread Hans Mårtensson
Jonas Maebe wrote: They should be. Thank you for your careful answer. I will return later if I am able to make a simple sample program that can reproduce the problem. (Or may be I should stick to 1.0.10 that worked for me) It would be nice if you could provide the sample program (and subm

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

2006-01-03 Thread Jonas Maebe
On 03 Jan 2006, at 19:57, Hans Mårtensson wrote: So I tried: if DialogBoxIndirect(0, pBox2, Window, Box2Proc) = 0 then exit; And the compiler assessed that the number of parameters was wrong. But this is an error in message, because the number of parameters is right. It was probably compla

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

2006-01-03 Thread Hans Mårtensson
Jonas Maebe wrote: On 28 Dec 2005, at 23:49, Hans Mårtensson wrote: The problem was the following program line, using the windows unit: if DialogBoxIndirect(0, pBox2, Window, @Box2Proc) = 0 then exit; The compiler assessed an error in parameter 4. Should not be an address, but a variable.

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

2006-01-03 Thread Jonas Maebe
On 28 Dec 2005, at 23:49, Hans Mårtensson wrote: The problem was the following program line, using the windows unit: if DialogBoxIndirect(0, pBox2, Window, @Box2Proc) = 0 then exit; The compiler assessed an error in parameter 4. Should not be an address, but a variable. Is your Box2Proc pro