Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a memory dialog box template

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello,
This is a very specific question for C only and using the
Win API function 'DialogBoxIndirect()' function.

I need to be able to create a memory template in order
to call this function for use with dynamically created
dialog boxes that include bitmaps and icons as well as
text.
The doc's on including text strings in the dialog
box are fairly clear, which says something like:
0x82 0x00 followed by the text zstring. The problem is,
for bitmaps it says, "the bitmap has to be declared
somewhere else in the resource file", but i dont want to use
a resource file, i want to place each and every byte into
memory myself. This means i have to know the byte format
of a dialog box memory template, not really the C resource
script conventions.
If anyone can help with this i'd appreciate it.
The main problem is the format for declaring bitmaps and
icons.

Thanks!
 
You can use you diaolgs DC to draw bitmaps. Try to see which functions work with bitmaps. Windows has many oof theese ones. John Fill
1c.bmp


ivfmd@mail.md
 
In response to JohnFill's reply:

Thanks very much, that's a good idea too, but what i was
looking for, really, was to do the whole process by
writing bytes to memory to form a complete memory dialog
template and avoid doing specific message handling.
If you recall, the dialog box creation format doesnt
require any message handling other then the basic
WM_INITDIALOG and WM_COMMAND, while the system handles
drawing bitmaps, icons, text and buttons that you spec
within the resource script (normally, that is).

Perhaps there isnt any way to do it outside of a compiler,
without compiling code to handle WM_PAINT as you were
implying, but if there is anyone who knows how to do it
without using a compiler (poking individual bytes) i'd
really like to know how to do it. I guess if i cant find
another way ill have to go with your idea John, thanks.

Any other ideas?

Thanks much!
 
Make a separate window and put it as a child in your dialog. John Fill
1c.bmp


ivfmd@mail.md
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top