Re: library project

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Hi,

Just my 2p worth. Dynamically building dialogs isn't really so tricky. I don't know what problems Joe was alluding to. Dialogs build from resources are anyway build at runtime in a similar way. Look at http://www.codeproject.com/KB/dialog/dynamicdialog.aspx for an example.

As far as localisation, you could always access a text file of string translations for the labels, and defautl to a language if no suitable file is found. Quick and dirty at least. The problem with dlls and ActiveX is when your interface changes your exes don't work until you relink. With a static library if it's in it's in.

Bill < wrote:
Hi,

I'm trying to create a library of one piece of code so the source can be kept secret and only the header and the library file need to be included in projects that use it. This is for use within my company.

The library needs one dialog box to enter some data. I created the library and put the dialog inside. I use this library in a project but the dialog cannot be created. I get an error -1 from DoModal(). I remember seeing once that a project can only have one resource file, so maybe my library dialog is not getting included in the final executable. Am I right? Is there a way to get it in there?

I thought I could maybe make this a DLL, but 1. I've never done one before and 2. I want to final executable to stand alone without a DLL I must also supply.

I have been trying to InitModalIndirect() from a DLGTEMPLATE but it's an uphill battle. I finally got a dialog box to display but the first button i tried to add doesn't display. Then i'm wondering how do I link the button (or other controls) to the function or variable that I would normally use Class Wizard to associate. Does anyone have any exmaple program for this?

Thanks,

Bill


.


Quantcast