473,657 Members | 2,445 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Subclass ListView

1 New Member
I have a listview and I'd like to be able to do some stuff on a right click event of the column header but the columnclick event only handles left clicks. I looked around on the net and found that in order to accomplish a right click on a listview column header, I need to subclass the listview class and override the WndProc function. I've never done this so I'm not sure how to do it. Does anyone have this done already or provide some sample code to help me out? I don't want to use the mouseup event of the listview because I need this to happen on the column header click event. I also can't use the left click event becuase I'm already doing stuff there aswell.
Jan 29 '08 #1
0 1233

Sign in to post your reply or Sign up for a free account.

Similar topics

1
2418
by: Gerry Sutton | last post by:
Hi All! I have noticed a strange behavior when using a constant identifier to initialize an instance list variable in a base class and then trying to modifying the list in subclasses by using either the list.extend method or even by having the subclass create a whole new list in the variable. The following example illustrates the situation.
8
7181
by: Jeroen Smits | last post by:
To Microsoft or other people who are interested, I have a feature request: I would really like to have an option to 'hide' a property or method from an inherited class. For example when I create a subclass and supply a default value for a property. Currently I create a new property, using the new keyword, and only supply the get accessor witch will always return the predefined value. But I would really like to be able to hide it...
5
2336
by: Alexis | last post by:
How can I subclass a treeview control to add columns to it? Thanks, Alexis
8
1668
by: Lou Pecora | last post by:
I've been scanning Python in a Nutshell, but this seems to be either undoable or so subtle that I don't know how to do it. I want to subclass a base class that is returned from a Standard Library function (particularly, subclass file which is returned from open). I would add some extra functionality and keep the base functions, too. But I am stuck. E.g.
1
4994
by: s.lipnevich | last post by:
Hi All, Is anything wrong with the following code? class Superclass(object): def __new__(cls): # Questioning the statement below return super(Superclass, cls).__new__(Subclass) class Subclass(Superclass): pass
31
3547
by: damacy | last post by:
hi, there. i have a problem writing a program which can obtain ip addresses of machines running in the same local network. say, there are 4 machines present in the network; , , and and if i run my program on , it should be able to find "host names" and "ip addresses" of the other machines; , and ? i have read some threads posted on this group, however, they only work for localhost, not the entire network.
1
2897
by: Stuart | last post by:
Hello, We are trying to subclass the ListView control and have a collection of a class as the Items. Our implementation works at runtime. However at design time if the user adds elements, we can not see them in the visual studio designer. Any help would be appreciated. The class is NameAndId and the collection property VariableNamesAndIds. We marked it with the
6
4586
by: Me | last post by:
I need to be able to acces non-virtual members of sublcasses via a base class pointer...and without the need for an explicit type cast. I thought a pure virtual getPtr() that acts as a type cast would solve the problem, but it appears not to. I need this functionality to make object serialization a reality. Having to explicitly cast each deserialized object to its original type defeats the purpose of my serializing the blasted things in...
4
4504
by: Brian Gaze | last post by:
I have created a ListView control and have bound this to a datasource. Within the ItemTemplate of the ListView I have added another ListViewControl which is databound in the code behind. The idea is that when clicking on the "Show details" button the ListView for the appropriate row binds in the codebehind and displays the detail data for the selected row. I did something similar with a gridview control previously, but want to be able to...
0
8395
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8310
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8826
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8732
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8503
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8605
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
4306
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2726
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1955
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.