comp.lang.ada
 help / color / mirror / Atom feed
* Dialogresources on WinNT
@ 2000-09-11 16:03 Alfred Hilscher
  2000-09-11 16:58 ` Pascal Obry
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Alfred Hilscher @ 2000-09-11 16:03 UTC (permalink / raw)


Hi,

when I've tried to write a little GUI on Windows NT, I've encountered a
problem. I've written some dialogtemplates, put them in one resource
file (*.rc) and compiled it with the resource compiler (rc.exe). In my
program I call the api-function "DialogBox" twice, once for the first
dialog and (later) again for the second. With the Aonix compiler it
worked well. So I converted the resource (res2coff.exe) for GNAT, by
only one dialog works. When trying to load the otherone the api always
returns errorcode "-1". Any idea what I did wrong ?



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dialogresources on WinNT
  2000-09-11 16:03 Dialogresources on WinNT Alfred Hilscher
@ 2000-09-11 16:58 ` Pascal Obry
  2000-09-11 17:25 ` David Botton
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Pascal Obry @ 2000-09-11 16:58 UTC (permalink / raw)


Alfred Hilscher <Alfred.Hilscher@icn.siemens.de> writes:

> Hi,
> 
> when I've tried to write a little GUI on Windows NT, I've encountered a
> problem. I've written some dialogtemplates, put them in one resource
> file (*.rc) and compiled it with the resource compiler (rc.exe). In my
> program I call the api-function "DialogBox" twice, once for the first
> dialog and (later) again for the second. With the Aonix compiler it
> worked well. So I converted the resource (res2coff.exe) for GNAT, by
> only one dialog works. When trying to load the otherone the api always
> returns errorcode "-1". Any idea what I did wrong ?

You should try using windres instead of rc+res2coff.

Pascal.

-- 

--|------------------------------------------------------
--| Pascal Obry                           Team-Ada Member
--| 45, rue Gabriel Peri - 78114 Magny Les Hameaux FRANCE
--|------------------------------------------------------
--|         http://perso.wanadoo.fr/pascal.obry
--|
--| "The best way to travel is by means of imagination"



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dialogresources on WinNT
  2000-09-11 16:03 Dialogresources on WinNT Alfred Hilscher
  2000-09-11 16:58 ` Pascal Obry
@ 2000-09-11 17:25 ` David Botton
  2000-09-11 18:05 ` tmoran
  2000-09-12 10:19 ` Alfred Hilscher
  3 siblings, 0 replies; 6+ messages in thread
From: David Botton @ 2000-09-11 17:25 UTC (permalink / raw)
  To: comp.lang.ada

Use windres instead. You can grab a copy off the GWindows page,
http://www.adapower.com/gwindows

David Botton

----- Original Message -----
From: "Alfred Hilscher" <Alfred.Hilscher@icn.siemens.de>


> Hi,
>
> when I've tried to write a little GUI on Windows NT, I've encountered a
> problem. I've written some dialogtemplates, put them in one resource
> file (*.rc) and compiled it with the resource compiler (rc.exe). In my
> program I call the api-function "DialogBox" twice, once for the first
> dialog and (later) again for the second. With the Aonix compiler it
> worked well. So I converted the resource (res2coff.exe) for GNAT, by
> only one dialog works. When trying to load the otherone the api always
> returns errorcode "-1". Any idea what I did wrong ?






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dialogresources on WinNT
  2000-09-11 16:03 Dialogresources on WinNT Alfred Hilscher
  2000-09-11 16:58 ` Pascal Obry
  2000-09-11 17:25 ` David Botton
@ 2000-09-11 18:05 ` tmoran
  2000-09-11 18:33   ` David Botton
  2000-09-12 10:19 ` Alfred Hilscher
  3 siblings, 1 reply; 6+ messages in thread
From: tmoran @ 2000-09-11 18:05 UTC (permalink / raw)


> So I converted the resource (res2coff.exe) for GNAT, by
  The Claw instructions for Gnat (www.rrsoftware.com) have long
suggested using cvtres to go .res -> .obj, then rename .obj -> .rbj
(to avoid confusion) and then append the .rbj to the gnatmake command.
  I'd be interested if Gnat has come out with a working, simpler, way.



^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dialogresources on WinNT
  2000-09-11 18:05 ` tmoran
@ 2000-09-11 18:33   ` David Botton
  0 siblings, 0 replies; 6+ messages in thread
From: David Botton @ 2000-09-11 18:33 UTC (permalink / raw)
  To: comp.lang.ada

Windres -> .RC file to .rbj file in one shot.

David Botton

----- Original Message ----- 
From: <tmoran@bix.com>
>   I'd be interested if Gnat has come out with a working, simpler, way.






^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: Dialogresources on WinNT
  2000-09-11 16:03 Dialogresources on WinNT Alfred Hilscher
                   ` (2 preceding siblings ...)
  2000-09-11 18:05 ` tmoran
@ 2000-09-12 10:19 ` Alfred Hilscher
  3 siblings, 0 replies; 6+ messages in thread
From: Alfred Hilscher @ 2000-09-12 10:19 UTC (permalink / raw)


Many thanks to all of you. I've tried windres and it works fine.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2000-09-12 10:19 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-09-11 16:03 Dialogresources on WinNT Alfred Hilscher
2000-09-11 16:58 ` Pascal Obry
2000-09-11 17:25 ` David Botton
2000-09-11 18:05 ` tmoran
2000-09-11 18:33   ` David Botton
2000-09-12 10:19 ` Alfred Hilscher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox