PB with OCX control integrated in Dialog in a DLL MFC project

Hi all,

I develop a DLL MFC using VStudio 7.0.
As soon as i integrate an OCX control in a dialog ressource, the CDialog 
object linked to this ressource doesn't load. I try modal and modless 
methods, Nothing happens.
Is there an option i've forgotten?

Please help

!
0
Flora (2)
6/2/2005 3:15:42 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
610 Views

Similar Articles

[PageSpeed] 14

Is the control properly registered?  Does it require a license? Has 
AfxEnableControlContainer been called?

In article <7E9200A5-922F-403C-A33C-2118B318E0D9@microsoft.com>, 
Flora@discussions.microsoft.com says...
> Hi all,
> 
> I develop a DLL MFC using VStudio 7.0.
> As soon as i integrate an OCX control in a dialog ressource, the CDialog 
> object linked to this ressource doesn't load. I try modal and modless 
> methods, Nothing happens.
> Is there an option i've forgotten?
0
6/2/2005 9:10:56 PM
Hi,
I have Inserted the AfxEnableControlContainer in the initInstance function. 
When i call the DoModal function with the dialogbox containing the OCX 
control, there is a pb in Line 410 in OCCMGR.Cpp, pTemp->m_Hwnd == NULL...

The OCX control is properly registered (It runs in dialog box inserted in an 
EXE on the same environnement XP pro). It requires a licence.

"Scot T Brennecke" wrote:

> Is the control properly registered?  Does it require a license? Has 
> AfxEnableControlContainer been called?
> 
> In article <7E9200A5-922F-403C-A33C-2118B318E0D9@microsoft.com>, 
> Flora@discussions.microsoft.com says...
> > Hi all,
> > 
> > I develop a DLL MFC using VStudio 7.0.
> > As soon as i integrate an OCX control in a dialog ressource, the CDialog 
> > object linked to this ressource doesn't load. I try modal and modless 
> > methods, Nothing happens.
> > Is there an option i've forgotten?
> 
0
Flora (2)
6/7/2005 6:47:01 AM
Reply:

Similar Artilces:

Get list of Deliverables for an Enterprise Project
I want to get back a list of Deliverables for the active Enterprise Project. There is the command DeliverablesGetByProject(string projectGuid). I can get the Project's GUID (GetServerProjectGid), however after the call, I get the exception Run-time error '438': Object doesn't support this property or method What's the right way to get the list of deliverables on this project? Thank you. You probably want to post this to the Developer group. - Andrew Lavinsky Blog: http://blogs.catapultsystems.com/epm > I want to get back a list of Deliverables ...

PB 6.0 on Windows 7
I have upraded my hardware, now running Windows 7. Since the PB 6.0 runs only in VS2005, I need to install VS2005 on Windows 7. I ran the setup.exe from an account with administrative rights. But the installer always fails with: Error 1723. There is a problem with this Windows Installer package. A DLL required for this install to complete could not be run. Contact your support personnel or package vendor. Do I have to stick on Windows XP to use the Platform Builder? Helge I don't know... However, it may be that you must run "As Administrator." Right ...

Locked Macro Project
I have an Excel workbook that has been around since the Office 95 days. I am currently using Office 2003 and the workbook contains a number of macros in a macro project. I have created a "Self Sign" Digital Certificate for VBA projects that I have successfully used to sign the macros in other workbook files. When I sign the macros in this specific workbook file, all seems to go well (no error or warning messages) but if I save the signed file, close and re-open it, I can no longer open the macro project. When I open VB editor and attempt to check the properties of the project...

