|
Yes the calling code is as follows
hbm = m_pSatMemMap->LoadSatRender();
...
hOldBitmap = (HBITMAP)SelectObject(dcImage, (HGDIOBJ)hbm);
...
if ( hOldBitmap != NULL )
SelectObject(dcImage, hOldBitmap);
if ( hbm != NULL )
{
if ( !DeleteObject(hbm) )
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hmmm, I don't see anything wrong your code. I assume you traced in debug mode, and it's actually calling DeleteObject.
Is SaveImageToFile creating any gdi objects (not sure why it would, just a thought)?
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I inserted a for loop just before
bitMapLocation = m_pSatMap->SaveImageToFile();
no effect.
Then I put one in front of the
hbm = m_pSatMemMap->LoadSatRender();
and the GDIObject leak was one for every call.
I'm pretty sure its this method.
I thought it might be the loadimage function
Thanks for you help
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
On your for loop in front of LoadSatRender(), we're you calling DeleteObject()?
Just for fun, in your calling routine, change:
if ( hOldBitmap != NULL )<br />
SelectObject(dcImage, hOldBitmap);<br />
to just:
SelectObject(dcImage, hOldBitmap);<br />
(i.e. remove the if statement )
and see if that has any effect.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
had no effect.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Check out this thread...GDI handle count[^]
Is there caching in the system? Is task manager's reporting wrong? Enquiring minds want to know!
Mark
|
|
|
|
|
Sorry, I'm fresh out of ideas, without seeing more of the source.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
I'll keep looking thanks for your time and suggestions. I really appricate it.
Programmer
Glenn Earl Graham
Austin, TX
|
|
|
|
|
Hi
I am trying to understand
BOOL SetProp( HWND hWnd,
LPCTSTR lpString,
HANDLE hData
);
and
HANDLE GetProp(HWND hWnd,
LPCTSTR lpString
);
functions.MSDN writes:
The GetProp function retrieves a data handle from the property list of the specified window
The SetProp function adds a new entry or changes an existing entry in the property list of the specified window
But what is the meaning of "propery list"?Where is it?Is it WNDCLASSEX's members or something else?
I dont understand the benefits of window properties and window propert list.Please help me.
Thanks...
|
|
|
|
|
|
It's basically a map<LPCTSTR,HANDLE> attached to each window.
|
|
|
|
|
Hello,
Edit is derived from class CEdit
int i=0;
vector<Edit*>R;
Edit *p;
p = R[i];
p->SetFocus();
I want to move from one edit box to another which I am able to do.I go from one edit box to another by i++ or i-- depending on the key pressed.and calling the function
R[i]->SetFocus();
But when I click the mouse I am not able to move the focus to the clicked edit box.How should I do it?
In what way should I define a pointer so that I acheive the move ?
Prithaa
|
|
|
|
|
Hi All,
Does anyone know of a way to get an abbreviated time zone string? For example getting "PST" instead of "Pacific Standard Time"?
The following function looked promising but it returns the full time zone string regardless of the format:
size_t wcsftime(wchar_t *wcs, size_t maxsize, const wchar_t *format,
const struct tm *timptr);
The msdn documentation says that passing in %z or %Z as the format returns "Time-zone name or abbreviation; no characters if time zone is unknown" but as mentioned it always returns the full string regardless of which I use.
I looked in the registry thinking that each time zone key might possibly contain an abbreviation but found nothing. Here's one key I looked at "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Time Zones\Pacific Standard Time"
Anyone have any ideas?
Thanks for your help,
Kellie
|
|
|
|
|
South_Bay_Girl wrote: Does anyone know of a way to get an abbreviated time zone string?
Parse the full name? Perhaps it is not useful since duplicate abbreviations render them ambiguous.
led mike
|
|
|
|
|
Thanks Mike, I'm hoping to find something a little more robust but I'll probably end up doing what you mention or making custom registry entries that contain the abbreviations.
Kellie
|
|
|
|
|
Is GetTimeZoneInformation() of any help?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I recently upgraded from Microsoft Visual Studio 2003 to 2005, and now my project won't compile, and I have no idea how to fix it.
The code that is broken:
// Copy Constructor
CImageManager(const &CImageManager);
// Assinment Operator
CImageManager operator = (const &CImageManager);
The error I recieve is:
1>c:\programming\programming\programs\calypso\imagemanager.h(44) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
These constructors are declared as private in a class so that only one instance can be created. This is happening with about 12 other files/classes as well.
Please let me know if anyone knows what is wrong with my syntax and why this all of a sudden changed in the new version of visual studio.
Thanks in advance,
Dustin
|
|
|
|
|
This worked in VS 2003?
// Copy Constructor
CImageManager(const &CImageManager);
// Assinment Operator
CImageManager operator = (const &CImageManager);
I thought it should be:
// Copy Constructor
CImageManager(const CImageManager &);
// Assinment Operator
CImageManager operator = (const CImageManager &);
|
|
|
|
|
Why does Microsoft have to go and fix things so not to allow my bad coding practices.
Yes, I just tried this and it fixes the problem. You are a life saver. If I ever meet you, the beer is on me.
|
|
|
|
|
mmmm ... beer
Cheers!
|
|
|
|
|
there is a problem with my miniport driver (passthru).when enabling hyperthreading. In normal cases it works correctly but when hyperthreading is enabled. the driver fails. is there any way to upgrade the driver so that it will work in hyperthreading mode
vineesh
|
|
|
|
|
Hello !
I have a function which must be in a "demon" thread because
I want that it still running until I close my program.
in fact this function is doing a polling with the hardware and it retreive any occured information from it.
I didn't work with thread or timer but is it a solution for my problem ?
thanks a lot
chokran
zizzzz
zizzzzzzzzzzzzzzz
|
|
|
|
|
i think you should document yourself about Windows services...
|
|
|
|
|
|
Hello,
CRICH is derived from CRichEditCtrl
int index=0;
vector<crich*>RichEditBox;
CRICH *p = RichEditBox[index];
p->SetFocus();
How do I go to index=1 box in the above example.
p++ will not help as I tried that
Any ideas
Prithaa
|
|
|
|