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!

Create a DialogBox with DLL (not MFC)

Status
Not open for further replies.

smac1979

Programmer
May 29, 2001
4
PT
Hi!

I'm new with Visual C++ and I have to create a dialog box that only have one label, one textbox and two buttons (OK and CANCEL). The problem is that I need to call this dialogbox from a DLL (because I'm using TCL) and can't do anything. All the examples that I have seen is for normal application or using MFC. I must use Visual C++ 6.0.

Can anyone show me how to do it?

Thanks,
Sérgio Cardoso
 
It's been a long time since I worked with DLLs.

However, I think this will work:

1) Open your workspace.
2) Make sure the current project is the DLL.
3) Add a Resource Script file.
4) Add a Dialog Resource. Don't pick any of the sub-types. Just click on Dialog and click Ok.
5) In your DLL code, call DialogBox.

This is where it gets muzzy. I don't remember if you use the HInstance from the main program or from the DLL.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top