Modeless CFontDialog?? 
Author Message
 Modeless CFontDialog??

I am trying to place a CFontDialog on a PropertyPage. I derived a class
from CFontDialog, modified the contructor use a modified Font.dlg
template, and called it in my CPropertyPage's OnInitDialog() member.

The only problem that I am having is that when I open the dialog, there
is no data displayed in the font lists.

To create my Modeless CFontDialog, I called Create then SetWindowPos. I
was thinking that I would manually have to call the ChooseFont member,
but this did not work.

Does anyone know how to do this or can you point me in the right
direction to look?

Thanks for any assistance.
-Anthony D.



Sun, 30 Jul 2000 03:00:00 GMT  
 Modeless CFontDialog??

You'll definitely have to call ChooseFont yourself, since there is now
nothing that calls DoModal on the dialog. The problem is that ChooseFont
will not return until the dialog is dismissed, thus putting your property
sheet out of business.

I've found it necessary to create the dialog on a separate thread and then
reparent it via SetParent. Hooking messages via SetWindowsHookEx will also
be necessary in order to support ctrl-tab, make OK and Cancel behave
correctly, etc.

Unfortunately this is a difficult project; however, it can be gotten to
work.

--
________________________________________________________________

Ray Brown                       Home: (612) 892-7329
Lawson Software                 Office: (612) 379-8086 x4393
1300 Godward Street             Fax: (612) 379-8512

________________________________________________________________

Quote:

>I am trying to place a CFontDialog on a PropertyPage. I derived a class
>from CFontDialog, modified the contructor use a modified Font.dlg
>template, and called it in my CPropertyPage's OnInitDialog() member.

>The only problem that I am having is that when I open the dialog, there
>is no data displayed in the font lists.

>To create my Modeless CFontDialog, I called Create then SetWindowPos. I
>was thinking that I would manually have to call the ChooseFont member,
>but this did not work.



Thu, 03 Aug 2000 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. How to make a Modeless CFontDialog?

2. CFontDialog derived class as Modeless??

3. Modeless dialog shall not be modeless !

4. Q: tabbing not possible in modeless propertysheet / modeless dialog

5. Modeless property sheet in a modeless dialog box

6. Newbie, help with custom CFontDialog

7. Newbie, help setting default values to a custom CFontDialog

8. CPropertySheet CFontDialog

9. CFontDialog Init problem

10. Help: CFontDialog

11. CFontDialog sets initial font color to black

12. CFontDialog question

 

 
Powered by phpBB® Forum Software