How can i create using VC++ 2008 functions in .rc files? I need to make a function to create Dialog Boxes by analizing the data send by me to it. And i don't want to use other libraries than windows.h and windowsx.h (so no MFC). If i can't make functions in .rc files, is there any other way to achieve my goal?
It never occurred to me to include executable data in a resource, but I don't see why not.
Just make sure that it is in a segment that has execute privileges before you call it. You'll need to make a function pointer to the entry point. See http://www.newty.de/fpt/index.html
[edit]
Oh, also, you could make the resource a script, which is executable by your program (which would have an embedded interpreter, of course).
@george135:
- First of all, read the last sequence and you might see that i asked if it is not possible to tell me how could i do it! So instead of posting "smart" things on the internet try to actualy do something to show you're smartness.
- Second of all, if you want me to read something you'd better read it first. Since you might get to a point where you might start learning something new. Something that could also solve my problem.
- Third of all, CreateDialog() doesn't creates a dialog, but registers a dialog template. I wanted to create the dialog template using .rc files with functions or something else with the same result.
And Read the Petzold and K&R, because all that you say has no sense at all...
(telling windows.h is a library shows that you never read any book neither MSDN...)