|
Thanks
I moved the WndProc for the Toolbar Popup, and the Treeview CreateWindow to the Class that populates the Treeview with Folder Contents in a new function. So now I just make the window, position it, and then create the treeview on the fly when loading the folder contents.
Sort of confusing of how it works, but I get it now.
Thanks for giving me the low down on it, was getting frustrated with it.
|
|
|
|
|
I'm not exactly sure what I was expecting with this, but when multi-column sorting is enabled, I do not see anything special happening with the virtual OnCompareItems() function. When I click the first column, that function is called the appropriate number of times, with iColumn set to the index of the column I clicked. All items are sorted fine. When I shift-click the second column, again that function is called the appropriate number of times, with iColumn set to the index of the second column I clicked (i.e., no mention of the first column). Both of the columns I clicked have a "sort" arrow in its header, however.
Any ideas?
Thanks.
- DC
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
So, I had memory leaks and I was helped by a benevolent programmer (Chuck...) and kicked to the ground by another (Richard...); both of which helped me solve the problem.
Now that we/I solved the memory leaks in my program, is there anything I need to do since I ran the program forever not knowing there were leaks?
|
|
|
|
|
Member 7990715 wrote: ...is there anything I need to do since I ran the program forever not knowing there were leaks? Wouldn't you be in a better position to know what needs to be done to your program?
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
My program now has no memory leaks. I thought since there were memory leaks for a while, the memory on my computer might need attention; l; like go delete the huge amounts of variables I left un-deleted.
No?
Are you saying once I fix my program from memory leaks that there are no lasting problems with the computer?
|
|
|
|
|
assertfailed wrote: I thought since there were memory leaks for a while, the memory on my computer might need attention; Not if your program has since been shut down.
assertfailed wrote: Are you saying once I fix my program from memory leaks that there are no lasting problems with the computer? That is correct.
"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
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
|
The memory that "leaked" is the address space of the program you are running. What happens to long running programs is that they lose track, i.e. leak, allocated memory so they grow over time, eventually running out of memory (virtual address space). At that time, malloc(), new, or other such calls that request more memory fail and the program will probably start misbehaving.
However, when you stop the program, kill it with task manager, click the big "X" to close the window, or other such ways to stop programs in Windows (or Linux or whatever), the program is removed from physical memory and all that "lost" memory is given back.
The Operating System (Windows, Linux, etc) never really loses track of the memory, only the program running does. All is recovered when the program dies (in natural or unnatural ways).
Back in the '60s, we used to say that certain operations (like right or left shifts) dropped the discarded bits in the "bit bucket". We'd tell Computer Science 1 students that the bit bucket needed to be periodically emptied Same thing here, we don't need to go back and mop up the leaks 
|
|
|
|
|
|
you should go have a beer. your work is done!
|
|
|
|
|
|
Sorry to contradict those other nice folk, but your job is *not* done!
You might be leaking GDI objects too!
Ie, pens, brushes, DCs, and so on. And they're harder to track down...
I have no idea what framework you're using. With pure win32, you need to be nice and careful. With MFC, most of the work of grabbing and releasing is done for you, but you can still mess up.
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
how can convert BSTR to DWORD ?
|
|
|
|
|
Have you searched the internet? Sounds way too trivial to me.
"Real men drive manual transmission" - Rajesh.
|
|
|
|
|
i didnt find about this, just from DWORD to BSTR !!
|
|
|
|
|
Just pass the BSTR like any other string object or character array to atoi() or _tstoi() and cast the returned value to a DWORD .
|
|
|
|
|
It's a delayed answer, but there are two answers:
1) A BSTR is just a pointer, so you can just treat that as a big fat integer. Be careful of 32bit vs 64 bit compiles though.
2) A BSTR is a way of representing a string (it's a counted string), and as such depends on what the string is.
Do you mean the number in the string? "1234" -> 1234?
In which case scanf and friends.
What about "apple" ? Is that 0?
Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
|
|
|
|
|
hi all,
please can anybody help me
6F00 return on reading of smard card.
i dont know how can i solve out please help me for this.
thanks.
|
|
|
|
|
How can anyone answer this? We have no idea what sort of card you are using, what interface it is connected to and what code you are using to access it. Please give some useful information about your problem.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
while reading a smart card according to GSM standard its return 9000 at the end of response string ,as a normal ending of the command,
but for device its reaturn 6f00 so no data is fetched here.
thanks.
|
|
|
|
|
And exactly what is that supposed to tell us? Try reading the documentation to find out what 6F00 indicates.
Unrequited desire is character building. OriginalGriff
I'm sitting here giving you a standing ovation - Len Goodman
|
|
|
|
|
Hi Guys!
Nowadays i am appearing for interviews with expertise in COM+/DCOM/Web-services.
I have done little work in MFC may be close to 8 months for a maintenance project.
During interviews interviewers are more focused in MFC rather than my core expertise,now i am planning to learn MFC as well...
I have been asked about many macros in the interviews..
I have following question:
1)Do i need learn about all or most of the important classes..?
2)Do i need to know all the Macros..?
3)how about win32..?
what else i should learn in this...
what you guys would advise me in this ???
i bought a MFC book "MFC Programming from the ground up"
Please help and Thanks in advance.
vikas da
|
|
|
|
|
tasumisra wrote: 1)Do i need learn about all or most of the important classes..?
The scope of this question is quite wide and the answer would be "Yes" and a "No". Basically the interviewers try to understand your in depth knowledge about MFC. A few classes like CObject,CArchive(helps in Serialization), CCmdTarget (foundation class for message map architecture), CWinThread etc would help. The questions put in front of you might depend on the project requirement.
tasumisra wrote: 2)Do i need to know all the Macros..?
Expected is "yes". But it seems hard to gather the knowledge on everything. BEGIN_MESSAGE_MAP etc should be known.
tasumisra wrote: 3)how about win32..?
Win32 is the base for MFC as it is built on top of it. Read Windows Internals to understand how things work.
Many people would also suggest to have a little or more knowledge of everything in MFC. But the crux is "The more you code, the better you become in terms of knowledge, understanding and preparation"
You talk about Being HUMAN. I have it in my name
AnsHUMAN
|
|
|
|
|
I have attended a lot of interviews for VC++ and MFC Requirements. it depends from person to person. You certainly need to know the basics of MFC, and win32. You would not have used all the macros that is available in MFC. So what you know can be explained to them really well so that they can get convinced that you have reall y worked on them or have knowledge on it...
You can get a job by learning a lot of things but what really matters is the practical experience. I wish you all the best for your interviews.
Every new day is another chance to change your life.
|
|
|
|
|
Thank you so much AnsHUMAN and Chandra..
I guess i need to work hard for MFC...
vikas da
|
|
|
|