|
Just tried it, as well as fixing my counter messup that Append did the trick.
Thanks again
|
|
|
|
|
Hi!
I need to create a listview where each row would be multiline i.e. each row would have a normal look with an item for each column and another row (a single line) where I couls display some text... The two lines would actualy be ONE item in the list.
I've read many tutorials and many forum threads but nothing seems to do what I really want.
Does anybody know how to do that? I could be a little more clear if necessary...
-------------
-= Nasty_p =-
|
|
|
|
|
CListCtrl provide multicolumn functionality (referred to as items and subitems). Is this what you're after?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Yes... But I want to know how to do something like this:
|Column 0|Column 1|Column 2|Column 3|
-------------------------------------
| item 1 | item 1 | item 1 | item 1 |
-------------------------------------
| Text related to item 1... |
-------------------------------------
| item 2 | item 2 | item 2 | item 2 |
-------------------------------------
| Text related to item 2... |
-------------------------------------
etc...
-------------
-= Nasty_p =-
|
|
|
|
|
I see... Well, seems like neither CListCtrl nor any of the various grid controls around the net can do this in a easy way.
Maybe this is a solution for your particular problem: CListBox provides a very primitive pseudocolumn facility, by which a string can be displayed as if composed of several substrings tabulated at fixed positions (see CListBox::SetTabStops ), each substring being marked by a '\t' character. Maybe you can mix '\t' -tabulated rows with regular rows to achieve a result similar to what you need.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Can't there be a better way to do so?
I saw a lot of embended "tree control in a listview" but I don't wanna use trees...
-------------
-= Nasty_p =-
|
|
|
|
|
So embed a CListCtrl or CComboBox instead...
"An expert is someone who has made all the mistakes in his or her field" - Niels Bohr
|
|
|
|
|
Easier said than done.... I'm still just a MFC novice...
I'll try though...
Thanx!
-------------
-= Nasty_p =-
|
|
|
|
|
This sounds like what you want:
http://www.codeproject.com/miscctrl/reportctrl.asp[^]
Shog9
------
No one's immune now, from a world of problems
No one's exempt now, from a world of pain
That's the way that it goes
when you're down here with the rest of us...
|
|
|
|
|
YES!!!!
Thanx!!!!
-------------
-= Nasty_p =-
|
|
|
|
|
Hi, I am trying to get a CFileDialog to display having overridden the default implementations of OnFileSaveAs(). My problem is that when CFileDialog::DoModal() is called by my app an access violation occurs.
The funny thing is, no Windows messages are generated to show me this - the only way it is detectable is by running the app from within the debugger at which point I am told in a message box that an access violation has occurred in KERNEL32.DLL when I attempt to display the dialog. I am quite sure I am supplying the correct parameters to the constructor, and if I try to display the Dialog in the same way from a new app everything works fine.
This has confused me for hours now. It seems strange that there are no assertion faliures, and even that when it occurs when the app is not run from within the debugger no messages are displayed - the app just quits!
Any, Any help would really be appreciated as I am close to losing what little hair I have left over this.
Cheers, Alex.
|
|
|
|
|
Try posting the code for your CFileDialog -derived class (if it is not excessively large).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
That's the thing - it's not a derived class. Using it it even this way causes the same problem:
CFileDialog dlg(FALSE); // or even TRUE;
dlg.DoModal();
Obviously this is not the way I want to initialize it in my app, but even this does not work.
Was wondering if something like an invalid pointer somewhere else could cause this sort of thing. It's the only thing I can come back to after days of screaming over this.
Any ideas?
Alexinuk
|
|
|
|
|
Also, you might want to check Nishant S' article CDocument::DoSave revealed[^], which seemingly is relevant to your needs.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Just for curiosity's sake: what is the structure of your name? Is 'Nishant' your given name and 'S' an abbreviation of your family name, the other way around?
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Joaquín M López Muñoz wrote:
Just for curiosity's sake: what is the structure of your name? Is 'Nishant' your given name and 'S' an abbreviation of your family name, the other way around?
Here in South India we have a weird naming pattern. In the western countries you have family names. You have Mr. Sam Brown, his son Mr. Jason Brown, grandson Mr. Tony Brown etc… So they are all Browns, huh?
Here we don’t follow that at all. My name is Nishant. My initial is S which expands to Sivakumar (which you guys take to be my surname). Sivakumar is my dad’s name, but his initials are P.K. (which expand to his dad’s name)
So if you have Sam Johnson here, his son will be Tony Sam (the Johnson is dropped and his dad’s first name is his surname). Now Tony Sam’s son might be George Tony etc…
You get me I hope
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
I think I got it, sort of Russian patronimics (for instance, Rodion Romanovitch Raskolnikov's father was named Roman Raskolnikov).
In Spain, things are funny, too (and most of the time ununderstandable for Anglosaxons). My name consists of of a compound given name (Joaquín M, 'M' is an abbreviation for 'María') and two family names López and Muñoz, which correspond to the first family names of my father and mother. So, If I had a baby with a girl named, for instance, Carmen González García, and decided to call her Ana, the baby's full name would be Ana López González. Not hard once you get it, but people from other countries often have a hard time trying to figure out the various parts of Spaniards' names.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Hi,
I am creating an MFC application which uses OpenGL. This is basically a 3D model editor. The OpenGL device is set up for Double Buffering. How can I draw with the Windows GDI onto a GDI context? The problem with doing something like the following is you get a nasty flicker because you are drawing on the screen after OpenGL has flipped the buffers.
SwapBuffers(dc.m_ps.hdc);
dc.Rectangle(32, 32, 128, 128);
If it is possible a way of solving this problem would be to draw with the GDI straight onto the back buffer of the OpenGL device so that when the buffers are swapped you do not get that nasty flicker. Because of the information and other GDI graphics which are required to be added onto the view, the constant flicker makes it very hard to work with the software.
I am not too fussy on how to solve this problem, so any fast and reliable methods would be great.
Any help would be greatly appreciated!
Regards,
Lea Hayes
Yours Sincerely,
Lea Hayes
|
|
|
|
|
Try this:
1) Create memory DC compatible with window DC and pass it to OpenGL:
CDC memDC = CreateCompatibleDC(&dc);
CBitmap memBitmap = CreateCompatibleBitmap(&dc, width, height);
memDC.SelectObject(&memBitmap);
SwapBuffers(memDC.m_hDC);
2) Draw in memory DC:
memDC.Rectangle(32, 32, 128, 128);
3) BitBlt from memory DC to window DC:
dc.BitBlt(&memDC, ...);
(Sorry if it will not work, I just guess..)
|
|
|
|
|
Is it possible to have an array with multiple columns (not sure if this is the correct terminology)? I have never used an array before.
kinda like a list control.
CString strIP, CString strDNS, CString strName, CString strStatus
64.64.64.64, test.dns.org, JoeSmoe, online
63.63.63.63, woot.dns.org, noname, offline
|
|
|
|
|
I just thought I would add I do have a structure for this information.. can I put the structure in the array?
|
|
|
|
|
Yes, you can. This solution seems just fine to me.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Cool thanks.. I just implemented it and it works great.
|
|
|
|
|
I want to write a program similar to Windows Task Manager of Win2000. I've looked over the topic Process Status Helper[Win32] in MSDN but there's no function to retrieve the status of a process. How to know a process is running, blocked or ready?
|
|
|
|