MFC Container to MFC ActiveX Control problems.

Hello,

I'm creating an MFC custom control using VC 6.0 called TestCtrl.
This control uses a modifed Circ3 custom control.
In the Circ3 control I subclassed the WM_CREATE message and create a
child window in the OnCreate message handler.

When I add the Circ3 control to the About dialog of my TestCtrl, the
Circ3 OnCreate message is never called.

If I add my modifed Circ3 control to a VB container, OnCreate gets
called.

What am I missing?

Also, I would like to be able to create my Circ3 control at runtime.
This is about as far as I got:

Into the stdafx.h file I added:

#pragma warning(push,1)
#import "c:\winnt\system32\stdole2.tlb" rename_namespace("New")
exclude("GUID", <... snip...>)
#pragma warning(pop)
#import "circ3.ocx" rename_namespace("New")
using namespace New;

In the my TestCtl.cpp OnCreate message handler I put:

_DCirc3Ptr pCirc=NULL;
HRESULT hr=pCirc.CreateInstance(__uuidof(Circ3));

Everything builds and executes successfully up till here.  But now I am
at a loss.  Anybody know what I need to do to accomplish my goals?

Can anybody point me in the right direction?

Thanks,
Shaun

0
nobody1 (3)
8/28/2003 9:25:49 PM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
659 Views

Similar Articles

[PageSpeed] 41

Reply:

Similar Artilces:

A strange problem with MFC
Hi, Rencently I met a strange problem. The code like below: CWinThread* pThread = AfxBeginThread(ThreadFunc, (LPVOID)this, THREAD_PRIORITY_NORMAL, 0, CREATE_SUSPENDED); if(pThread->m_hThread != NULL){ pThread->m_bAutodelete = FALSE; pThread->ResumeThread(); } After the statement "pThread->m_bAutodelete = FALSE" executed, I found the value of pThread->m_hThread is 0. While pThread->m_bAutodelete is still 1! The code section located in a win32 static library, with /Md option.The host application(exe) is a win32 console application, with /Md option. There...

Form Controls
I have a form that I use as a switchboard to print off forms. How do I select a company name, then after I select the name have it print a report or form? Can't figure out how it all works together. Select Company from a combo box After select, what do you use to get the report to open for that Company? I'm confused. -- Denise B. Here's an example Dim strWhere As String strWhere = "IssueID = " & Me.[NameOfCombo]ID 'Debug.Print strWhere DoCmd.OpenReport "NameOfReport", acPreview, , strWhere Jeanette Cun...

Problem using Vlookup as a function in VBA.
Using xl2000: If anybdy could assist me I would be thankful. I'm trying to use the VLOOKUP function within a Public declared function as such : Public Function color(address As Range) ColorRange = Worksheets("sheet1").Range("range") color = Application.WorksheetFunction.VLookup(address.Value, ColorRange, 2) End Function and the worksheet is set out as such A B C D 1 04-Mar-04 orange lime 2 3 4 01-Mar-04 grey 5 02-Mar-04 black 6 03-Mar-04 red 7 04-Mar-04 orange 8 05-Mar-04 w...

Urgent Exch2003 Queue problem
My client is running Exch 2003. I have every thing set up with defaults in place..ie no-open relay I am publishing the server smtp port with ISA server (same server) and they have lost the ability to send and recieve mail over teh web because the Queue Viewer displays about 25000 messages in the Queue watining to be delivered. There are about 100 queues open each with serveral 100 to 1000 emails... Question.... can you help me with the Queue Viewer.. am I looking at inbound or outbound messages? Is there a way to distinguish that? Does anyone have an idea why my queus are swelling out of co...

about access Control List(ACL)
Hi! I just want to make sure that my understanding about ACL is correct Assume that you have a directory and a file. As I understand this a directory or file can only be connected to one ACL but you can have many Access Control Entries in this ACL. //Tony On 19-04-2010 12:33, Tony Johansson wrote: > I just want to make sure that my understanding about ACL is correct > Assume that you have a directory and a file. > As I understand this a directory or file can only be connected to one ACL > but you can have many Access Control Entries in this ACL. As I read:...

Indentation problem with signatures or stationary
I want to use this gif as my stationary http://www.jkador.com/images/backletter.gif but when I start an email left margin is all the way over to the left instead of over out of the way of the graphic. How can I make an indentation or margin default for my signature. ...

Unicode in MFC
Hi, I am new to MFC programming and I have a problem: when I try to write the caption of a button or something else in my own language(Farsi), in the design mode it shows the correct string but when I compile it it shows a '?' instead of every character. Can anyone please help me with that. > I am new to MFC programming and I have a problem: > when I try to write the caption of a button or something else in my > own language(Farsi), in the design mode it shows the correct string > but when I compile it it shows a '?' instead of every character. Can > anyone ple...

