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 downloaded the 2.1.1 snapshot and compiled my testprogram with
it, and the problem is still there: no dialog box showes up.
Then, by help of the windows function GetLastError, I have found out
that windows in my program after call to
DialogBoxIndirect(0,pBox2, Window, @Box2Proc)
returns LastError 1812, meaning "resource not found".
That made me think about the first two parameters.
The first one should be a handle to an instance of the module. Here I
use 0, believing that this makes windows use the current module.
I'm not sure about this, but it worked in the program compiled with FPC
1.0.10, and windows hasn't changed.
Next the pBox2 should point to the data structure, defining the dialog
box. The data should be in global memory.
I have constructed the data by help of some pointers of type ^word,
pointing to something, allocated by getmem, using move to put data
there, then finally assigned the pBox2 that is of type pointer.
(typeless I mean).
I can't see if that possibly can be treated diffently in the 2.0.2 compiler?
Hans Mårtensson
_______________________________________________
fpc-pascal maillist - fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal