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 / Languages / Managed C++ / July 2005

Tip: Looking for answers? Try searching our database.

how to subclass in vc++.net 2002

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Z.K. - 03 Jul 2005 05:28 GMT
I was wondering if someone could tell me how or point me to an
appropriate web page that will show me how to subclass a control in
vc++.net 2002.  What I want to do is to be able to pop up a dialog box
when double clicking on a edit box.  I tried using the OnLButtonDblClk,
but it does not work when double clicking on the edit box though it does
work when double clicking on the form itself.

Z.K.
Steve Alpert - 03 Jul 2005 21:23 GMT
> I was wondering if someone could tell me how or point me to an
> appropriate web page that will show me how to subclass a control in
[quoted text clipped - 4 lines]
>
> Z.K.
There are lots of resources that will tell you how to do this. The high level
scheme is:

1.  Use SetWindowLongPtr to replace the current wndproc by one of your own
design. (Save the return as OldProc)
2.  In your procedure, set up a switch on the message and look for the
appropriate doubleclick message and pass every other message to OldProc.

/steveA

Signature

Steve Alpert
my email Fgrir_Nycreg @ vqk.pbz is encrypted with ROT13 (www.rot13.org) and spaces

Z.K. - 04 Jul 2005 03:58 GMT
lots of resources, well, not that I could find.  Most were about how to
subclass in visual C++ 6, which seems to be a bit different than in
dot.net.  It was fairly easy in VC++ 6, but since visual studio.net no
longer has a class wizard or not one that is as useful I am having
trouble figuring how to do it.  Oh well, thanks anyway.  I guess I'll
have to buy a book and may that will tell me.

    Z.K.

>> I was wondering if someone could tell me how or point me to an
>> appropriate web page that will show me how to subclass a control in
[quoted text clipped - 14 lines]
>
> /steveA

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.