|
Thanks!
There was a GDI leak allright. The leak occurs in my drawing function for the ImageButton. Now I only need to figure out what is causing it.
Do you know of any 'typical' pitfalls leading to this kind of leakage?
|
|
|
|
|
Sounds like you are running out of resources. Are you making sure you delete the images no longer showing?
|
|
|
|
|
Sounds like you might not be freeing them. If you are loading bitmaps, make sure to use the DeleteObject( HDIOBJECT ) before continuing on. If this doesn't work, try redrawing the object section with the images using the RedrawWindow( HWND, DWORD ) and see if this kicks it.
|
|
|
|
|
Yeah, it was a call to GetIconInfo which caused the bug. The received bitmaps were never deleted
Thanks for all your assistance!
|
|
|
|
|
Is there a way of getting Microsoft Visual C++ 6.0 (standard edition) to keep backup copies of files when you edit them? This is the only editor I’ve ever used that doesn’t keep backup files , unless there’s some option I don’t know about. I would expect such an option to be in Tools->Options->Editor, but it’s not there.
|
|
|
|
|
Automatic backups for editors truly s*ck since it tends to save exactly the version you don't want...
You need to get yourself some kind of version control handling (cvs (free), sourcesafe (commercial MS), clearcase (commercial IBM/Rational).
And if the paths that I have followed/have tread against the flow/there is no need for sorrow
I am coming home
Return, Crüxshadows
|
|
|
|
|
|
hi there,im coding in c++,im trying to list all the contents of c:\\,like directorys,files and sub directories,my main aim is to write a file manager,i have used the "findfirstfile" api call to find out if a certain file is in a certain directory,but this isnt achiving what im trying to do,
does anybody have any information regarding how i can list all the files in a directory?
thanx
chris
|
|
|
|
|
Hello!
Try to use wildcards:
WIN32_FIND_DATA data = {0};
HANDLE hFind = FindFirstFile(_T("c:\\*.*"), &data);
....
Hope that helps
|
|
|
|
|
hi ya
thanks for your help,it seems that agsactly what i was missing out
you proberbly saved me a lot of time,i wuda bin tinkerin with the code for ages.
thanks again
chris
|
|
|
|
|
I'm writing an app. in VC++ and have chosen a dialog project. What is the best way to resize my child windows when resizing my main dialog?
For eg. how to resize a static groupbox?
Should I overload the WM_SIZE for my CDialog class?
Thanks – APe
APe
|
|
|
|
|
|
Hello!
Context:
- Release version of application (written in C++/MFC) is shipped to the users
- Some users want to write plugins (dll's) for this application
Problem:
- memory allocator is different for debug version and release version
Possible solutions:
- Final application will ship in two versions: release, and release with debug parts
- User will not be able to develop debug version of plugin, only release version
Well, both above solutions are not so good (I do not know other solutions, maybe apart of rewriting everything to COM). But the question is, what should be set in release version of app to allow users to use debug version of it's own plugin? And, what is more important: what will be the impact of using debug components in release version? (This is not really matter of speed, but a matter of cracking the app)
confused
Thanks for some help...any help
|
|
|
|
|
Releasing a debug version of you app is a matter of trust, since it make it easer of cracker (reverse engineering) easer. If error checking is at a high enough level then users of your app who wish to develop plugins can use the release version of you app.
How you allocate memory, in the debug version, is irrelevent to the development of a plugin. The only reasons for providing a debug version of your application is to provide more information to the plugin developer to help with debuging his/her code and or to get feed back as to why a bug in thier plugin caused a problem in your application (could be very usefull).
I know you have a lot to think about, but weigh your decision carefully.
If you can, place youself in the position of the plugin designer and try to develop a plugin for the release version. Write down what the plugin designer knows about the development of a plugin for your application and try to think from their perscpective (if they could not know it then put it out of your mind). This will not only help you get theit perspective on developing plugins for you application but help you determine what information that you need to release to make it easer for them.
I do not know if any of this helped you. Just remember in order to help the other guy/girl you first must place youself in thier shoes.
INTP
|
|
|
|
|
anyone know how to read email accounts from outlook or outlook exp?
Best Wishes,
ez_way
|
|
|
|
|
Hi BaldwinMartin,
you seem to be very much into these email issues.
If you understand under "account" the credentials with which the user connects to SMTP and POP3 servers then do the following
Outlook Express:
1.Get the "Default Mail Account" dword value of key HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager (Let's assume that this value was 00000005)
2.Change this number into an 8-digit string
3.Enumerate the values of HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\00000005
4.You will find such cuties under this values like user name, email address, connection name, server names etc.
5.Both the POP3 username and password are stored here, but the password is encrypted.
Outlook:
You cannot find them in the registry because all this data is encoded, you will have to make a COM connection to Outook, and get it from there. See Office automation (Outlook add-in)
Peter Molnar
|
|
|
|
|
Yes I am writing a email manager.
Thanks
Best Wishes,
ez_way
|
|
|
|
|
Yes I see, how did you ever learn so much? Your IQ must be 200!
My registry on XP H shows.
HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts
HKEY_CURRENT_USER\Software\Microsoft\Internet Account Manager\Accounts\00000001
Account Name ez_way
Password enc
Pop3 Server mail.charter.net
SMTP CERTIFICATE F1 ^f ....
display name ez_way
email address ez_way@charter.net
replayto Address info_1@charter.net
smtp server mail.charter.net
This information is not enc. and can be read for all my accounts (00000001 - 00000008)
My question is why must I "Change this number into an 8-digit string" it is already REG_SZ ?
I am trying to understand, please be patient.
Best Wishes,
ez_way
|
|
|
|
|
Hi BaldwinMartin,
you are of course right, the 8 digit number is a already a REG_SZ, it hasn't got to be converted to a string again.
For exploring the registry and file system see
http://www.sysinternals.com[^]
for RegMon and FileMon, free tools that help you figure out how the OS works.
Peter Molnar
|
|
|
|
|
Thanks again Peter, you are the BEST!
|
|
|
|
|
Thanks again Peter, you are the BEST!
|
|
|
|
|
Hi!
I am building a chat application and I'd like the main chat window to scroll down (such that the last message is at the bottom of my CRichEditCtrl) when the user enters a message.
I have not been yet able to do this. I know about LineScroll, but how many lines should I scroll with it? (Because the user can move the scroll bar upwards whenever he wants.)
Thanks!
|
|
|
|
|
Before you update your CRichEditCtrl with the latest chat info, call GetLineCount to get the line count before line addition. Then add lines to it, and call GetLineCount again.
Do a LineScroll with the difference.
Peter Molnar
|
|
|
|
|
You didn't understand what I want.
Maybe I wasn't clear enough.
Doing what you said would work if the user wouldn't change the scrollbar's position.
But let's say he wants to see a message which is upwards and he scrolls upwards.
When a new message is entered, I want the CRichEditCtrl to scroll down as I said, with the last message being on the last line of the CRichEditCtrl.
So, how can I make it happen?
|
|
|
|
|
Then your task is even simpler:
1.Update your CRichEditCtrl
2.Call GetFirstVisibleLine
3.Call GetLineCount
4.Call LineScroll with the difference as a parameter. (3./ - 2./)
Peter Molnar
|
|
|
|