passing textbox control to vb ocx

Hello all
I am using the vbAccelerator Explorer Bar ocx in mfc app.
the controls is working very fine, but when I tried to use the feature
of passing another activeX control IDISPATCH pointer to the Explorer
Bar ocx it always returns "Type Mismatch" exception.

The code is working great from vb applications, but inside mfc it fails

any ideas how to pass a text box control to the vb ocx?

prompt replies will be so much appreciated

0
hdesouky (5)
8/28/2006 9:27:26 PM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
624 Views

Similar Articles

[PageSpeed] 20

> Hello all
> I am using the vbAccelerator Explorer Bar ocx in mfc app.
> the controls is working very fine, but when I tried to use the feature
> of passing another activeX control IDISPATCH pointer to the Explorer
> Bar ocx it always returns "Type Mismatch" exception.
>
> The code is working great from vb applications, but inside mfc it fails
>
> any ideas how to pass a text box control to the vb ocx?
>
> prompt replies will be so much appreciated

Does vbAccelerator Explorer OCX expect an IDispatch? Did you look at
tlh/tli files to the signature?

---
Ajay

0
ajaykalra (6842)
8/29/2006 12:08:46 AM
It has the following signature
inline void _cExplorerBarItem::PutControl ( IDispatch * * _arg1 )
{
    HRESULT _hr = put_Control(_arg1);
    if (FAILED(_hr)) _com_issue_errorex(_hr, this, __uuidof(this));
}

from the vb code it expects a VB Control object

Ajay Kalra wrote:
> > Hello all
> > I am using the vbAccelerator Explorer Bar ocx in mfc app.
> > the controls is working very fine, but when I tried to use the feature
> > of passing another activeX control IDISPATCH pointer to the Explorer
> > Bar ocx it always returns "Type Mismatch" exception.
> >
> > The code is working great from vb applications, but inside mfc it fails
> >
> > any ideas how to pass a text box control to the vb ocx?
> >
> > prompt replies will be so much appreciated
>
> Does vbAccelerator Explorer OCX expect an IDispatch? Did you look at
> tlh/tli files to the signature?
> 
> ---
> Ajay

0
hdesouky (5)
8/29/2006 12:13:56 AM
Reply:

Similar Artilces:

Outlook smtp activity control
Hi there! Is there any way to control smtp activity of MSOutlook 2000/XP? I wish to recive simple report about sent messages (topic, attachment's name, time etc.). There is no MSExchange server, or any other on-site smtp server to control it unfortunatelly. Can MSO generate such reports? -- Grendel Grendel <antispam@op.pl> wrote: > Is there any way to control smtp activity of MSOutlook 2000/XP? I > wish to recive simple report about sent messages (topic, attachment's > name, time etc.). There is no MSExchange server, or any other on-site > smtp server to contr...

Formula
Hi all, I am preparing an exam marksheet. In one cell, I add in this formula to check if a student pass or fail the whole exam. Condition ... the students must not get any "E" to pass the whole exam. =IF(OR(E7="E",G7="E",I7="E",K7="E",M7="E",O7="E",Q7="E",S7="E",U7="E",W7="E" ,Y7 ="E",AA7="E",AC7="E",AE7="E"),"Fail","Pass")) Now I want to change to another condition. The students must not get any "E", or "D&...

Controlling A Window 7 Box From XP
Hi, Is it possible to control a Windows 7 box (a media server) from an XP box? The XP laptop acts as the keyboard and monitor for the Windows 7 box over a wireless LAN. It would be helpful if the Windows 7 box boots in the needed state. Thanks, Gary If no answer here try the Win7 forum: http://social.technet.microsoft.com/Forums/en-US/category/w7itpro "Abby Brown" <abbybrown@charter.net> wrote in message news:eCZWYmqTLHA.784@TK2MSFTNGP02.phx.gbl... > Hi, > > Is it possible to control a Windows 7 box (a media server) from an XP box? >...

