accessing ActiveX control enums in MFC

I have an ActiveX contol whose tlb (using OLE/COM viewer) shows 

// There are a couple of more of these, but this is typical example
typedef enum {
        RF_MCS86 = 1,
        RF_BINARY = 2,
        RF_ASCII_BINARY = 3
    } EROMFormat;

This enum is accessed from another function from within the control as
STDMETHOD Func(SAFEARRAY **Ptr, EROMFormat Fmt, Long * Retval)

I have dropped the control onto my form and MFC has generated the
wrappers for the methods except for the ones having SAFEARRAY
arguments


Now, not only does MFC not generate the function because of the
familiar
// method 'Func' not emitted because of invalid return type or
parameter type

but even if I do manage to call it (I am thinking of using
InvokeHelper) I don't know how I can reference the enum from the tlb.

Any help on how to do this efficiently would be greatly appreciated.
Thanks in advance !
- Kamath.
0
1/5/2004 9:12:17 PM
vc.mfc 33608 articles. 0 followers. Follow

5 Replies
1633 Views

Similar Articles

[PageSpeed] 55

"Kamath" <p_v_kamath@hotmail.com> wrote in message
news:2fe53f0d.0401051312.749f92e3@posting.google.com...
> I have an ActiveX contol whose tlb (using OLE/COM viewer) shows
>
> // There are a couple of more of these, but this is typical example
> typedef enum {
>         RF_MCS86 = 1,
>         RF_BINARY = 2,
>         RF_ASCII_BINARY = 3
>     } EROMFormat;
>
> This enum is accessed from another function from within the control as
> STDMETHOD Func(SAFEARRAY **Ptr, EROMFormat Fmt, Long * Retval)
>
> I have dropped the control onto my form and MFC has generated the
> wrappers for the methods except for the ones having SAFEARRAY
> arguments
>
>
> Now, not only does MFC not generate the function because of the
> familiar
> // method 'Func' not emitted because of invalid return type or
> parameter type
>
> but even if I do manage to call it (I am thinking of using
> InvokeHelper) I don't know how I can reference the enum from the tlb.
>
> Any help on how to do this efficiently would be greatly appreciated.
> Thanks in advance !
> - Kamath.

Enums are not defined when the wrappers are generated. I think that this is
a serious flaw of the VC6 env. And, when it doesn't know how to wrap a type
(like methods taking enums as parameters, or sometimes other types), the
functions are not generated.

The only way I know of, to have the enums defined, and all methods exposed,
is to use #import.
For instance, in stdafx.h you would #import the activex component. This
introduces the enum-definitions, interface-definitions, GUID definitions for
component/interface/library etc.
Example. Your activex component is a dll called 'YourActiveXCtrl.ocx'. In
your stdafx.h, place this line at the bottom:
    #import "YourActiveXCtrl.ocx" no_namespace named_guids
This introduces the enums,interface,definitions,... in stdafx.h, which is
then visible to the rest of the application (by including stdafx.h).
When you compile your project, two files are generated: YourActiveXCtrl.tli
and YourActiveXCtrl.tlh. Check these. They should show all enums, and
declares the interfaces etc.

One problem is that when you use the com interfaces you have to program
using com/atl stuff. No more wrapping & other.
I can think of one solution. Use the wrappers, _and_ import the activex
component. The wrappers are COleDispatchDriver derived, and host the
IDispatch interface of the ativex control. Any interace pointer should allow
a query to another interface the object supports. So you can use the
wrappers to satisfy the resource editor, and use the interface pointer to
execute methods that are not wrapped. Example:

Your wrapper definition is something as follows:
class CYourActiveXCtrl : public COleDispatchDriver
{ /*...*/ };
The IID of your activex component interface is IID_IYourActiveXCtrl, the
interface is IYourActiveXCtrl.
You have a variable of CYourActiveXCtrl , called m_TheControl.
Then the following should give you the interface pointer you need:

    IYourActiveXCtrl* pYourActiveXCtrl = NULL;
    HRESULT hr = m_TheControl.m_lpDispatch->QueryInterface(
                IID_IYourActiveXCtrl ,
                reinterpret_cast<LPVOID*>(&pYourActiveXCtrl)
    );
    if( SUCCEEDED(hr) )
    {
        /* ... Execute the method not wrapped using pYourActiveXCtrl */
        pYourActiveXCtrl->Release();
    }