Html control embedded
Hi, I am developping with MFC on Windows Mobile platforms and I have some questions about embedding a HTML control inside a control. Here is the sample code I wrote : BEGIN_MESSAGE_MAP(CHtmlWnd, CWnd) ON_WM_WINDOWPOSCHANGED() END_MESSAGE_MAP() int CHtmlWnd::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CWnd::OnCreate(lpCreateStruct) != 0) { return -1; } Init(); return 0; } void CHtmlWnd::PreSubclassWindow() { Init(); } void CHtmlWnd::Init() { if (m_bInited == true) return; if (m_HtmlViewInstance == 0) { m_HtmlViewInstance = ::LoadLibrary(L"htmlview.dll"...

Default height for Edit Control in Dialog Editor
When using the Dialog Editor, the default size for the Edit Control is 40x14. The font size for the dialog is MS Shell Dlg(8) At run time, the edit control height is too big Is there any way I can set the default Edit Control height to 12 I know that I can 'resize' the Edit Control when I'm generating the dialog or I can manually edit the .rc file to change all the EDITTEXT height values, but there must be a way to change the default 40x14 to 40x12 Thanks... ...

GP 10.00 User Secury for Project Accounting
Hi All, How can I grant user access to view Project Accounting Batch ID lookup during PA Billing Transaction? ...

memory leak in webbrowser control
I am using a webbrowser control to render an html page that uses vml and xml. My code changes the html page by locating an id in the page and changing a style, text, or vml attribute. Every time I do this, there is an increase in memory usage and eventually the program crashes when there is no more memory. I originally used a CString's AllocSysString function to get my BSTR's and com smart pointers. When I switched to 'regular' pointers and used AddRef and Release, I saw some improvement, and more improvement when I switched to SysAllocString and SysFreeString. But...

Error accessing control when form not open
On a form when trying to get a value from a field it displays Run-time error 2450 when the form is not open. In this case instead of displaying the error how can I get a value from a control on a different form? You can only get a value from an open form that is displaying that value. Just refer to the control on the open form: [Forms]![OtherForm]![Text1] Use DLookup to get a value from an underlying table. The form does not need to be open. -- Arvin Meyer, MCP, MVP http://www.datastrat.com http://www.mvps.org/access http://www.accessmvp.com "Robin9876" <robin9876@hotmail....

Rename ActiveX control
Hi, I have an old ActiveX control that has been modified significantly for one of my applications. Unfortunately, another application that uses the ActiveX cannot be recompiled to use the modified ActiveX control and want to rename the modified control which my application will use. I remember years back that there were steps to do this. Does anyone know the steps to do this or where I can find them? On Jun 6, 12:17 pm, Tom <T...@discussions.microsoft.com> wrote: > Hi, I have an old ActiveX control that has been modified significantly for > one of my applications. Unfortu...

Adding new interface to activex control
I have added a new interface to my activex control (ACEvt) I have modified the odl file, and added the necessary BEGIN_INTERFACE_MAP, BEGIN_DISPATCH_MAP etc.... in the class implementation file. [ uuid(BED02315-567E-4a5d-A56B-5F00F228E041)] dispinterface ICount { properties: methods: }; [ uuid(7C39BF1F-66DE-423e-B526-87626D80AE4D)] coclass Count { [default] dispinterface ICount; }; When I try to call CoCreateInstance and QueryInterface, i'm getting E_NOINTERFACE error. IUnknown *pUnk = NULL; HRESULT hr = CoCreateInstance(CLSID_ACEvt,NULL,CLSCTX_ALL,IID_IUnknown,(void **)&pUnk);...

PB Swiss PB-6400/6 Multicraft Screwdriver for TORX Screws Size 6
Price:$6.99 Image: http://specialdealfinder.info/image.php?id=B001D2S3TO Best deal: http://specialdealfinder.info/index.php?id=B001D2S3TO Screwdrivers for Torx screws, sizes 27 - 55 with hexagon portion. Includes 3x110 PB Swiss Tools has been developing and manufacturing hand-held tools for professionals and craftsmen who insist on the highest of standards in Emmental, Switzerland, for 130 years. We continually put our leadership in terms of quality and power of innovation to the test in our new products, standard products and customer-made productions. The needs of users and the demand...

How to sizing a control
At design time when I resize a control the size is shown in the status bar but in dialog unit (DLU). How can I adjust the control in the size of pixels? Thanks. Alan wrote: > At design time when I resize a control the size is shown in the status bar > but in dialog unit (DLU). How can I adjust the control in the size of pixels? > Thanks. http://groups.google.com/groups?q=Convert+Dialog+Units+to+Pixels&ie=UTF-8&hl=en&btnG=Google+Search Have fun. Basically, you can't, because there is no way at design time to know how many pixels will be used. It will vary from ma...

Send Key-Messages to embedded OCX
Hi, I have an VB6 OCX which is embedded in a MFC dialog. The OCX normally handles some Key-events, but they never receive in the OCX. I think, that the MFC dialog catches the events. How can I send the messages from the MFC dialog to the embedded OCX? Thanks Christian ...

Video control
Hi. I have a .mp4 video in a Windows 7 / Powerpoint 2003 presentation and it shows OK. I need to control the motion of the video: play, stop, rewind, etc. Is there a way? Thanks Martins .... a slider would be nice. I found it but I don't know how to connect it to the video. I can't find any reference about that ... may be it is not intended for that purpose. Martins You can't do that in PPT 2003. That function is available in 2010, which should be available sometime this summer. "Martins" wrote: > .... a slider would be nice. I found it but...

PB license
Hi all, yesterday, after months of a regular runs, PB60 told me that the 180 days evaluation period has expired. But it has a complete license !!! Is there a way to validate it without reinstalling? In the case, do i need to uninstall vs2005, ce and pb and then reinstall them? -- SteM ...

Creating an IE style Menu bar using a hybrid api ocx
Is it possible to create an ie style Menu bar using a either a hybrid of api and common controls ocx or pure api? here is the code I have tried to use: You will need one common controls 5 ToolBar on the form. Option Explicit Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long Private Declare Function RegisterWindowMess...

Integrating Macromedia Content
Is there a graceful way to integrate Macromedia Flash content in Publisher? I tried using "Insert -> Object" but it does not seem to work. I was able to put HTML code and make it work, but I had to manually copy the shockwave file itself - which is quite a problem. Does any1 have any suggestions Thank Regard Nikhi ...

Mapping Controls to External Variables
I am in the process of developing an application which uses nested splitters to create three separate view panes. One pane uses a CFormView, which contains a property sheet with several property pages. The controls on these property pages will alter various program settings. My application has a menu, and I plan on handling those commands in my CMainFrame class. These menu items need to know about the various program settings that the CFormView controls are in charge of. My problem is this: I would like to keep only one set of these settings around, and I'd like to keep them in the CMainF...

ActiveX control question...
Hi, I'm working on an ActiveX control project (created with the MFC ControlWizard) and I'm encountering a difference I can't understand. I use VB 6.0 to test out my control and I noticed that if I view the control class itself (derived from COleControl) I can view any of the object's properties through the VB 6.0 debugger. However if I create an additional automation object in my control (derived from CCmdTarget) I cannot see any properties through the VB 6.0 debugger, however the object behaves correctly and Intellisense sees them fine when not debugging. When viewing the o...

How to resize custom control
Hello, I have got a dialog with a custom control, which I would like to resize dynamically. I tried MoveWindow and it does not work somehow. Does anyone know how to do this? A special property has to be assigned in the resource editor? Cheers Pshemek przemyslaw.sliwa@gazeta.pl wrote: > Hello, > > I have got a dialog with a custom control, which I would like to > resize dynamically. I tried MoveWindow and it does not work somehow. > Does anyone know how to do this? A special property has to be assigned > in the resource editor? Pshemek: You should be able to resize any ...

MFC, Threads, PostMessage, and Reentrant WindowProc
Help!!!! I am struggling trying to cope with thread problems in a MFC app. Due to MFC not being thread-safe, I am using PostMessage to dispatch processing to the main thread in cases where I would otherwise run into problems - for example when I actually want to draw something on the screen. This generally seems to work, but I can get deadlocks sometimes in the main thread for no apparent reason. I am using Visual C++ and I can examine each thread in the debugger when a deadlock occurs. There is no apparent resource cycle - just a normal lock in the main thread following on after a PostM...

Custom Control in a Repeater
Hi, I am trying to use a custom control inside a repeater. On Post back I'm trying to access the custom control like this: MyCControl tempControl = (MyCControl) MyRepeater.FindControls("mycontrolId"); But on compiling I get the error that the type or namespace 'MyCControl' can not be found. I'm sure I'm doing something really dumb, can any one point to what I'm missing? Thanks for your help. Thnx ...

Microsoft CRM integrated with SAP Business One
I am salesmanager for an organization who has implemented SAP Business One. We wold like to use Microsoft CRM/Outlook as our Customer system. Has anyone done any integration? Hi Nils, I-Bolt is definetely something to consider when integrating Biz One with MS CRM. It is a certified SAP development tool that helps integrate third party CRM solutions with Biz One. I know a SAP Business One Dev Partner in the USA working with I-Bolt who can integrate with MS CRM. Feel free to contact me for further info. Mal De Silva mdesilva@softwareadditions.com "Nils Roald" wrote: > I...

continues form controls textbox
Hello all Expert I want to set value of textbox control of continues form from different form Thank.. ...

Control de Print Dialog Control
Hi, I've been searching on the web for a tip to help me control the event when OK Button is pressed for the Print dialog box. I need to get the number of copies selected, and the printer, as well. Any help would be greatly appreciated. -- Edgar Rey Check out the DoCmd.PrintOut method in the VBA help file... this should give you the options you are looking for. The PrintOut method prints the active database object, so, if printing a report, you need to make sure the report is open an selected before invoking the method. The code behind your OK button's click event...