|
Using the LVS_LIST style implies no columns.
Joschwenk666 wrote: Are there maybe propertys I have to set for my list in Resource Form View?
I just tried your code with the default settings and "TEST" indeed showed up.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Oh, I`m really stupid: I put a Listbox Control on my form, not a List Control Control....
Tank you for your effords.
|
|
|
|
|
|
Anybody know of a utility that can fix the #includes in a given source file - remove ones that are not needed and add ones that are? Netbeans can do this for java, can it be done for VC++?
Jim
|
|
|
|
|
Years ago John Lakos wrote a utility to tell you what redundant includes you had in a bunch of source files. Unfortunately there's no way of knowing what's implemented in what header (apart from the standard ones) so working out which headers you need is a bit harder.
The best way of handling this is to keep your headers small and self-contained, then you can be fairly empirical about which ones you need. You can just remove all the headers and add back in the ones you really need.
Cheers,
Ash
|
|
|
|
|
>Unfortunately there's no way of knowing what's implemented in what header (apart from the standard
> ones) so working out which headers you need is a bit harder.
Visual Assist can work out which headers need including for a given object (I've discovered only recently).
But what I'm really looking for is a utility that can go through my whole project and strip redundant #includes and thus reduce unnecessary rebuilds. I'm going to google for John Lakos, see what I can find.
Thanks,
Jim
|
|
|
|
|
Visual Assist can only do this for headers you've got in your solution and the standard library. As far as I know it can't do something like say "hey, it looks like you're using a crypto function from OpenSSL..."
The Lakos code was originally published in "Large Scale C++ design" in the early 90s - I've seen it kicking around online several times but I haven't got a link handy.
Cheers,
Ash
|
|
|
|
|
I've found the book on Amazon, I'll add it to the list next time we update our office library.
Thanks, you've been very helpful!
Jim
|
|
|
|
|
There's always the brain-dead approach: comment some out and see if it still compiles.
Steve
|
|
|
|
|
I'm kinda wondering...Why not C++ reflection?
|
|
|
|
|
I think this is an already very well debated question, see for instance (OMG: the competitors!) [^].
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Chapter 14 of "The Design and Implementation of C++" by Stroustrup has got a pretty good summary of why the type inspection abilities of the language are the way they are and why some of the things that are regarded as reflection aren't in the language. It's also got a fairly good C++ implementation of a dynamic object reader which shows you how you can get some reflection type abilities out of the language without too much work.
Cheers,
Ash
|
|
|
|
|
I need to render a image in progress bar control. Can anyone please help me how to do this.
Thanks in advance
|
|
|
|
|
The steps are:
1. Subclass the control
2. Handle WM_PAINT
3. Draw the graphics as you like.
|
|
|
|
|
Thanks for ur reply,
But my question is " How I can render a image in the progress bar, Suppose I hv a line image with green color and I want that line image should increase in progress bar ".
I hope u will help me. If possible plz send some code.
Thanks
|
|
|
|
|
If the image can be stretched you can do the following. (Its MFC and without error checking)
void CMyProgressCtrl::OnPaint()
{
CPaintDC dc(this);
CRect rc;
GetClientRect(rc);
int nLower, nUpper;
GetRange(nLower, nUpper);
int nPos = GetPos();
int nWidth = (int) ((nPos / (float) (nUpper - nLower)) *rc.Width());
BITMAP bm;
m_bitmap.GetBitmap(&bm);
CDC dc2;
dc2.CreateCompatibleDC(&dc);
CBitmap *pOldBitmap = dc2.SelectObject(&m_bitmap);
dc.StretchBlt(rc.left, rc.top, nWidth, rc.Height(), &dc2, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
dc2.SelectObject(pOldBitmap);
}
|
|
|
|
|
Thanks For ur response..
Could u plz tell me what is m_bitmap.GetBitmap(&bm) does. Becose I am getting assertion error at that line while running .
|
|
|
|
|
It's getting some general properties for the bitmap. In this case we are interested in the size of the image bmWidth and bmHeight members of the BITMAP struct, to be able to know how much to stretch the image.
If you get an ASSERT it could be because you have not loaded any bitmap yet. I assume m_bitmap is of type CBitmap and that it is declared as a member of CMyProgrssCtrl .
In the constructor (or Create and PreSubclassWindow ) do m_bitmap.LoadBitmap(IDB_BITAMP) where IDB_BITMAP is the bitmap you have in your resources.
|
|
|
|
|
Thanks dear..
I have done it with Image class and its working fine, only I hv to do some modification..
Thanks a lot...
|
|
|
|
|
|
AbhiHcl wrote: Becose I am getting assertion error at that line while running .
What line of what file is asserting?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
When I compile my project, it shows the following linker error.
fatal error C1900: Il mismatch between 'P1' version '20080116' and 'P2' version '20070207'
How do I resolve this error?
|
|
|
|
|
Reinstall your development environment. It look like it's using a mixture of two tool-set versions.
Steve
|
|
|
|
|
Reinstalling VC++ didn't work.
|
|
|
|
|
The error message is explained here[^]. Can you quote the exact message?
Steve
|
|
|
|