HTH,
Tom.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


0
1/6/2004 12:08:07 AM
"TT (Tom Tempelaere)" <_N_OSPAMtiti____@hotmail.comMAPSO_N_> wrote in
message news:H%mKb.116979$UG6.5442630@phobos.telenet-ops.be...
> "Kamath" <p_v_kamath@hotmail.com> wrote in message
> news:2fe53f0d.0401051312.749f92e3@posting.google.com...
[...]
> > This enum is accessed from another function from within the control as
> > STDMETHOD Func(SAFEARRAY **Ptr, EROMFormat Fmt, Long * Retval)
> > I have dropped the control onto my form and MFC has generated the
> > wrappers for the methods except for the ones having SAFEARRAY
> > arguments
> > Now, not only does MFC not generate the function because of the
> > familiar
> > // method 'Func' not emitted because of invalid return type or
> > parameter type
> > but even if I do manage to call it (I am thinking of using
> > InvokeHelper) I don't know how I can reference the enum from the tlb.
> > Any help on how to do this efficiently would be greatly appreciated.
> > Thanks in advance !
> > - Kamath.

> Enums are not defined when the wrappers are generated. I think that this
is
> a serious flaw of the VC6 env. And, when it doesn't know how to wrap a
type
> (like methods taking enums as parameters, or sometimes other types), the
> functions are not generated.
>
> The only way I know of, to have the enums defined, and all methods
exposed,
> is to use #import.
> For instance, in stdafx.h you would #import the activex component. This
> introduces the enum-definitions, interface-definitions, GUID definitions
for
> component/interface/library etc.
> Example. Your activex component is a dll called 'YourActiveXCtrl.ocx'. In
> your stdafx.h, place this line at the bottom:
>     #import "YourActiveXCtrl.ocx" no_namespace named_guids
> This introduces the enums,interface,definitions,... in stdafx.h, which is
> then visible to the rest of the application (by including stdafx.h).
> When you compile your project, two files are generated:
YourActiveXCtrl.tli
> and YourActiveXCtrl.tlh. Check these. They should show all enums, and
> declares the interfaces etc.
>
> One problem is that when you use the com interfaces you have to program
> using com/atl stuff. No more wrapping & other.
> I can think of one solution. Use the wrappers, _and_ import the activex
> component. The wrappers are COleDispatchDriver derived, and host the
> IDispatch interface of the ativex control. Any interace pointer should
allow
> a query to another interface the object supports. So you can use the
> wrappers to satisfy the resource editor, and use the interface pointer to
> execute methods that are not wrapped. Example:
>
> Your wrapper definition is something as follows:
> class CYourActiveXCtrl : public COleDispatchDriver
> { /*...*/ };
> The IID of your activex component interface is IID_IYourActiveXCtrl, the
> interface is IYourActiveXCtrl.
> You have a variable of CYourActiveXCtrl , called m_TheControl.
> Then the following should give you the interface pointer you need:
>
>     IYourActiveXCtrl* pYourActiveXCtrl = NULL;
>     HRESULT hr = m_TheControl.m_lpDispatch->QueryInterface(
>                 IID_IYourActiveXCtrl ,
>                 reinterpret_cast<LPVOID*>(&pYourActiveXCtrl)
>     );
>     if( SUCCEEDED(hr) )
>     {
>         /* ... Execute the method not wrapped using pYourActiveXCtrl */
>         pYourActiveXCtrl->Release();
>     }

You could also use the dispatch interface directly, and call Invoke for the
method. But the parameter wrapping is ugly and clumpsy (imho). The dispatch
interface was designed for automation, not for direct use. I suggest that
you use the real interface.

Tom.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


