all groups > dotnet interop > november 2006 >
You're in the

dotnet interop

group:

Invisible ActiveX control created using ATL


Invisible ActiveX control created using ATL Nick Thompson
11/27/2006 2:39:01 AM
dotnet interop:
Could you please help me create an Activex Control that is invisible at runtime
I have selected the invisible at run time option which results in

DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE |
OLEMISC_INVISIBLEATRUNTIME |
OLEMISC_CANTLINKINSIDE |
OLEMISC_INSIDEOUT |
OLEMISC_ACTIVATEWHENVISIBLE |
OLEMISC_SETCLIENTSITEFIRST

the above flags being set, I have not modified the ondraw function
the activex functions correctly but is allways visible at run time

I followed Calvins instructions to create an activex control
http://blogs.msdn.com/calvin_hsia/archive/2006/08/28/729165.aspx
the difference being that I need the control to be visible at design time
and invisible at run time.

The reason I have chosen a control and not a simple object is because it
must be loaded by the Wonderware View product.

If I create the control with MFC Framework then the visibility problem is
solved
however I wish to create it using the ATL framework for other reasons.

I can send an example project, but a new object created with microsofts wizard
and executed with microsofts test activex application will exhibit the
problem.

I have had email conversations with the engineer Peter Huang regarding this
problem

RE: Invisible ActiveX control created using ATL v-garych NO[at]SPAM online.microsoft.com (
11/28/2006 12:00:00 AM
Hi Nick,

[quoted text, click to view]

This seems to be a product issue. Sometimes the %OLEMISC% constant is
unable to be written successfully to the reigistry.

I suggest you can try to change MiscStatus entry in your ATL control
project's reg-script (.rgs file) manually:

...
'MiscStatus' = s '0'
{
'1' = s '132497'
}
...


Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
RE: Invisible ActiveX control created using ATL Nick Thompson
11/28/2006 3:12:02 AM
Hi Gary, (again), thankyou for your reply I will try this as soon as possible
and
get back to you then.

[quoted text, click to view]
RE: Invisible ActiveX control created using ATL v-garych NO[at]SPAM online.microsoft.com (
11/29/2006 7:23:04 AM
Hi Nick,

By the way, your invisible ATL control should be based on an existed
control(when you created in the New ATL Control wizard), such as a Button.

Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notif
ications.

Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://msdn.microsoft.com/subscriptions/support/default.aspx.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.
Re: Invisible ActiveX control created using ATL Gary Chang[MSFT]
11/30/2006 12:00:00 AM
Hi Nick,

Thanks for the response!

I am glad to know my suggestion helps.

The .rgs file is created by the ATL object wizard, I suggest you can refer
to the following MSND documentation for its detailed format:

Registry Scripting Examples
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_atl_registry_scripting_examples.asp

Understanding Backus Nauer Form (BNF) Syntax
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vccore/html/_atl_understanding_backus_nauer_form_.28.bnf.29_.syntax.asp

[quoted text, click to view]

yes, you can use the "val" keyword to specify a non-default value to a
registry key. There is a similar sample in my first reference link.


Thanks!

Best regards,

Gary Chang
Microsoft Online Community Support
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/subscriptions/managednewsgroups/default.aspx#notifications.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.

AddThis Social Bookmark Button