|
-
August 10th, 2005, 05:00 PM
#1
GDI leak with WM_SETTEXT
Somehow I am creating lots and lots of GDI objects when the code
SendMessage(radius->handle(), WM_SETTEXT, 0, (LPARAM) (LPCSTR) double_to_string(radius->value()));
is run. For clarity,
char * double_to_string_static(double number_to_convert)
uses for the most part
_fcvt(number_to_convert, 1 /*decimal places*/, &decimal_offset, &sign_offset)
for it's work. Somehow the pointer that is sent as a message to my control, a static, creates a new GDI object. And eventually it becomes unstable and the controls start to get grey backgrounds and the contents are blanked out. This is where I've currently narrowed down the bug. If this isn't the cause of the grey craziness then at least it's one less potential bug.
Thannks in advance.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|