0
1/6/2004 12:20:58 AM
"TT (Tom Tempelaere)" <_N_OSPAMtiti____@hotmail.comMAPSO_N_> wrote in
message news:H%mKb.116979$UG6.5442630@phobos.telenet-ops.be...
> "Kamath" <p_v_kamath@hotmail.com> wrote in message
> news:2fe53f0d.0401051312.749f92e3@posting.google.com...
> > // There are a couple of more of these, but this is typical example
> > typedef enum {
> >         RF_MCS86 = 1,
> >         RF_BINARY = 2,
> >         RF_ASCII_BINARY = 3
> >     } EROMFormat;
> > This enum is accessed from another function from within the control as
> > STDMETHOD Func(SAFEARRAY **Ptr, EROMFormat Fmt, Long * Retval)
> > I have dropped the control onto my form and MFC has generated the
> > wrappers for the methods except for the ones having SAFEARRAY
> > arguments
> > Now, not only does MFC not generate the function because of the
> > familiar
> > // method 'Func' not emitted because of invalid return type or
> > parameter type
> > but even if I do manage to call it (I am thinking of using
> > InvokeHelper) I don't know how I can reference the enum from the tlb.
> > Any help on how to do this efficiently would be greatly appreciated.
> > Thanks in advance !
> > - Kamath.

> Enums are not defined when the wrappers are generated. I think that this
is
> a serious flaw of the VC6 env. And, when it doesn't know how to wrap a
type
> (like methods taking enums as parameters, or sometimes other types), the
> functions are not generated.
>
> The only way I know of, to have the enums defined, and all methods
exposed,
> is to use #import.
> For instance, in stdafx.h you would #import the activex component. This
> introduces the enum-definitions, interface-definitions, GUID definitions
for
> component/interface/library etc.
> Example. Your activex component is a dll called 'YourActiveXCtrl.ocx'. In
> your stdafx.h, place this line at the bottom:
>     #import "YourActiveXCtrl.ocx" no_namespace named_guids
> This introduces the enums,interface,definitions,... in stdafx.h, which is
> then visible to the rest of the application (by including stdafx.h).
> When you compile your project, two files are generated:
YourActiveXCtrl.tli
> and YourActiveXCtrl.tlh. Check these. They should show all enums, and
> declares the interfaces etc.

If your activex control has Fonts or Pictures in the interface (property or
parameter of a method), you'll have to do a little trick to make it compile.
Check following KB article (224610):
http://support.microsoft.com/default.aspx?scid=kb;en-us;224610
Otherwise the compiler complains about unkown FontPtr and/or PicturePtr.

> One problem is that when you use the com interfaces you have to program
> using com/atl stuff. No more wrapping & other.
> I can think of one solution. Use the wrappers, _and_ import the activex
> component. The wrappers are COleDispatchDriver derived, and host the
> IDispatch interface of the ativex control. Any interace pointer should
allow
> a query to another interface the object supports. So you can use the
> wrappers to satisfy the resource editor, and use the interface pointer to
> execute methods that are not wrapped. Example:
>
> Your wrapper definition is something as follows:
> class CYourActiveXCtrl : public COleDispatchDriver
> { /*...*/ };
> The IID of your activex component interface is IID_IYourActiveXCtrl, the

Actually, you must use the DIID of your dispatch interface:
    DIID__DYourActiveXCtrl

> interface is IYourActiveXCtrl.

The interface is _DYourActiveXCtrl.

> You have a variable of CYourActiveXCtrl , called m_TheControl.
> Then the following should give you the interface pointer you need:
>
[...]

    _DYourActiveXCtrl* pYourActiveXCtrl = NULL;
     HRESULT hr = m_TheControl.m_lpDispatch->QueryInterface(
                 DIID__DYourActiveXCtrl ,
                 reinterpret_cast<LPVOID*>(&pYourActiveXCtrl)
     );
     if( SUCCEEDED(hr) )
     {
         /* ... Execute the method not wrapped using pYourActiveXCtrl using
dispatch generated methods */
         /* ... Check tlh & tli files for method definitions ...*/
         pYourActiveXCtrl->Release();
     }

Phew. If you ever get this far, let me know how it worked out ;)

Tom.


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


