|
We seem to be hitting a fragmentation issue where we go to malloc 380MB on a machine with 1000MB and 3000MB swap and then we get a NULL pointer return from malloc(). This is happening intermittently since we went to VC7. Any ideas on how to work around this?
The process shows in PERFMON that it only owns 600MB at the time the 380MB allocation fails and 720 out of 1000MB are in use (72% systemwide).
Thanks for any clues
|
|
|
|
|
Why not use GlobalAlloc() in a test run last week I found a could allocate a buffer of 1.3 gig on a machine with 512K of ram, running Windows XP professional.
Trust in the code Luke. Yea right!
|
|
|
|
|
how can I catch event of clicking on minimize button
|
|
|
|
|
Write a handler for CWnd::OnSysCommand() and handle the case where nID is SC_MINIMIZE . Be sure to call the base class CWnd::OnSysCommand() method for stuff you don't want to trap.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ok, so the obvious:
SetScrollPos()
doesn't seem to be working. Can anyone tell me how to auto-scroll down 1 line each time a new item is added that would be out of view?
Thx!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
One way is to SetCurSel to the last item in the list each time you add an item.
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
SetCurSel is not a mamber of CListCtrl
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Whoops, I was thinking of CListBox.
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
Try m_list.EnsureVisible(m_list.GetItemCount()-1)
- Shog9 -
I'd show a smile but I'm too weak
I'd share with you, could I only speak
|
|
|
|
|
hi folks,
Does someone know how to read/write files summary properties in C||C++?
I mean the info we get by right clicking and selecting properties then summary...
I tried getting that from the net and msdn without luck.
Any info greatly appreciated,
Remy
|
|
|
|
|
These should get you started:
SHGetFileInfo()
CFile::GetStatus()
GetFileAttributes()
GetFileTime()
|
|
|
|
|
Thanks David for your fast reply.
But i still didnt find how to do the trick.
Id like to store and retrieve information in the file and i thought i could do that directly.
if i go to the file properties, i see filds like description, origin, title subject content etc. Im trying to find a way to write on these fields.
Any idea?
|
|
|
|
|
One solution is SetFileAttributes().
Kuphryn
|
|
|
|
|
|
Is there a default color list for Windows application ?
For example, on the "Display Properties" under the Appearance, there's a small popup with 20 default colors; the same thing in Wordpad font dialog , but with a different UI.
Also in Word, there are 40 default colors in the nice popup window.
So, is there a default color list somewhere? not the UI, but the RGB values and names.
What can I search for in MSDN to find that out ?
Thanks.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
There are enough similar controls here on cp.com
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
I'm not looking for a UI, just the color list (RGB value and color names).
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
That's over 16.7 million colors. I don't think such a list exists! The one's that you do see have just chosen the more common colors to display.
|
|
|
|
|
I know that, I just wondering if there's a default SUBSET of 8, 16, or 32 basic colors (name vs. RGB) defined somewhere in the windows API ?
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
Well, you could search all of the .H files for occurrences of RGB. That'll tell you for sure. Otherwise:
#define RED RGB(255,0,0)
#define WHITE RGB(0,0,0)
#define BLACK RGB(255,255,255)
#define GREEN RGB(0,255,0)
#define BLUE RGB(0,0,255)
#define PURPLE RGB(255,0,255)
#define LTBLUE RGB(0,255,255)
#define YELLOW RGB(255,255,0)
etc...
|
|
|
|
|
since there seems to be no default values, I will define them myself!
maybe not using #defines, but something similar
anyway!
Max.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
This article colour picker cb[^] has a code listing of the common IE colours (about 128) with names and RGB values. You should be able to extract them and use those.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
Does anyone know how to get the Display Name (e.g. "Microsoft Word Document") from a given extension (e.g. "doc").
I can't use ShGetFileInfo, because that requires a file you want information for. I won't have a file, just an extention.
Thanks!
|
|
|
|
|
Diarrhio wrote:
I can't use ShGetFileInfo
Sure you can - just use the SHGFI_USEFILEATTRIBUTES flag & the filename can be bogus.
- Shog9 -
I'd show a smile but I'm too weak
I'd share with you, could I only speak
|
|
|
|
|