|
It is CListCtrl.
You can use these functions of the class
eg:
To add columns
m_ListCtrl.InsertColumn(1,"1st Column");
To add data to the control
m_ListCtrl.InsertItem(0,"Data");
m_ListCtrl.SetItemText(0,1,"Value");
|
|
|
|
|
How will I connect my view class which is derived from Cview to the control object,Co's I want to test the list control
Did as follows:
On the,"OnCreate" function of my view class,I did as follows
m_lstctrl.Create(WS_CHILD|WS_VISIBLE|LBS_STANDARD|WS_HSCROLL,
CRect(10,10,200,200),this, IDC_TEST);
m_lstctrl.InsertColumn(1,"1st Column");
But I dont see any columns ,apart from the listctrl box boundary...
|
|
|
|
|
Replace LBS_STANDARD by LVS_REPORT.
|
|
|
|
|
Thanks Dreamz.Now I see the control on screen.
But the size is small.
How can I set the size of the ctrl in code..
Thanks all......
|
|
|
|
|
Pazzuzu wrote:
How can I set the size of the ctrl in code..
Check out the second parameter to Create() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
|
You can adjust the CRect(..) in the Create function.
Or add WS_SIZEBOX style,then you can resize the control at runtime.
|
|
|
|
|
ok, to add columns to the list control, make sure that you create the control with the LVS_REPORT style.
then call CListCtrl::InsertColumn() to add a column and then CListCtrl::InsertItem() to add items. I saw a post that already indicated this.
Now to the problem of sizing the control to the size of your dialog:
In the dialog class, handle the WM_SIZE message, call GetClientRect() to get the current client rectangle of the dialog and then just call CListCtrl::MoveWindow() to size the list control to the size of the dialog.
HOpefully that explains it.
Ciao
controlSHIFT
[Glossary Manager] [AfterThought Backup Lite]
All good things were meant to be improved
|
|
|
|
|
|
|
Pazzuzu wrote:
[1]How will I create a Listbox control
used the "m_ListBox.Create"- How will I pass the cDialog class as I have to pass a "pParentWnd parameter" which expects a CWindow object
Unless you absolutely have to, it's easier to create the control at design-time rather than at run-time. As to your question about the Create() method, the third parameter would be the this pointer. For example:
BOOL CMyDialog::OnInitDialog()
{
m_listbox.Create(..., this, IDC_LISTBOX1);
return TRUE;
}
Pazzuzu wrote:
[3] Want to add 2 columns in the list box,a header row, with constant values.
You can do this with a listbox (by using tab stops), but as already mentioned, it's much easier with a list control.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
i want to know abt Smart Card api's. if any body has good tutorial over it pls give it to me.
pls don't refer me to msdn, i am fad up that .
i want example showing use smart card api's
thanks
I Think It will Work
-----------------------------
Alok Gupta
visit me at http://www.thisisalok.tk
|
|
|
|
|
if it is a standard ct terminal:
search for the ct-api
(Card-terminal Application Programming Interface)
or you can search for a documentation
of the ctrsct32.dll
or you search for ct-bcs
Card Terminal Basic Command Set
i got one here, but it is in german
hope it helps
george
|
|
|
|
|
Hi !
I just started developping with Visual .Net in C++ (unmanaged).
I'm facing a strange behavior in the debugger : if I go step by step in my code (F10), the debugger just step over many lines of code, and the variables viewer let me see that the object I'm debugging is in a very strange state, many member variables being uninitialised (which was supposed to be done in my constructor).
Did you already had such a strange behavior ? Is it possible to solve it ?
Thanks !
Jerome
|
|
|
|
|
Is this an existing piece of code converted from VC6 to VC7 or is it new code?
If existing code, try a complete clean of the DEBUG directory and compile again.
Ant.
I'm hard, yet soft. I'm coloured, yet clear. I'm fuity and sweet. I'm jelly, what am I? Muse on it further, I shall return! - David Williams (Little Britain)
|
|
|
|
|
Hi !
Thanks for the hint, but the problem remains.....very strange !
Jerome
|
|
|
|
|
Hai all,
I use a modeless dialog box in my application.
when I resize the application window, I can not change the position of the modeless dialog box, correspondingly.
How can i prevent it?
Also, the window for the modeless dialog in the task bar is also seen.
Simply, I am trying to make the Modeless Dialog box to be a part of my application window.
Please help me,
With Thanks and Rgds,
Arun
|
|
|
|
|
If my understanding of your problem is correct, you are trying to use a modeless dialog to look as if its a "pane" within your application. If this is correct, read on:
1. Make the dialog a CHILD dialog
2. In the parent window, handle the WM_SIZE message and then merely resize the child dialog.
For example (a WTL eg):
<br />
void OnSize(UINT uiCode, CSize sz)<br />
{<br />
CRect rect;<br />
<br />
GetClientRect(&rect);<br />
if ( ::IsWindow(m_MyChildDialog.m_hWnd) )<br />
{<br />
rect.DeflateRect(10,10,10,10);
m_MyChildDialog.MoveWindow(&rect);<br />
}<br />
}<br />
That should be all you need to do.
Let me know if I've missed your question completely.
Cheers,
Peter
controlSHIFT
[Glossary Manager] [AfterThought Backup Lite]
All good things were meant to be improved
|
|
|
|
|
if i wanna get the vc++ 6 code for compression and decompression the jpeg file and from this code i can access all image data.where i should go and download it?
|
|
|
|
|
www.codeproject.com
Take a look at the CxImage-Class
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Hi,
I know how to run a VB exe file from VC++6.0 but have been trying to read the contents of the exe from VC++. Like if the VB application has ODBC coding in it then I would like to read the kind of API calls that it is making through VC++ application. Is it possible to do like that?. Is it possible to intercept an exe program and know what all objects it is accessing? If yes then how do I do that?
Thanks in advance.
Kavita
Kavita Fernandes
|
|
|
|
|
I think what you are looking for is an "API hook." There are several examples here at CP. You can also Google for more.
Another way would be to parse the EXE itself by examining the .idata section (i.e., import table) of the file. It lists the functions called in other DLLs.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Thank you for the prompt reply.
How do I read the .idata section of the file?
thanks in advance
Kavita Fernandes
|
|
|
|
|
karhea wrote:
How do I read the .idata section of the file?
This is the best reference I know of.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
hello evry one , i'm treing to craete for my app a main window whitch part of the window( the left part ) will be a permanent dialog box ( not anything fency - just some buttons) , but i want the dialog box to be a part of the window , meaning if we resize or move the main window the dialog box will still be in the bounderis of the main window with the same size ratio . i'm working in a win32 and on visual c++ , my code is genarally in C , any help or reading metarial about this subject will be very helpfull .
thanx alot
|
|
|
|