Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Interop / November 2006

Tip: Looking for answers? Try searching our database.

Invisible ActiveX control created using ATL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Nick Thompson - 27 Nov 2006 10:39 GMT
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

best wishes Nick.
Gary Chang[MSFT] - 28 Nov 2006 09:53 GMT
Hi Nick,

>DECLARE_OLEMISC_STATUS(OLEMISC_RECOMPOSEONRESIZE |
>OLEMISC_INVISIBLEATRUNTIME |
[quoted text clipped - 5 lines]
>the above flags being set, I have not modified the ondraw function
>the activex functions correctly but is allways visible at run time

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.
Nick Thompson - 28 Nov 2006 11:12 GMT
Hi Gary, (again), thankyou for your reply I will try this as soon as possible
and
get back to you then.

> Hi Nick,
>
[quoted text clipped - 45 lines]
> ==================================================
> This posting is provided "AS IS" with no warranties, and confers no rights.
Gary Chang[MSFT] - 29 Nov 2006 07:23 GMT
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.
Gary Chang[MSFT] - 30 Nov 2006 06:01 GMT
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/_at
l_registry_scripting_examples.asp


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


>but am not sure how an .rgs file could create keys with multiple
>values that are needed (Value 1) do I use the val keyword.

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.

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.