Klaatu said:
I've seen plenty of examples of updating a resource using
UpdateResource().
Has anyone actually used it to add a new resource? For example, a menu
resource. If so, how is it done? I'm not quit sure how to present the
raw
data.
I think you are about to step into one of the darker corners of Win32
programming. I don't want to sound like I am dissuading if you have decided
you must go this way ... but do you know that you can build menus at
runtime? It may be a better option.
If you want to go this route, take a look at this link:
http://msdn.microsoft.com/library/d...terface/Resources/IntroductiontoResources.asp
It contains this quip in the paragraph on the MENUHEADER structure:
<quote>
The MENUHEADER structure contains version information for the menu resource.
The structure definition provided here is for explanation only; it is not
present in any standard header file.
</quote>
The help entry for the UpdateResource() function points out that you must
pass a pointer to the "raw data" to be used in the update so I think that
you will first have to dump an existing menu resource, determine its binary
format by looking at the header and your resource script, get an idea of the
format, do the update, test and repeat until it works. :-(
Regards,
Will