How to insert a MFC Dialog in a DLL ?


I want to cerate a static DLL. In this DLL I want insert a MFC Dialog.



I have made with the MSVisual C++  MFC AppWizard(dll)  a DLL .

I insert a test function in the DLL.

With an other Progarmm  I testet the test function the DLL . It works.

Now I try insert a MCF- Dialog in the DLL but without success.

Two days I was trying but no change.



Knows everyone a sample or a link in the web.



Thanks

A beginner  Daniel


0
1/14/2004 7:57:14 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
571 Views

Similar Articles

[PageSpeed] 14

Daniel,

If it is indeed the case that you have successfully created and called a
DLL, you are close to your target.

You want to check AFX_MANAGE_STATE. If you look towards the end of, for
example, http://support.microsoft.com/default.aspx?scid=kb;en-us;194300
(under More information), you'll get a very brief example on how to use it.

Johan Rosengren
Abstrakt Mekanik AB

"Hammer" <d.mueller66@solnet.ch> a �crit dans le message de
news:4006f083$0$130$fb624d75@newsspool.solnet.ch...
>
>
> I want to cerate a static DLL. In this DLL I want insert a MFC Dialog.
>
>
>
> I have made with the MSVisual C++  MFC AppWizard(dll)  a DLL .
>
> I insert a test function in the DLL.
>
> With an other Progarmm  I testet the test function the DLL . It works.
>
> Now I try insert a MCF- Dialog in the DLL but without success.
>
> Two days I was trying but no change.
>
>
>
> Knows everyone a sample or a link in the web.
>
>
>
> Thanks
>
> A beginner  Daniel
>
>


0
1/16/2004 7:36:50 AM
Are you having trouble inserting the form, or calling it?
I created a new MFC AppWizard (DLL), regular DLL with MFC statically linked,
and just went to Insert, New Form. And it did it, then allowing me to choose
to derive it from CDialog, its name, etc.
Then in the exported function you just have to instantiate an instance of
the form, in the same way that the application class does of an MFC
AppWizard (EXE). I managed to create it and it's been sitting on the network
and working well ever since, with no-one complaining they don't have
runtimes installed (as is often expected in a primarily VB-based
environment!).
I didn't even come across AFX_MANAGE_STATE... maybe the right way though for
your specific circumstances

"Hammer" <d.mueller66@solnet.ch> wrote in message
news:4006f083$0$130$fb624d75@newsspool.solnet.ch...
>
>
> I want to cerate a static DLL. In this DLL I want insert a MFC Dialog.
>
>
>
> I have made with the MSVisual C++  MFC AppWizard(dll)  a DLL .
>
> I insert a test function in the DLL.
>
> With an other Progarmm  I testet the test function the DLL . It works.
>
> Now I try insert a MCF- Dialog in the DLL but without success.
>
> Two days I was trying but no change.
>
>
>
> Knows everyone a sample or a link in the web.
>
>
>
> Thanks
>
> A beginner  Daniel
>
>


0
Bonj
1/16/2004 11:46:13 PM
Reply:

Similar Artilces:

How to remove icon on teh left side of the resizable dialog
I have a resizable dialog which is showing that default icon on the left side but i don't want it visible if i remove the system menu property then it disappears but at that time my maximize and minimize buttons also disappears . I have tried asimple icon of the same color of the title bar it colors are not matching exactly and even changes as per O.S. so that was not a good option. So is there any way to remove/hide that icon. "Sam" <mesushant@gmail.com> wrote in message news:1144991166.379450.78670@v46g2000cwv.googlegroups.com... > I have a resizable dialog which is ...

How do I insert Roman Numerals?
New to Word 2007 would someone please explain to me how to insert Roman Numerlas in my document? "ckj" <ckj@discussions.microsoft.com> wrote in message news:6CF0C580-BA6E-463D-B4FD-E6A6FDD9E814@microsoft.com... > New to Word 2007 would someone please explain to me how to insert Roman > Numerlas in my document? Just type them... I II III IV V VI VII VIII IX X XI etc etc. Type a number e.g. 21, select it and run the following macro Dim oRng As Range Set oRng = Selection.Range oRng.Fields.Add oRng, 34, oRng.Text & " \*Roman"...

