From: John English <je@bton.ac.uk>
Subject: Re: Win32 dialogs/resource grief (longish)
Date: 2000/03/02
Date: 2000-03-02T13:13:38+00:00 [thread overview]
Message-ID: <38BE69BC.18BC5895@bton.ac.uk> (raw)
In-Reply-To: gakv4.1035$FQ2.294990@news4.usenetserver.com
David Botton wrote:
>
> Actually that was not his problem. Your version of the code would also have
> seen the same problem if you threw in the second dialog box.
>
> BTW rcl also does not compile the resource to coff correctly in that case
> either (mutliple dialogs). Windres or M$ cvtres are the only options here.
>
> David Botton
>
> Jerry van Dijk wrote in message <38bdb710_1@news2.prserv.net>...
> >Basically, the problem is that passing around data within the
> >Win32 environment takes more care. Explaining it all would take
> >more then a posting, but hopefully the code below will point in
> >the right direction.
As it happens, Windres seems to give me the same result. I've haven't
got cvtres so I haven't tried it, but I manually converted my .rc
file into about 500 lines of type declarations for DLGTEMPLATE
structures, with delicate rep clauses and alignment clauses (yuk!),
and everything now works perfectly. But if I can find a copy of
cvtres I'll give it a try -- I don't want to have to do any more
manual conversions if I can avoid it! A pox on tools that don't
work...
Incidentally, a funny with the DLGTEMPLATE. In Win32.WinUser, the
size clause for DLGTEMPLATE says "for 'Size use 18*8" -- but when
I set up my DLGTEMPLATE structure like so:
type MyDlg is
record
Dialog : DLGTEMPLATE; -- 18 bytes
Menu : WORD := 0; -- 2 bytes
Class : WORD := 0; -- 2 bytes
...
end record;
for MyDlg use
record
Dialog at 0 range 0..18*8-1;
Menu at 18 range 0..15;
Class at 20 range 0..15;
end record;
Gnat complains that at least 160 bits (20 bytes) are required for
Dialog, so I have to drop Menu from the rep clause (but thankfully
it still works fine) -- any idea why 20 bytes are required when the
size has explicitly been set to 18 bytes?
Anyway, many thanks for your help, David.
-----------------------------------------------------------------
John English | mailto:je@brighton.ac.uk
Senior Lecturer | http://www.it.bton.ac.uk/staff/je
Dept. of Computing | ** NON-PROFIT CD FOR CS STUDENTS **
University of Brighton | -- see http://burks.bton.ac.uk
-----------------------------------------------------------------
next prev parent reply other threads:[~2000-03-02 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-03-01 0:00 Win32 dialogs/resource grief (longish) John English
2000-03-01 0:00 ` David Botton
2000-03-02 0:00 ` Jerry van Dijk
2000-03-01 0:00 ` David Botton
2000-03-02 0:00 ` John English [this message]
2000-03-02 0:00 ` David Botton
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox