Re: Using more than one .RC file?
On Fri, 05 Sep 2008 23:37:07 -0700, Larry Lindstrom
wrote:
>r_z_aret@pen_fact.com wrote:
>> On Thu, 04 Sep 2008 14:30:05 -0700, Larry Lindstrom
>> wrote:
>>
>> clip
>>
>>> I'd like to have a self contained statically linked module.
>>> The code in the module will use DialogBoxParam() to bring up a
>>> dialog of it's own, that only it will call. This module would
>>> have it's own .RC and resource.h fies in the directory that has
>>> it's source code.
>>>
>>> I'd like the applications that use this module to be oblivious
>>> to the existence of this module's dialog box.
>>>
>>> Can this be done without too much grief?
>>
>> Are you sure you need to use resources? How about using a dialog
>> template to build an _empty_ dialog box and then using CreateWindow to
>> add controls? That's what I do. Everything is contained entirely
>> within the static library, with no need for any resource and thus no
>> need for a .rc file.
>
>Thanks Robert:
>
> That's a possibility for this module's dialog. It's a very simple
>dialog.
>
> The question was originaly a general question, where dialogs may
>not be as simple as this one.
My primary target is Windows CE/Mobile, and am biased towards simple
dialogs. If you are willing to create a set of functions, you can
remove much of the drudgery of creating a complicated dialog via code.
I have a tool set that provides automatic scaling, so I never use a
resource editor; I do hand edit a .rc file to set up basic dialog
boxes for my executables, but then use my functions to position the
controls and add more. My static library includes custom controls, and
some of them contain several controls, so I can easily build a
somewhat complicated dialog by putting one or two of my custom
controls in a dialog.
>
> Larry
-----------------------------------------
To reply to me, remove the underscores (_) from my email address (and please indicate which newsgroup and message).
Robert E. Zaret, eMVP
PenFact, Inc.
20 Park Plaza, Suite 400
Boston, MA 02116
www.penfact.com
Useful reading (be sure to read its disclaimer first):
http://catb.org/~esr/faqs/smart-questions.html
date: Sat, 06 Sep 2008 11:18:54 -0500
author: unknown