MFC: Show the same views of a file as it was closed
Hello, in my application i have one document associated with some views. If i open a file, i want to show the same views, that were shown, as it was closed. Is it possible? Thanks for any hint. Yes. You'll need to save the configuration in the appropriate registry key. Assuming the views have a unique number (it's only important to the application, not the user), when the application closes, save that number to the registry. When the application starts back up, read the value from the registry, and show the appropriate view. Helpful hint: if the application only has three views, nu...

Insert trigger
Looking for some advice on SQL 2005. I have a table that will usually be populated by an SSIS package. I want to set the "loaddate" column to the current time after a record is inserted. Should i do this via trigger or should i just build a step in the SSIS package to update the column after the file loads? If trigger is the way to go, what is the syntax to create the after insert trigger? Thanks in advance. You can create a default constraint on the table set to CURRENT_TIMESTAMP. That will handle the automatic date assignment without any need for coding. -...

Scintilla and MFC
Hi all, Im using the MFC wrapped scintilla components found at http://www.atari-soldiers.com/mfc_scintilla.zip , and getting some odd behavior with CView. When I create a new window, or I change focus from one app to another, I get no blinking cursor, and although the window seems to have focus I have to click in it to be able to type anything.I have tried scintillas methods of : SetCurrentPos( ) SetSelectionStart( ) GrabFocus() And also MFC's SetActiveWindow() SetFocus() SetCaretPos() I am trying these in the overrided CView::OnActivateView( ... ) function ( and also in a DisplayEr...

