June 22, 2024, 09:40:38 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Listview control

Started by Haim, July 01, 2006, 08:47:51 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Haim

I created a derived class of a listview control, initiated a pointer to it with new(mylistview,1) and called it's create method to put it on a window.
Using the OnNotify method of the window I can respond to events of mylistview. I would like to create an additional my lisrview on that same window.
How will I be able to distinguish between the two? (they do not have control Id's assigned to them...?)

another issue: I would like to be able to respond to mouse clicks on mylistview and detect which item and subitems were selected. I was unalble to get this info from within the class itself. As I said, I am using OnNotify of the parent window.


Ionic Wind Support Team

You give the control an ID in the Create method.  The create method of all controls looks like:

Create(int l,int t,int w,int h,int style,int nID,string title,CWindow *parent),int;

Ionic Wind Support Team

Haim

Thanks,
In the Q&D class maker, there are two create methods for Clistview. the first one is indeed as you described, while the second has int exstyle instead of int nId. I chose the second one. Is this an error in Class Maker?


Ionic Wind Support Team

Not really.  When you call the base CWindow class

CWindow!!Create

It is the exStyle format.
Ionic Wind Support Team