Exc2k3 Move user from Users Container to an OU
Hello, I cannot move my users out of the Users container into an OU. When I move the user or distribution list out of the Users container into an OU the user will not receive external email. However, internal email works perfectly. Here is a copy of the NDR. Sender get the send NDR from a unix or exchange system. -------------------begin ndr------------------------------------------- This is an automatically generated Delivery Status Notification Delivery to the following recipient failed permanently: groupname@mydomain.com Technical details of permanent failure: PERM_FAILURE:...

How do I change control colors
I create a dialog based MFC application in VC++ 6.0 and add some controls like edit boxes and buttons. I would like to change the defaultcolors of the controls. Is there no simple way to do this? I havn't found the answer in the docs. The only thing I have found is a SetBkColor method but that won't work. I have only succeded in changing the background color of the main dialog window with SetDialogBkColor. >I create a dialog based MFC application in VC++ 6.0 and add some controls >like edit boxes and buttons. >I would like to change the defaultcolors of the controls. Is...

EMAIL2 configuration problems
Hi I am trying to configre my PocketPC Outlook using the ConfigurationManager.ProcessConfiguration. The provisioning file that I have created is attached for your kind consideration. The mail account gets created but the problem is that I am unable to set the settings for 1. Connect and check messages after every 5 minutes (Given by the Linger) 2. Settings for getting the full message (Given by the Retrieve) Please could someone help me out of this. I have read numerous posts on the net for this, but none seem to help Thanks Regards Madhur XmlDocument configDoc = new XmlDocument...

return int value to OS in MFC App
Hi, Everybody. I have to make A MFC app to return int value to Operatiing System.. if i could use WinMain() function, this is not matter. but MFC does not reveal WinMain().... How can i solve this problem? Can Anybody help me with this problem? <flybluewing@bcline.com> wrote in message news:1189386249.923483.59250@y42g2000hsy.googlegroups.com... > Hi, Everybody. > > I have to make A MFC app to return int value to Operatiing System.. > > if i could use WinMain() function, this is not matter. > but MFC does not reveal WinMain().... > How can i solve this problem?...

Problems with Exchange and POP3
Hi, Using exchange 2003. We have some users on it configured to use POP3. We have a 2nd Server setup and configured to do all mail scans(MailMarshal), scanning for viruses, spam,etc before delivering to exchange. Mailmarshal scans and delivers the email to the exchange server but when checking the message tracking on exchange the email doesn't arrive there. We do however have Symantec for Exchange installed on the server but there is nothing in the quarantine area. Check POP logs, Event Viewer, Exchange logs .....umm....well all possible logs. What could have gone wrong? Where ha...

mfc and IE activeX
I'm using VS 2003 and trying to use Internet Explorer in my MFC application but encountering problems If I built a very simple test dialog-application and drop in the IE it works exactly as expected. However, when I create a similar dialog box in my MFC application and call the ...DoModal() nothing appears at all - not even the dialog box itself. It's as if my application does not want to use ActiveX components - I also tried a couple of other Microsoft ActiveX controls and they have the same problem. I must be missing something obvious - any one with any ideas will be much ...

Problems With HTML Fragments
Hello - I have created a basic website with each page looking mostly the same - each page has five HTML code fragments on it that link up to different training course options. For simplicity, I copied the HTML text boxes from one page to another since the pages look similar and then edited the links to reflect where each page's links should go. This appeared to work fine until I looked a little closer. Two of the pages are having trouble. On one page, when viewing it live on the web, the five HTML fragments/links look fine, but one of them isn't a hyperlink. I move my mouse o...

ActiveX Socket
I am developing an activex control with a TCP/IP socket. The activex control is written using vc++/mfc and the socket part is using CAsyncSocket class support of MFC. I am unable to connect to a server as I get WSAStartup not called 10093 error code. This is due to the activex test container supporting the control having a different process boundary. The proposed solution seems (and please correct me if I am wrong) to spawn a new thread from the activex control using afxbeginthread and make a connection to the server from this thread. Any comments on whether this will really work ? "High...

Problem Creating Users
Hi All, I create new users under resource but it isnt propagating. I can sign on to that user name but not to the outlook I dont see it in GAL -Exchange 2003 -Not in cached mode -Their are no errors in the even logs I have: manualy updated; dismount/remounted the store Also I noticed under "mailbox rights" all i see is SELF. Usually this selection has a lot more then self and is automatically updated with all the permissions. What is going on with my Active directory/Exchange Server? Thanks Joe The application of permissions to "SELF" is the default behavio...