OO architecture in MFC
I have an MFC app that can be used with or without the dialog (GUI) component. The dialog is an optional status component that updates with statistics every second. I'd like to put all the statistical calculations and queries in the App. The Dlg and the App run in two separate threads. My question is: what's the best OO method of doing this? 1. Do I put a timer in the dialog and have it get the data from the app every second? CMyDlg::OnTimer() { STATISTICS stats; ((CMyApp *)GetParent())->GetStatistics(&stats); //... } 2. Do I send a pointer to the statistics to the d...

installing network service dll (vmnetbridge.dll) fails to copy into system32
Trying to install a network service vmnetbridge.dll fails with err msg. "An error occured while copying file vmnetbridge.dll. Cannot copy file to destination directory. c:\windows User is in local admin group. UAC is set to OFF. Driver is digitally signed by Vmware, inc. Please advice how to rectify. QA4Ever ...

how to automatically enable controls' xp theme in a dialog
In the dialog generated with previous version of vc, the controls automatically display as xp theme. But, when i use the newest version of vc and build a dialog,and the controls display as classical windows theme. My question is how to make the controls automatically enable xp theme when the theme is enabled. thanks, best regards, kywoo ...

inserting hrs and minutes
I have a cell in my time card that displays total weekly time -ex- "40:15" is there a way to make it more like this...40hrs,15mins -- Message posted from http://www.ExcelForum.com Use a custom format hh"hrs",mm"mins" -- Regards, Peo Sjoblom "-Brian-H- >" <<Brian-H-.110wgs@excelforum-nospam.com> wrote in message news:Brian-H-.110wgs@excelforum-nospam.com... > I have a cell in my time card that displays total weekly time -ex- > "40:15" is there a way to make it more like this...40hrs,15mins ? > > > ...

insert an interactive excel file into word web page
I'm trying to insert a excel file into a word document with text, and then save it was as a web page, but I want to keep the excel part interactive. Any ideas? ...

Insert | File > Attachmnet-Button Drop Down ;What is the difference between Insert and Insert As Attachmnet
re: "Outlook2003, File-Insert-Options" On making new-email with Attachment-File(s), ** File Menu | Insert | File >>> (Brows and select File to insert ) then we can see the button "Insert", and write side Drop Down Arrow lower-right side of Dialog Box; If it clicked, we can see three options as follows: ** Insert Insert as text Insert as Attachment I can not recognize/understand the difference between "Insert" and "Insert as Attachment" *** What is the difference between Insert and Insert As Attachment ? I would appreciate y...

How do I receive WM_INPUT in an MFC app?
Hello again. I need to receive the WM_INPUT message in an MFC app, and I'm not sure how or where to do this. I have no problem doing it in a straight Win32 design, but I don't quite comprehend all the message-handling details in an MFC VS-created app. The app in question is a dialog app, so I've got a MainApp and a MainDlg class to work with. I'm sure this is simple, but not as simple as I am... Mike Add the following line to the message map ON_MESSAGE(WM_INPUT, OnInput) The handler function will be as shown (be sure to declare it in the header file) LRESULT CMyMainDl...

OPC server & MFC
Is there and can anyone point me to some references addressing an OPC server with the handy ODBC classes of MFC? Or am I wishing for too much? Ron H. -- This eMail has been scanned by Norton� 360 and found to be virus free! On Jun 29, 2:11=A0am, "Ron H" <rnha...@nospam.net> wrote: > Is there and can anyone point me to some references addressing an OPC ser= ver > with the handy ODBC classes of MFC? Or am I wishing for too much? > No takers? Ok, I'll give it a shot, but I might be mostly talking out of my backside... What exactly do yo...

Inserting Hyperlinks in a Protected Sheet
Hi I run Excel 2000 and I have a protected worksheet that I share wit users in my organisation. I want to allow the insertion of a hyperlin to a specific file type within a specified directory on our server. 3 Questions: 1.Protection on disables the insert hyperlink command. Can this b overcome with worksheet activate code? 2.Can I limit the types of files (preferably by requiring the file t meet a mask format eg "z-*.xls")? 3.Can I limit the directory that can be linked, by referring to pathname stored in a cell on the active sheet? Would appreciate your suggestions. Thanks S...

Insert with a where condition
Hi, sql 2005 I have an insert statement that is ignoring the where condition. That is, I want to insert records when they do not already exist in the destination table. INSERT INTO dbo.tblmnuGroupPerm ( gId ,mtfID ,... ) SELECT @gID ,mtfID ,... FROM dbo.locmnuTabFunction AS ltf WHERE ltf.mtfID NOT IN ( SELECT gp.mtfID FROM dbo.tblmnuGroupPerm AS gp WHERE gp.gId=@gID AND gp.Deleted=0 ) Any ideas or recommendations appreciated :-) Many thanks, Jonathan It's OK... <oops "redFace">I did not correctly se...

mfc size
Hi, quick question, Is there a way to decrese size of regular DLL which use only CString and message map handling plus some com libs. With mfc share size is 50k but with static 140k. Do I need all that staff? thanks "andrew" <kc2ine@yahoo.com> wrote in message news:%238xv0ouGFHA.2588@TK2MSFTNGP09.phx.gbl... > Hi, > quick question, > Is there a way to decrese size of regular DLL which use only CString and > message map > handling plus some com libs. With mfc share size is 50k but with static > 140k. Do I need all that staff? > thanks > > 140 KB ...

port an visual studio 6 MFC application to visual c++ 2005 express
Hello, I want to port an MFC Application from Visual Studio 6 MFC application to Visual C++ 2005 express edition beta. While building i get following error: *************************************************************************** ------ Build started: Project: OSTDLL, Configuration: Debug Win32 ------ Compiling... StdAfx.cpp c:\programme\Microsoft Visual Studio\MyProjects\ostroottemp\OSTROOT\OSTDLL\StdAfx.h(41) : fatal error C1083: Cannot open include file: 'afxcmn.h': No such file or directory Creating browse information file... Microsoft Browse Information Maintenanc...

