www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - win32 dialog boxes

reply bobef <bobef paintballforce.com> writes:
Hello.

Is there way to display windows dialog box with D?
My attempts to create a dialog box without dialog template failed and I 
don't know how to create/link one for D... What I can think of is to 
create a dll with dialog resources and load them in D. But this is 
kind-a-ugly...
Feb 06 2005
next sibling parent "Ben Hinkle" <ben.hinkle gmail.com> writes:
"bobef" <bobef paintballforce.com> wrote in message 
news:cu5ihd$1edq$1 digitaldaemon.com...
 Hello.

 Is there way to display windows dialog box with D?
 My attempts to create a dialog box without dialog template failed and I 
 don't know how to create/link one for D... What I can think of is to 
 create a dll with dialog resources and load them in D. But this is 
 kind-a-ugly...

To create a modal dialog without using a template you call CreateWindow with an owner, add the controls you need and then loop and process messages by hand. See for example the Dialog class in MinWin http://home.comcast.net/~benhinkle/minwin/. If you just want a warning or error dialog you can just call MessageDialog, too. -Ben
Feb 06 2005
prev sibling parent Stewart Gordon <smjg_1998 yahoo.com> writes:
bobef wrote:
 Hello.
 
 Is there way to display windows dialog box with D? My attempts to 
 create a dialog box without dialog template failed and I don't know 
 how to create/link one for D... What I can think of is to create a 
 dll with dialog resources and load them in D. But this is 
 kind-a-ugly...

What do you mean by "dialog template"? AIUI, in the Windows API documentation "template" is pretty much synoymous with "resource". So if you're meaning this, then not only is creating a dll with dialog resources kind-a-ugly, it's also out of your question. OTOH, if you mean something else, why not just link the resources directly into the EXE, as is the normal way? Stewart. -- My e-mail is valid but not my primary mailbox. Please keep replies on the 'group where everyone may benefit.
Feb 07 2005