0
1/6/2004 1:53:03 AM
"Kamath" <p_v_kamath@hotmail.com> wrote in message
news:2fe53f0d.0401051312.749f92e3@posting.google.com...
> I have an ActiveX contol whose tlb (using OLE/COM viewer) shows
> // There are a couple of more of these, but this is typical example
> typedef enum {
>         RF_MCS86 = 1,
>         RF_BINARY = 2,
>         RF_ASCII_BINARY = 3
>     } EROMFormat;
> This enum is accessed from another function from within the control as
> STDMETHOD Func(SAFEARRAY **Ptr, EROMFormat Fmt, Long * Retval)

> I have dropped the control onto my form and MFC has generated the
> wrappers for the methods except for the ones having SAFEARRAY
> arguments
> Now, not only does MFC not generate the function because of the
> familiar
> // method 'Func' not emitted because of invalid return type or
> parameter type
> but even if I do manage to call it (I am thinking of using
> InvokeHelper) I don't know how I can reference the enum from the tlb.

> - Kamath.

Another easy way out:

* Do not use SAFEARRAY** in your interface directly; use VARIANT* instead.
Use the variant to transport the safearray (a variant can hold a safearray).
This requires a small change to the component implementation.
* Change the parameter of the method to take a long instead of the enum.
This requires a small change to the component implementation (and would
require error checking in the implementing method).
* Now the wrapper generator can generate the method in the client
application.
* import the activex control (using #import) to produce the tlh & tli, check
the tlh file and copy the enum definition and place it somewhere in your
project. Then remove the import statements (you don't need the interfaces in
the project if you use the wrapper).
* Then you can use the enums and pass them to functions requiring them. The
methods in the wrappers take longs which may not be very clear when it
actually expects an enum. I suggest writing the activex component that it
intercepts invalid values.

This may prove to be the easiest if you only want to use the wrappers, and
still want the enums defined. You lose the typing (VARIANT vs SAFEARRAY,
enum vs long), but maintain the ease of use of wrappers. Of course if you
didn't write the control yourself (and you can't change the interface),
you'll need my previous posts to get it done.

HTH,
Tom.



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.558 / Virus Database: 350 - Release Date: 02/01/2004


