|
Randor wrote: ...EM_SETBKGNDCOLOR...
Do listview controls respond to messages meant for edit controls?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
heh,
Actually I responded to the question thinking he was asking about a RichEdit control.
|
|
|
|
|
Ignore my previous post, I responded while multi-tasking and forgot the original question.
Try:
SendMessage(hWndList,LVM_SETBKCOLOR,0,(LPARAM)RGB(0,0,0));
Best Wishes,
-Randor (David Delaune)
|
|
|
|
|
How about using the LVM_SETBKCOLOR message (ListView_SetBkColor macro)?
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks guys maybe i should have looked at the MSDN documentation more closely..
Thanks for your help!
--PerspX
|
|
|
|
|
|
OK, I've had to learn on the job doing this and that, done some Win32, some MFC, C++ but without a background in proper design and usage, and I'd like to step back and learn properly. The issues I have are that I'm often confused by things that I don't even know are different, like when someone says "VS 2005 complies C++ better than VC++6". My experience of VS6 is that it did everything fine and I got used to where most things are (though I am still not very clued up on it, at least I have the MS book for it - could not find an equivalent for VS2005). I also get mixed up between when I'm using C++, when I'm using STL, when MFC/raw Win32 etc. I've got quite a few books, some unread, and some read but wondered if anyone who was an expert could give a clear path (or a link to sites that would give this info) to step back, find out about what the current C++ standard is, what's changed from what I may know now (and not even realise), generic info about the development environment and Visual Studio in particular (in Vista, still not happy with it!), going on to C++ learning (more formally with more depth of knowledge), good things to do to try and get practice, perhaps online courses or tutorials or workbooks?, then info on the different things like STL, MFC etc, how they fit in with the bare bones, all the way through to developing good quality apps and code. When I read software design articles (eg some of the ones at flounder) I am inspired to be able to do this properly but have fallen into the trap (not my own fault really) of having to learn 'just enough' without understanding it all and fixing things by brute force or by asking for help or digging through the help files/docs (by the way in places the MSDN help from F1 in VC6 is woeful!)
anyway, I hope someone can take a few minutes to help me. I know these kind of questions often get a generic one line answer, and I can understand that to some extent, but I'd really like to get some help with a more structured plan for building a proper skillset up, perhaps some bad habits will be harder to break but on the other side, some concepts won't be so alien to me having done some fiddling
many thanks,
Lee
|
|
|
|
|
I found Easiest way and reliable way to learn . net by this video series
Though I have not purchased but getting free video's and they are quite useful,LearnVisualStudio. NET
|| ART OF LIVING ||
|
|
|
|
|
To answer a few of your questions, you're using STL when you have to use include any of the STL container headers, such as vector, deque, map, queue, etc. I believe you're using MFC if you have to use anything that requires afxwin.h. As for when you're using C++, well, you're either using C, C++, or Managed C++ unless you're doing some kind of crazy interop work. If you use templates or make use of a C++ compiler, then you're using C++, if you have to use any handles, then you're using Managed C++ (^ vs. *).
|
|
|
|
|
ldsdbomber wrote: having done some fiddling
Some people would say that I learned almost everything I know by fiddling. The key is knowing what to fiddle with.
If you want the full works on C++ Mr Stroustrup is your man. It's his baby.
http://www.amazon.com/s?ie=UTF8&keywords=History&rh=n%3A565718%2Ck%3AHistory&page=1[^]
If this is the latest one it's got lots of STL goodness as well. For advanved STL usage and scary template stuff see www.boost.org[^]
For Microsoft technologies like Win32 and MFC then MSDN is really the definitive source.
It took me a few years to get all the technologies separated out in my head and get a grip on what's what. I guess it's pretty normal.
Nothing is exactly what it seems but everything with seems can be unpicked.
|
|
|
|
|
Hi,
I'm trying to solve a problem I have, when I run my program in debug mode is works without a problem, but when I run it in without debug it gives me a Unhandled win32 exception. When I go into the debug from there in the output Unhandled exception at 0x7c911e58 in program.exe: 0xC0000005: Access violation reading location 0x00000000. Any idea of how I can track down what is causing this problem?
Thanks
Simon
|
|
|
|
|
simoncoul wrote: when I run my program in debug mode...
Are you using F5 or Ctrl+F5?
Have you read this article?
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi I'm using VS2k5 and using Ctrl+F5, I'm taking a look at those things in the website you gave me but I have no idea where to start looking, like I'm assuming that this is probably a allocationg error right?
Simon
|
|
|
|
|
A debug run tends to give your uninitialized pointers a garbage memory address, so if you check the value of these pointers, be careful.
|
|
|
|
|
Could you explain this a bit more? Like it doesn't make sense taht the error is occuring in the release mode of when I run the debug without debugging, I thought the whole point of bugging was to find errors so they won't be in the final product
thanks again
Simon
|
|
|
|
|
simoncoul wrote: ...the error is occuring in the release mode of when I run the debug without debugging...
This makes no sense. What exactly are you trying to say?
simoncoul wrote: ...I thought the whole point of bugging was to find errors so they won't be in the final product
You thought wrong. "Bugging" is the act of actually putting bugs in the code. Identifying and eradicating those bugs is called "debugging."
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
So...to run an app in the bugger...is that Alt-F5?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
yeah that is fine for now, but when I need to make a final product it will not work.
|
|
|
|
|
Right - remove the debugging info when you ship it.
But for debugging, you need a release configuration (using non-debug libraries, any code
optimizing enabled, etc.) but WITH debug info so you can debug it easier
You probably want the /DEBUG linker switch too.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
I've tried doing the following:
if (pObj != NULL)<br />
{<br />
}
...but pObj was never NULL in the first place, if I didn't initialize it to NULL, since the debugger will give it a bad memory address like 0xbaadf00d (bad food? ), which is why you should always initialize your pointers to 0 if you aren't about to use them right away.
|
|
|
|
|
simoncoul wrote: Hi I'm using VS2k5 and using Ctrl+F5...
Use F5 instead.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
simoncoul wrote: When I go into the debug from there in the output Unhandled exception at 0x7c911e58 in program.exe: 0xC0000005: Access violation reading location 0x00000000. Any idea of how I can track down what is causing this problem?
If you attach to a debugger there, then you should be able to back through the stack trace to the
offending line of code.
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
That's what I'm trying to do but it just points me to the free.c file, and I can't find out which part of the code I wrote is pointing to it.
|
|
|
|
|
simoncoul wrote: and I can't find out which part of the code I wrote is pointing to it.
There's none of your code in the call stack?
Have you included debug info (/Zi compiler option) in the release build configuration?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
alrite I enable that and it's pointing me to this
n0_L=new double [N+2];
but I don't see what would be wrong about that, it declared like this
double *n0_L;
And at the end of the function that uses that value I have
delete [] n0_L;
and N is the value I need and I added 2 just to be sure I don't over write anything and it only holds no more then 40 numbers.
Thanks
|
|
|
|