How do you add event handlers for controls generated with xsl?
For ASP.Net/C Sharp I have an XML file and an associated XSL file. I am using the System.Web.UI.Controls.Xml control to render the resulting HTML. This seems to work fine with one slight drawback. I cannot seem to find a way to attach to the events generated by controls generated by the XSL transformation. I have tried the FindControl on the page, but it does not find the control. There must be something I am doing wrong because I connat seem to find the answer. Any assistance with this will be greatly appreciated. ================================================================== The f...

Controlling a WHERE with a checkbox
I have a query like: SELECT tbl1.fiel, tbl1.field FROM ((tbl1 LEFT JOIN tbl3 ON tbl1.coID = tbl3.ID) LEFT JOIN tbl2 ON tbl1.field= tbl2.field) LEFT JOIN tbl4 ON tbl3.ID = tbl4.field WHERE ((tbl4.field) Is Null) I would like to do the following. When Forms!Form1.checkbox is checked, then the WHERE clause is applied When Forms!Form1.checkbox is NOT checked, then there is no WHERE restriction How do I rewrite the SQL to do that? Thank you, John SELECT tbl1.fiel, tbl1.field FROM ((tbl1 LEFT JOIN tbl3 ON tbl1.coID = tb...

Subform shows over control set to bring to front.
I have a text box and a rectangle filled in. I also have a subform that I wish to be behind the text box and rectangle until called. Subform is set modal=no, popup=no. Problem is: Even sending subform to back and controls to front....the subform always shows through. Is there a way to resolve? Or do I have to make all subforms invisible until called? -- Thanks for your help, Chris ...

Tooltps for controls over groupbox in dialog/view.
When I placed controls over groupbox in a dialog/View. (Message TTN_NEEDTEXT handled, overridden OnToolHitTest function). If groupbox id is IDC_STATIC what ever be the tab order tool tips are coming. when I change group box id to other than IDC_STATIC tool tips are coming only if all controls placed over group box have less tab order than that of group box. What is the reason for this behaviour? I have a requirement where group box (id will not be IDC_STATIC) will have background color( fills entire group box area), in this case we need tool tips also. When all controls over group box have ...

Clear Comboboxes & Textboxes
Hi, I have a userform containing various VBA controls such as comboboxes, listboxes and check boxes. I want to provide the option for a user to clear the form. I have tried the below code but get an error message stating 'Compile error - Sub or Function not defined' Please can anyone tell me where I am going wrong with this? Command Button Code - Private Sub cmdbuttonClear_Click() Call frmDataEntry_Initialize End Sub Thanks for any help, Mickey Try using the Command Button with the code like Private Sub CommandButton1_Click() ComboBox1 = "" TextBox1 = "...

how to program to open other users inbox (VB)
I have an inbox that gets messages regularly. The inbox is never opened. I need a process that logs into that inbox, saves the attachmnets and then moves the messages to another folder. I can do the below code on my inbox - but can't figure out how to specify another inbox. I can not set up another profile. I just need to specify the user/password information and have it open that box. I am open to MAPI, or CDO.. or any way to do this. Thanks Stacey Dim oOutlook As Outlook.Application Dim oNs As Outlook.NameSpace Dim oFldr As Outlook.MAPIFolder Dim oMessage As Object Dim sPathName A...

Access-Forms-VB links
After years in software development/database programming mostly on Unix/Oracle I'm tasked to change some Access forms to use redesigned tables. I'm having trouble with the relationship between forms and VB. For example I'm looking at some VB code that frequently references the Me class which I assume to be the default reference to the current (form) class (like this in C++), but I can't see how/where the class is actually defined. Can someone please provide some links that provide concise explanations of the relationship between Access and VB. My googling has only turned up pag...

Passing XML as XsltArgumentList, can't select children
I have seen the postings about passing XML into an XSL transformation. The problem is that I cannot use any XPath navigation in the XSL that won't generate an error. If I use <xsl:copy-of select="$var"/> then the XML is output into the html page but this <xsl:copy-of select="$var/NS:Child"/>, and all other XPath navigation, fails with the error that 'The expression passed to this method should result in a NodeSet'. The real goal is to use xsl:for-each to navigate over all $var's children but can't get it to work. I have seen the samples and ...

control autocorrect
I have lost of AutoCorrect shortcuts in Excel 2003. On ocassion I will type in an autocorrect shortcut and no want the autocorrect to occur. In Word all you have to do is press the Undo icon and the entry reverts back to the un-autocorrected entry. When you do this in Excel it simply removes the entry altogether. Question: Is there any way to enter an item that is on the autocorrect list and not have the autocorrect work short of turning off autocorrect before entering the item? Thanks, Will I have a solution to undoing autocorrect in Excel. 1. Before typing anything into...

VB to have first letter Capital Question
I'm using a data input form to add records to my table. I'm collecting address information and want the first letter of each word to be capital in the address field. I searched this site and found some code the would accomplish this however when I use it, I get errors. I'm wondering if it is because the address contain numberic values, then a street name followed by Street, Lane, Blvd. etc. Can you take a look at this and see why it is generating an error.. Private Sub CHAPADD_AfterUpdate() If StrComp(Me!txtCHAPADD, LCase(Me!Text), 0) = 0 Then Me!txtCHAPADD = StrConv...

Ribbon: Controling Which Tab Shows With Each Form
Need a way other than using Sendkeys in the Form_Activate event. To display a certain ribbon tab with a particular form. Using the keyboard Alt key shows the keyboard shortcut to click individual ribbon tabs. When the ribbon is loaded a ribbon object is created which allows you to invalidate the ribbon or a control on it. Contextual Tab's is not the answer because 4 of the 5 TAB's on the Ribbon have groups of forms that should have a specific ribbon Tab displayed. -- Thanks Tom Tom, Have a look at www.accessribbon.com maybe you can find an answer there... -- Maurice Ausum ...

Unexpected WM_MOUSEMOVE after double click in list control
Hello I have a view with two child windows. One of them is a list control and the other is a CWnd derived class (my own control). Both list and my control have the same size and position but only one of them is visible at the time. For example, when I double click the list item the list hides itself and my control shows up. All this happens inside WM_NOTIFY event handler (NM_DBLCLK). So the list of events goes like this: - double click event handler goes off - list hides itself - my control shows up (here's the end of NM_DBLICK event handler call) - on mouse move event handler goes off...

Film strip control
Is there a film strip control for MFC? If so, which one would you recommend? What do you mean by Film strip, what does a film strip control do? AliR. "Charles Tam" <CharlesTam@discussions.microsoft.com> wrote in message news:323F5284-11E5-4E2D-99A7-D6869B6D6739@microsoft.com... > Is there a film strip control for MFC? If so, which one would you > recommend? If you're looking for something like: http://www.codeproject.com/KB/web-image/CatalogViewPhotoGallery.aspx?df=100&forumid=226590&exp=0&select=1487087 I've never seen one, but there is...

Need a free VB compiler.
hi do anyone give me a VB DLL compiler? I want to move VBA code into a VB DLL use with MS Excel. thanks. You will need to buy a full copy of VB. -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Cactus" <zhanglihome [at] 21cn [dot] com> wrote in message news:uG8sZJgYGHA.4652@TK2MSFTNGP04.phx.gbl... > hi > > do anyone give me a VB DLL compiler? > I want to move VBA code into a VB DLL use with MS Excel. > > > thanks. No more choice? "Bob Phillips" <bob.phillips@notheretiscali.co.uk> > You will need ...

looking for tab control in ASP.NET
Hi, I'm looking for a nice tab control in ASP.NET. I have seen the tab control MS user in their CRM and it was really impressive. Does anybody know where to find a good one? Something like the Internet Explorer WebControls but probably "still supported". Thank you for your help Daniel Try: http://www.asp.net/IEWebControls/Download.aspx?tabindex=0&tabid=1 You will have to compile the web controls now (previous incarnations included a compiled version). I imagine that the tab control will be an intregal part of the next version of ASP.NET, so the MS version (at the a...

Adding via a textbox
HYCH Have a form with 7 Textboxes on ranging from Textbox 1 to textbox 7 Have an 8th textbox that i would like to display the total of all numbers entered into the textboxes as i go, is this possible? Did try the following Textbox8.value = textbox1.value + textbox2.value This only displayed the numbers i typed i.e. Textbox1 (entered a '1') and Textbox2 (Entered a '2') the value in textbox 8 was displayed as 12 rather than 3 Any advice wpuld be appreciated. Steve Try: Textbox8.value = Val(textbox1.value) + Val(textbox2.value) + -- Jim "Steve" <instruct...

Formatting numbers in a TextBox
I have a form with several subforms. Some of the subforms have TextBoxes for which numeric data will be entered. I'd like to format the way such data shows up after the user hits <Enter> such that: 1. All decimal places typed in are shown but no terminal zeros are displayed. 2. All numbers less than 1 show a leading zero. 3. All integer entries do not display a decimal point. Examples: If 1.250 is entered, then 1.25 is displayed. If .25 is entered, then 0.25 is displayed. If 12.00 is entered, then 12 is displayed (no decimal point). If 12.0010 is entered, then 12.001 is dis...

Tree Control bug in CPropertyPage on XP???
I have a CTreeCtrl in a CPropertyPage on XP... everything using themes. I noticed that if I popup a window over the tree control and then click on the tree control itself, all sorts of funky painting problems happen with the tree control. After ripping my hair out, I noticed that if I remove the TVS_DISABLEDRAGDROP style, it starts painting correctly again, but then I get the weird drag/drop behavior that is all funky. Anyway to disable the drag & drop and have things paint correctly? Even if I put WS_CLIPCHILDREN on the CPropertyPage, it still doesn't fix the problem. ...

Qucik Access Toolbar not showing custom controls
Hi All, I'm having a problem with the QAT in access 07 I'm trying to add custom buttons via XML, and not having any luck. I can populate the QAT with IDMSO controls, but when I use a custom id button it doesn't show in the QAT bar. Below is a sample code I have been working with, the Copy and Paste buttons will show up but not the Test button. <customUI xmlns="http://schemas.microsoft.com/office/2006/01/ customui"> <ribbon startFromScratch="true"> <qat> <documentControls> <button id="Test1" label=&q...

Code signing an activeX control
Hi, I have developed an activex control and signed it using signcode.exe from Microsoft and a certificate from VeriSign. Then I upload the .ocx file to my webpage using an <object> tag to my When I run the webpage through a client machine it asks if I want to download the signing component and i click Yes. But i does not work... I have found this error message in the file, [2004/12/23 14:58:03 7052.4] Copying file C:\DOCUME~1\SIEBEL~1\LOCALS~1\Temp\2\ICD1.tmp\MyPlugin.ocx to C:\WINNT\Downloaded Program Files\MyPlugin.ocx. An unsigned or incorrectly signed file (C:\DOCUME~1\SIEBEL~1...

Problem with transform XSL that incude asp.net controls and validation controls!!!!
Please help me. I have problem with transform xml Protected WithEvents GeneralXMLWeb As System.Web.UI.WebControls.Xml Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Dim xmldoc As New XmlDocument() xmldoc=result of Function() * GeneralXMLWeb.Document = xmldoc Dim treeView As XslTransform = New XslTransform() treeView.Load(Server.MapPath("file.xslt")) GeneralXMLWeb.Transform = treeView ---------------------------------------------------------------------------- ---------------------------------------- ("file.xslt&qu...

Custom owner-drawn controls
Hi guys! I'm having a bit of trouble with my owner-drawn custom controls in MFC. If there are other control on top of my custom controls, they are hidden. How can I fix this? Should I use GetNextWindow in OnPaint and tell all the controls to draw themselves? Or is there another way? or maybe i'm doing something wrong here... Any idea appreciated, Thanks What do you mean by other controls on top of my control? Sibiling controls should not overlap each other, if a control is supposed to overlap another control, then the control that is on top should be a child of the control bel...