Re: Setting Font : Is this a right way ...
"Tim Roberts" <timr@probo.com> wrote in message
news:u651s3dvta3c6minlamp9fpjouul2v1ild@4ax.com...
"meme" <meme@myself.com> wrote:
Here I got a dialog based app... it has a Edit control on it....what I'm
trying to do is let user change it's font... for this I'm doing...
...
pre-thanks for any input... :)
And, did this work?
You don't need hwndEdit as a global. Just call GetDlgItem when you need
it. It is a very low-cost API.
--
Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc.
Hi.... thanks for responding...
Yes it seems working...
Prev. the func. was like this...
void InitLogFont()
{
HFONT oldFont;
newFont = (HFONT)SendMessage(hwndEdit, WM_GETFONT, 0, 0);
GetObject(newFont, sizeof(lf), &lf);
DeleteObject(oldFont);
}
but then I noticed when executing the edit control got strange font and
after a while the app just "vanish" from the desktop, no error msg...
nothing.... just vanishing....
So I thought deleting the oldFont maybe the problem...so I posted here....
and also change that in the code. :)