ActiveX Error in Business Portal
I have just installed Business Portal and when I access the Home page from a Terminal Server client, I receive the following message on a dialog box: An ActiveX control on this page might be unsafe to Interact with other parts of the page. Do you want to allow this interaction? Yes or No After replying yes, the page loads and functions fine. I have tried changing the Zone Settings under Tools >> Internet Options >> Security Internet and Intranet Zones and I can't seen to get rid of this dialog box. Any ideas would be appreciated. Thanks Mark Nabors Is t...

DLookup problem 05-23-07
I have a control on a form that has as its record source the following DLookup =DLookUp("[txtfirstname]","[tblindividual]","[txtmemnumber]=Forms![frmcomplaint].[txtmemnbr]") Although this seems to work when I look at the form in design mode there is an asterix against the control and the message is Invalid Control Property:Control Source and it also says Circular reference. Anyone tell me what might be wrong? Thanks Tony ...

Publisher 98 clip art problems
Whenever I try to put clip art into my Microsoft Publisher 98 documents, I get: ~a shaded box or ~a note asking me to insert my disk. FYI: I have removed and reinstalled many times. I would rather use Publisher 98, rather than 2002 Are you inserting from the Clip Gallery? The Clip Gallery has its own help files with troubleshooting help. It maybe as simple as re-registering. Find ARTGALRY.EXE, it is in a folder similar to this C:\Program Files\Common Files\Microsoft Shared\ARTGALRY. Double-click ARTGALRY.EXE. Did you select run all from my computer when you installed? PUB98: Typical Inst...

Need Help with MFC!!
Hi all, need help esp. with Graphic part. When you right click on any drive on your machine and click properties, you get a tabbed dialog. I want to know how can I embed graphic image (pie chart) into my MFC Dialog? I have written code which displays the Disk Usage right now but don't know how to display that info as a PIE CHART!!!!!! besides what type of MFC Dialog application should I look fwd to build? I want exactly as the DRIVE properties. TIA -- ======== Regards Vai ======== Have you looked at the CDC::Pie method? joe On Wed, 12 May 2004 23:07:11 -0400, "Vai2000"...

Calendar control Excel
I have a calendar control on a userform in excel. I want to put th date from the calendar control into a cell on the spreadsheet. Tha ok, it lets me do one cell, when I try to click on a different cell o the spreadsheet, nothing happens. How can make the cells in th spreadsheet active so I can click on a different cell to use th calendar control to enter another date into a cell. : -- Message posted from http://www.ExcelForum.com Louis, Private Sub Worksheet_SelectionChange(ByVal Target As Range) Calendar1.LinkedCell = Target.Address End Sub Put this in the sheet module. -- Earl Ki...

OnFormat Problem
Hello, I have a report that displays amendments to purchase order line items. Each amended line item has a status. There is code in the OnFormat event of the Detail section that displays a 'Status Description' text field. The code uses a combination of parameters from a background table to decide the contents of the status description. So if there are two records it should display as follows: Status Description 3 New Line Item Added 5 Please treat this item as cancelled My problem is when the two records are to be displayed on the report the Status Description fo...

Viso + word problem
I have version 2003 of both products. In my word document I include network diagrams with visio. I am experiencing a problem. When I edit with vision the diagram is perfect, but when I go back in word I have some of the items that are not displayed at the right place : so the diagram means nothing. I just wonder what is going on. As far as I know I have the last version of the product. Thanks for your advices. FE ...

OMA Problem!
Goodmornig at all! I've a problem with OMA 2003... When I type http://serverip/oma the logon popup appear; I write domainname\username and password and appear this: (see the attach....screenshot.jpg) In the domain controller event viewer I've found this error: Tipo evento: Errore Origine evento: MSExchangeOMA Categoria evento: (1000) ID evento: 1507 Data: 28/07/2004 Ora: 10.16.07 Utente: N/D Computer: DOMAIN Descrizione: Errore sconosciuto durante l'elaborazione della richiesta corrente: Generata eccezione di tipo Microsoft.Exchange.OMA.DataProviderInterface.ProviderExcepti...

MFC to Console.
Hello Group. I need to convert the code of WiniNet Async Demo from microsoft samples from MFC to a console function.. Someone can help me with the changes.. The code is posted here Regards /* Microsoft Corporation Copyright 1999-2002 */ /******************************************************************** ProjectName : AsyncDemo Purpose : This sample demonstrates how to submit two WinInet requests, using InternentOpenUrl, asynchronously. Notes : This sample does not handle any authentication. To properly handle authentication, the functions that handle specific protocols (like Ht...