Creating a presenter/view pair for win32 control

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Creating a presenter/view pair for win32 control

Yar Hwee Boon-3
Hi all,

I'm evaluating a third party WYSIWYG HTML editor Win32 control. I tried  
creating a ValueConvertingControlView subclass and overrode #winClassName,  
#displayValue, #displayValue: (those 3 seems the only "compulsory" methods  
on first run). However when I do a "MyView show" and then close it, the  
system font, ie. the fonts in the method browser, card containers etc all  
appeared as bold. I traced it till the WM_DESTROY message, and it looks  
like the original window procedure of the control is causing this (I don't  
have the source code). Am I doing it correctly? Or does it mean that the  
window procedure is doing something funny, and I should go back to the  
author? Are there any guidelines on how to create presenter/view classes  
for new controls? ie. besides the image examples :)

--
Regards
HweeBoon
MotionObj


Reply | Threaded
Open this post in threaded view
|

Re: Creating a presenter/view pair for win32 control

Udo Schneider
This sound like an effect I once had with the IP control. It seems that
the control you are using is freeing the Font Dolphin provides. You
basically have to provide a copy of the Font instead of the Font itself.

Take a look at the following thread:
http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=5c159675946edf5e&seekm=4064d800%40news.totallyobjects.com#link7

CU,

Udo


Yar Hwee Boon wrote:

> Hi all,
>
> I'm evaluating a third party WYSIWYG HTML editor Win32 control. I tried  
> creating a ValueConvertingControlView subclass and overrode
> #winClassName,  #displayValue, #displayValue: (those 3 seems the only
> "compulsory" methods  on first run). However when I do a "MyView show"
> and then close it, the  system font, ie. the fonts in the method
> browser, card containers etc all  appeared as bold. I traced it till the
> WM_DESTROY message, and it looks  like the original window procedure of
> the control is causing this (I don't  have the source code). Am I doing
> it correctly? Or does it mean that the  window procedure is doing
> something funny, and I should go back to the  author? Are there any
> guidelines on how to create presenter/view classes  for new controls?
> ie. besides the image examples :)
>


Reply | Threaded
Open this post in threaded view
|

Re: Creating a presenter/view pair for win32 control

Yar Hwee Boon-3
On Fri, 24 Sep 2004 20:16:51 +0200, Udo Schneider  
<[hidden email]> wrote:

>
> This sound like an effect I once had with the IP control. It seems that  
> the control you are using is freeing the Font Dolphin provides. You  
> basically have to provide a copy of the Font instead of the Font itself.
>
> Take a look at the following thread:
> http://groups.google.com/groups?hl=en&lr=&ie=UTF-8&frame=right&th=5c159675946edf5e&seekm=4064d800%40news.totallyobjects.com#link7

Ahh... Should have remember reading this thread.. Manually setting the  
font after #show-ing doesn't work, but Blair's #setFont override seems to  
work though. Thanks!

--
Regards
HweeBoon
MotionObj