473,386 Members | 1,823 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

how to subclass in vc++.net 2002

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.
Nov 17 '05 #1
4 1369
Z.K. wrote:
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.

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

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

Nov 17 '05 #2
Z.K. wrote:
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.

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

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

Nov 17 '05 #3
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.

Steve Alpert wrote:
Z.K. wrote:
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.


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

Nov 17 '05 #4
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.

Steve Alpert wrote:
Z.K. wrote:
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.


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

Nov 17 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Scott Chang | last post by:
Hi all, I have a stand-alone VC++ .NET 2002 program in my Windows XP Pro PC. I got a trial-version of Windows Server 2003 in CD-ROM. I saw a warning about losing some files of my VC++ .NET 2002...
1
by: BKD | last post by:
I have a VC++ 6.0 app that I have converted to 2002. It is running fine except for a problem with using the access keys we have set up on some of the buttons. For instance, ALT+Q causes the Quit...
10
by: msnews.microsoft.com | last post by:
Hi, How do I add a reference in VC++.NET? In VB.NET and VC#.NET, there's an option in "Project" menu called "Add Reference". This will add a .NET DLL reference to the current project. After I...
4
by: Scott Chang | last post by:
Hi all I copied the following VC++ 6.0 code (written by someone in the website) to my VC++ .Net 2002-Windows XP Pro PC ////****Solution 'dyndllclass' (2 projects)***/// ///***dynapp****(1st...
1
by: Matt S | last post by:
Does the liscense for the VC++.Net 2003 allow the user to purchase a downgrade to VC++.NET 2002? DO I need to buy a standard version of VC++.NET to downgrade? I need to get VC++ 2002, but I can't...
7
by: ultranet | last post by:
I have cruised around http://msdn.microsoft.com/visualc/ and the rest of the site, and i am not able to find a single C++ or VC++ certification exam that will be available after June 30, 2004. I...
3
by: SHC | last post by:
Hi all, 1) I have used VC++.NET 2002 (v7.0) for a while. Recently I just installed VC++.NET 2003 (v7.1) - I saw the message "Settings were not migrated from Visual Studio.NET 2002 to Visual...
0
by: Z.K. | last post by:
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...
2
by: bhag | last post by:
hi all, I'm writing because I haven't been able to find enough information at the book stores and at the MS web site on some of my questions. Perhaps I'm asking the wrong questions, but if you...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.