0
1/6/2004 1:41:39 PM
"TT (Tom Tempelaere)" <_N_OSPAMtiti____@hotmail.comMAPSO_N_> wrote in
message news:H%mKb.116979$UG6.5442630@phobos.telenet-ops.be...
> "Kamath" <p_v_kamath@hotmail.com> wrote in message
> news:2fe53f0d.0401051312.749f92e3@posting.google.com...
> > I have an ActiveX contol whose tlb (using OLE/COM viewer) shows
> >
> > // There are a couple of more of these, but this is typical example
> > typedef enum {
[...]
> > This enum is accessed from another function from within the control as
> > STDMETHOD Func(SAFEARRAY **Ptr, EROMFormat Fmt, Long * Retval)
> > I have dropped the control onto my form and MFC has generated the
> > wrappers for the methods except for the ones having SAFEARRAY
> > arguments
[...]
> > - Kamath.

[...]
> execute methods that are not wrapped. Example:
>
> Your wrapper definition is something as follows:
> class CYourActiveXCtrl : public COleDispatchDriver

This is not always true. For window controls, the wrapper derived from CWnd.

> { /*...*/ };
> The IID of your activex component interface is IID_IYourActiveXCtrl, the
> interface is IYourActiveXCtrl.
> You have a variable of CYourActiveXCtrl , called m_TheControl.
> Then the following should give you the interface pointer you need:
>
>     IYourActiveXCtrl* pYourActiveXCtrl = NULL;
>     HRESULT hr = m_TheControl.m_lpDispatch->QueryInterface(
>                 IID_IYourActiveXCtrl ,
>                 reinterpret_cast<LPVOID*>(&pYourActiveXCtrl)
>     );

The line should be changed to:

    HRESULT hr = m_TheControl.GetControlUnknown()->QueryInterface(
            IID_IYourActiveXCtrl ,
            reinterpret_cast<LPVOID*>( &pYourActiveXCtrl )
    );

My apologies for any confusion.

[...]

Tom.


0
1/11/2004 2:49:46 AM
Reply:

Similar Artilces:

Enumerating SQL Server database tables rows and sprocs using MFC
Hi, I've been looking around for a while now after an efficient way to enumerate tables, rows and sprocs of a MsSQL database. The best I could come up with was SQL DMO, but one cannot have it installed without installing SQL Server itself or MSDE, so I'm looking for alternative. After a table name was fetched, I will need to know the rows it contains, what type they are, and what are the indexes and identity defined for this table. Effectively, if I could somehow get the CREATE SQL statement from the DB itself that would be ideal. Also, I will need a way to get the sprocs code ...

Outlook docket control
How do I mark and event, such as an appointment or task, as being done without having to delete it, so that if I pull up any events or appointments regarding a certain case, that event is still reflected? Anna wrote: > How do I mark and event, such as an appointment or task, as being done > without having to delete it, so that if I pull up any events or > appointments > regarding a certain case, that event is still reflected? You can't mark it complete - appointments are considered "completed" when they have ended. You can assign a Completed category ...

Outlook Web Access probs
Hi, I've installed Exchange 2007 and have setup a couple of email addresses so far. I'm having problems though in accessing the OWA in that when I go to the site I'm prompted with a Windows authentication login box and then the standard Outlook Web Access login page. When I login as each user the page is blank. However if I login initially as administrator and then as the user (through the OWA login page) things work ok. This must be a permissions issue with the account that the website is running under? Thanks Ed. Hi Ed, I have seen your stated issue when trying to acc...

API hide access window
I have a question about using the API hide access window module. Thisworks ok for my forms, but the report preview window always getshidden or shows up behind the form. How can I use this module and havethe preview reports in front of the form? I use the code from thewebsite "The Access Web " to show only the active form, but iscumbersome to figure out how to effectively do a report preview andreturn to the previous form.Thanks,PC I haven't tried this so I'm guessing.Have you tried setting the report's Pop-Up property to True?Near as I can tell in order for the main windo...

Access 2007 01-23-08
I have a database that was created in access 2003. It has worked fine. Not users are using Access 2007 and there are errors on procedures that ran before, especially with the queries that run in back end code. Is Access 2007 using a newer DAO version, or is the vba version changed for access 2007 that would be causing these errors? I have looked at the queries and they are fine. The only question is on strings in queries I have a single quote and ampersands (WHERE ID ='" & strID & "' ..) in the procedure. Has this changed and I need to use the + instead, ...

Switchboard in Access 2010
I am trying to create a Switchboard in Access 2010, but when I create the first entry the number block is blank and it will not let me edit to enter a number. I have tried changing the background color to see if that was why I couldn't see the number, but that didn't help. "DJ in Dallas" <DJinDallas@discussions.microsoft.com> wrote in message news:0F3EA1A2-92D1-43EB-87D9-C902AAA18BBD@microsoft.com... >I am trying to create a Switchboard in Access 2010, but when I create the > first entry the number block is blank and it will not let me edit to enter ...

How do I control a text box via another combo box
I have read through dsome o the other answers and I just can't seem to get it. I have a table called employee information. Within that table are two fields. Retail Title and Retail Incentive. I have a form with a combo box for the the Retail Title. This field looks to a table called Retial titles which is two fields...Title and Incentive What I want to do is have it so when I choose a title in the form it populates the incentive in another text box. The combo box column count = 2 What should by settings be for my text box?(That of course if I should be using a t...

Radio Buttons, Grouping, and Control Variables
I need to create a control variable for each radio button in a group. However, I am only able to do this for the first one in the group because the others' resource IDs aren't available in the 'Add Variable...' dialog box. Why can't I create a control variable for every radio button in a group? And how do I get around it Related question: How can I change the 'Visible' property during run-time of a control for which I've created a control variable? There should be a method function or flag... "voidxor" <anonymous@discussions.microsoft.com> skr...

cannot access office 2007 after windows update
i updated my windows and now every office program says" microsoft excel has not been installed for current user. please run setup to install the application" i cant access the setup You cannot access the Control Panel to get at Add or Remove Programs? Do you have an Office 2007 CD? Have you tried Start>Programs>Microsoft Office>MS Office Tools and run Diagnostics? Just for curiosity..........which Windows Update caused the problem? Gord Dibben MS Excel MVP On Sun, 10 Jan 2010 10:49:01 -0800, marco gueli <marco gueli@discussions.microsoft.com&g...

Error when trying to access client permissions
Hi guys, I need your help as soon as possible please. I can't seem to access any of the system folders' Client Permissions. I can view all other permissions. I am the Exchange Full Admin. Whenever I try to view the Client Permissions for any system folder, I get the following message: --------------------------- Exchange System Manager --------------------------- The attempt to log on to the Microsoft Exchange Server computer has failed. The MAPI provider failed. Microsoft Exchange Server Information Store ID no: 8004011d-0512-00000000 ID no: c1050000 Exchange System Manager...

Importing MS Office Excel Comma Separated Values Files into a MS Access 2003 database
Hi, I have been tasked with Importing MS Office Excel Comma Separated Values Files into a MS Access 2003 database. These files were exported from a DB2 database.I have also been given the DDL code. I have Googled a solution to this task and have tried creating these tables using the DDL code in a query within a blank MS Access database. Is there a more expedient way to achieve this? I noticed, for example, that a field in DB2 has a data type of "decimal" while the same field in MS Access 2003 would have the data type of "number". Thanks, Zuf What follows i...

MFC and run-time lib dependencies
Hi, I am working on an installer (InstallShield X), and have come across a situation where I have dependencies on two different versions of the VC run-time libraries. My application requires the VC 7 run-time libraries, but a copy-protection product I use has a dependency on MFC 6.0, which in turn depends on the VC 6 run-time libraries. I'm wondering how best to resolve this...? Do I need to include in my installer both the VC6 and VC7 run-time library redistributables? Or, can I substitute the MFC 7.0 merge module (for the MFC 6.0 one), and thus only use the VC7 run-ti...

Wrapped classes from ActiveX
How I can make source code from activeX components (with all properities,methods etc) in Visual Net 2002 or higher ?? In Visual C++ 6.0 they were generated by environment. Visual Net 2002 generate only headers for ActiveX components (without methods and properities) I tried with MSFlexgrid 6.0, MSDataGrid and ADODC controls -- Darth Marhev ...

Outlook Web Access #28
Dear all, I have windows 2000 server with exchange 2003. My OWA is working fine, When i update trenmicro scan mail OWA is giving following error. 1st- I able to open my OWA Logon page. 2nd- After giving user name and password 3rd- It giving error " the page can't displayed" The page cannot be displayed The page you are looking for cannot be displayed because the page address is incorrect. Please try the following: If you typed the page address in the Address bar, check that it is entered correctly. HTTP 405 - Resource not allowed ...

using Control to populate combobox
Dear, I have a form where i have to populate diferent comboboxes at diferent stages with data from a seperate database. Im trying to write a Function that would easally repeate the task, the main problem is specifeing what combobox to use. here is a part of my coding Public Sub LoadCB(cbName As Control, SelectionString As String) cbCount = 0 Set rstLoadCB = VMSDatabase.OpenRecordset(SelectionString) With rstLoadCB .MoveLast cbCount = .Counter .MoveFirst If TypeName(CB) = cbName Then End If Next CB End With Set rstLoadCB = Nothing...

Concatenate PDFs in Access
Is there any way, from within Access, to concatenate several PDF reports? Thanks in advance. Angel. amn <angel.mazo@gmail.com> wrote: >Is there any way, from within Access, to concatenate several PDF >reports? Install the open source software PDFCreator. (Watch out for the *rsehole $$$ software with the same name.) http://sourceforge.net/projects/pdfcreator/ Take a look at the VB Script options in the C:\Program Files\PDFCreator\Scripts folder. Figure out which one you need. With a bit of work you can convert the VBScript code to VBA code. Tony -- Tony Toews, Microsoft A...

Access 2007 12-16-07
Why was no classic view included in access 2007? When I migrated to xp, I was pleased I had a classic option. Windows vista has less classic options than it should in my opinion, but it was still there. Even when IE 7 came out, I could still see the classic menus. But in Access 2007 (which cost us almost $500 and only came in the most expensive office), didn't allow this. I understand others desires for different looks and feels, but what has always brought me back to microsoft is that I could always get some semblance of what I was used to. I am deeply distressed by the fact t...

comdlg32.ocx
I have used an application developed in Access 2003 very well. I bought a new machine with Windows 7 and reloaded Access 2003 (Office 2003). It now does not run a function within the application. I believe comdlg32.ocx is the problem. I unselected Microsoft Common Dialog Control 3.0 (SP3) and it has disappeared as well. Error Run time error 438 - Object does not support this property or object Function Private Function fileName() As String Me.CommandOpenFileDialogue.Filter = "Text|*.txt|All|*.*" Me.CommandOpenFileDialogue.ShowOpen fileName = Me.CommandOpenFil...

My Review of MFC Beta
Well....after reviewing the MFC beta here is my opinion, for any one who cares. As every one knows, First of all this is not a MS native library. Some third party library being decorated in MFC dress. Given that there should ideally be a lot of color and convenience for the customers - but my expectations were proved to be too optimistic. Here is why. 1. Most of this MFC beta covers what most people consider as just "skin deep", if you know what I mean. If you remove the "theme" part - the new enterprise controls introduced to MFC are the Dockers and the property grid. ...

User access to a company
I am getting the following error when trying to give a user access to a company: The stored procedure smUsrCmpnyAccessChkAccessCHG returned the following results: DBMS: 0, GreatPlains: 20419 Does anyone know how to correct this error? thanks -- Doug Is the user already in the database but not assigned within GP? Is DYNSA the owner of the database? -- Charles Allen, MVP "Doug" wrote: > I am getting the following error when trying to give a user access to a > company: > > The stored procedure smUsrCmpnyAccessChkAccessCHG returned the following > resu...

How to convert existing Excel List into a table in Access?
Is it possible to convert existing Excel List into a table in Access database in 2003 Excel I know it was possible in 2002 version through AccessLinks ? You can import the Excel list into Access, and use it there as a table. In Access, choose File>Get External Data>Import In the Files of Type dropdown, at the bottom of the dialog box, choose Microsoft Excel Locate and select your Excel file, and click Import Step through the Import Wizard, to complete the import. anna wrote: > Is it possible to convert existing Excel List into a table in Access database > in 2003 Excel I know...

How can a list control respond a tree control message?
I create a list control (CMyList) and a tree control (CMyTree) and want to display different items when the selection changed in the tree control. What I have done is right click my tree control on resource editer and choose 'Add Event Handler...'. I choose TVN_SELCHANGED from Message type and CMyList from Class list. When I run my program and click different item in the tree control, the hangler function in class CMyList does respond it. Could anybody give me some suggestion for coping with the problem? Thanks in advance. Rich I am not sure what you are asking? Do you want a ...

Last Access User
Is there a way to know who last accessed a file in WinXp, 2k or 2003?? Thanks a lot! As a start, MVP John Walkenbach has an article that monitors last user access for an Excel file and logs each access into a text file: http://j-walk.com/ss/excel/tips/tip95.htm HTH Jason Atlanta, GA >-----Original Message----- >Is there a way to know who last accessed a file in WinXp, 2k or 2003?? > >Thanks a lot! > > >. > Thank You! So nothing we can do on the server side, rite? "Jason Morin" wrote: > As a start, MVP John Walkenbach has an article that > m...

Access 2007 01-21-10
there is one problem i am facing, my previous data base file extension was .MDB and in Access 2007 the file extension is .ACCDB and in Excel Template wizard is not recognizing that file even after i have convereted ..ACCDB to .MDB format still it is not wokring. But excel template wizard is working for the databse which was created in Access 2003. Any one who can help, thanks in advance -- Atif Hasan You can try copying an old 2003 complete database, delete all objects, compact and repair, and then import the objects from the .ACCDB. I have not tried to import like t...

progrmatically accessing contacts
does anyone know how to read the properties of a contact (ie. FirstName) when that contact is an attatchment to an email? ...