Insert
I want to overtype in a Publisher text box. I find I can only insert. The "insert" key doesn't do anything. ...

how to insert data in a table
Hi Exprets; I am creating an access database in which I want to insert data in already created table. Kindly help. Regards, Vikky Vikky <love.excel@gmail.com> wrote in news:1194124711.012302.269990 @e34g2000pro.googlegroups.com: > Hi Exprets; > > I am creating an access database in which I want to insert data in > already created table. > > Kindly help. > > Regards, > > Vikky > Data from where? Do you want to import it from excel, from a text file, copy it from another table or type it in manually? -- Bob Quintal PA is y I've altere...

How do you insert page numbers larger than 1000?
I have my purchase orders set up as a Publisher document. When our organization upgraded from Publisher 2000 to Publisher 2002, the new version set parameters on the page numbers. This was one of those things that worked just fine in the previous version... Does anyone know how to turn it off or change it? Hi mregen (mregen@discussions.microsoft.com), in the newsgroups you posted: || I have my purchase orders set up as a Publisher document. When our || organization upgraded from Publisher 2000 to Publisher 2002, the new || version set parameters on the page numbers. This was one of those...

Dialog resizing question
Hi, I've done a fair amount of programming in VC++ 6.0 but most of my stuff is nuts & Bolts type apps, I rarely work with the GUI. My question is probably a simple one. I desire a dialog box that resizes just like the "Project-> Insert Project Into Workspace" dialog in VC++6.0. i.e. You can shrink it until the controls in the dialog are butted up against the edges of the dialog, but when you stretch it, the controls resize automatically (maybe not automatically) to an optimal size which keeps the proportions right. Is there some property that I'm missing on controls ...

insert downloads into power point
i downloaded an application called "BioDigital Simulator" of an animated cleft lip/palate surgery and need it put into my power point presentation, but can't fiugre out how to do so.... very frustrating... What kind of file is this application? Is it a video? If so, what kind? MPEG? AVI? MOV? Or is it an EXE file? Something else? Which version of PPT are you using? -- Echo [MS PPT MVP] http://www.echosvoice.com What's new in PPT 2010? http://www.echosvoice.com/2010.htm Fixing PowerPoint Annoyances http://tinyurl.com/36grcd PowerPoint 2007 Complete Makeover...

Insert dataset to another database
I'm posting this to this group also since it pertains to queries, primarily. Hello, Using VB6/ADO, I'm thinking I can create a recordset and insert it into another table in a different Jet database, all within the execution of a single query. But, I can't seem to get it to work, even in an experiment in Access 2K. My sql in Access 2K: SELECT D.lorder as Ord, A.Lorder FROM [;Database = C:\MyDocuments\Acc2K\Wrk.mdb].OrdersData as A INNER JOIN [;Database = C:\Access\Work\Sales06.mdb].Detl1 as D On D.Lorder = a.lorder WHERE ((D.fg)= 'MXX-NC' Or (D.fg)= 'MXX.NC')...

Insert a blank row
Hi, I need some help to insert a blank row in a range where column A has a series of dates. There will be several of the same dates and I need to both sort the dates and then insert the blank row at the end of each sequence. In the blank row I need to total figures that will be in columns B through to G. Thanks, Jim S Hi Jim maybe an easier solution 1. Sort your data (use 'Data - Sort', e.g., column A ascending) 2. Use 'Data - Subtotals' This will insert a row after each date and calculate subtotals automatically for you HTH Frank anon wrote: > Hi, > I need some...

Seeking: some advice about program structure (MFC dialog app)
I've written a program in C++ (clumsily at the moment) to read in a text file from a scientific piece of kit, grab the 2D array data in there (it's a text file), and process it. At the moment it's a bit raw - I've been away from programming for 4 or 5 years so have really forgotten so much stuff it's frightening! My first plan is to change that program into a neater version, perhaps using some classes and optimising how I am processing the array and getting the output values I need. I used to write a lot of tools using the MFC App Wizard for dialog based apps, and ...