tags:

views:

1096

answers:

5

I'm trying to create a dialog box using C++ and the windows API, but I don't want the dialog defined in a resource file. I can't find anything good on this on the web, none of the examples I've read seem to define the dialog programmatically.

Anyone know how to do this? A simple example is fine, I'm not doing anything complicated with it yet.

+1  A: 

Take a look at this toolkit that describes how to create dialogs without resource files. It's in WTL, however I'm sure you can pick apart the internals to achieve the same thing using win32 API directly.

Alan
+5  A: 

I think Raymond Chen has a pretty good example here: http://blogs.msdn.com/oldnewthing/archive/2005/04/29/412577.aspx

Andreas Magnusson
+1  A: 

Try to search MSDN for "dialog templates in memory"

See this for example: http://msdn.microsoft.com/en-us/library/ms632588(VS.85).aspx

realsugar
A: 

Salam, Hi, here you can find how to use Windows API Dialogs without using resource files. The Winapi (C Win32 API, No MFC) tutorial: http://www.zetcode.com/tutorials/winapi/