|
code
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Font Dialog BoxHow can I get the Font Dialog Box to show only Fontname, Size and Color? I
don't want those other options such as Script, Understrike, etc. -- Thanks. "Saucer Man" <saucerman@nospam.net> wrote in message Looks like you're screwed. The cdlCFEffects flag "specifies that the dialog news:6pGdnUDcZueOedPeRVn-vw@adelphia.com... > How can I get the Font Dialog Box to show only Fontname, Size and Color? > I don't want those other options such as Script, Understrike, etc. box enables strikethrough, underline, and color effects." Therefore you can't directly turn off two of these items and yet have the third one stay. This is not a VB thing; cdlCFEffects maps directly to the CF_EFFECTS flag that is part of the Flags member of the CHOOSEFONT structure, which is what the Windows API function ChooseFont() uses. "Saucer Man" <saucerman@nospam.net> wrote in message As Jeff said, you can't. However, creating your own "choose font" dialog news:6pGdnUDcZueOedPeRVn-vw@adelphia.com... > How can I get the Font Dialog Box to show only Fontname, Size and Color? > I don't want those other options such as Script, Understrike, etc. box with just those 3 things should not be that difficult. You could even use a ImageCombo for the font name and include the same icons for types of fonts. Other than that, just ignore the other choices if the user makes them (although I suppose that could confuse the user or cause him/her to think there's a "bug" if you do that). -- Mike Microsoft MVP Visual Basic
Show quote
Hide quote
"MikeD" <nob***@nowhere.edu> wrote in message I wonder if you can hook the font dialog like you can the Open/Save dialog news:e$hWCTH0FHA.164@TK2MSFTNGP10.phx.gbl... >> How can I get the Font Dialog Box to show only Fontname, Size and Color? >> I don't want those other options such as Script, Understrike, etc. > > > As Jeff said, you can't. However, creating your own "choose font" dialog > box with just those 3 things should not be that difficult. You could even > use a ImageCombo for the font name and include the same icons for types of > fonts. > > Other than that, just ignore the other choices if the user makes them > (although I suppose that could confuse the user or cause him/her to think > there's a "bug" if you do that). and simply make those controls invisible. [...] Well, phooey. I looked into it and it appears that all the fancy hooking is for the Open/Save dialogs only. I really thought I was on to something.... On Fri, 14 Oct 2005 10:39:40 -0400, "Jeff Johnson [MVP: VB]"
<i.get@enough.spam> wrote: > I'm pretty sure it works with ChooseFont too, but seems it might look>I wonder if you can hook the font dialog like you can the Open/Save dialog >and simply make those controls invisible. [...] Well, phooey. I looked into >it and it appears that all the fancy hooking is for the Open/Save dialogs >only. I really thought I was on to something.... sorta goofy with all that empty space on the dialog (unless you went the whole 9 yards and also supplied your own RT_DIALOG custom template). Might be better to simply disable them - wait for it to init then flip the WS_DISABLED bits on those controls. Really wouldn't even need a hook for that. -Tom MVP - Visual Basic (please post replies to the newsgroup) "Jeff Johnson [MVP: VB]" <i.get@enough.spam> wrote in message It looks to me like you can hook it. There's an lpfnHook member of the news:%233QEd0M0FHA.2884@TK2MSFTNGP09.phx.gbl... > > I wonder if you can hook the font dialog like you can the Open/Save dialog > and simply make those controls invisible. [...] Well, phooey. I looked > into it and it appears that all the fancy hooking is for the Open/Save > dialogs only. I really thought I was on to something.... CHOOSEFONT structure and the callback procedure gets a WM_INITDIALOG message. During the processing of this message, it should then just be a matter of making the unwanted controls invisible. However, I'd bet that it's probably easier to just create your own dialog. -- Mike Microsoft MVP Visual Basic
Show quote
Hide quote
"MikeD" <nob***@nowhere.edu> wrote in message Yeah, you can hook it, but I was going on the fact that the documentation news:e0dksKN0FHA.800@TK2MSFTNGP12.phx.gbl... >> I wonder if you can hook the font dialog like you can the Open/Save >> dialog and simply make those controls invisible. [...] Well, phooey. I >> looked into it and it appears that all the fancy hooking is for the >> Open/Save dialogs only. I really thought I was on to something.... > > > It looks to me like you can hook it. There's an lpfnHook member of the > CHOOSEFONT structure and the callback procedure gets a WM_INITDIALOG > message. During the processing of this message, it should then just be a > matter of making the unwanted controls invisible. However, I'd bet that > it's probably easier to just create your own dialog. talks about things like the CDM_HIDECONTROL message only being for the Open and Save dialogs. Without using something like Spy++ to determine the IDs of the check boxes (if that's even possible) there's no easy way to hide these controls that I can see. On Fri, 14 Oct 2005 14:42:27 -0400, "Jeff Johnson [MVP: VB]"
<i.get@enough.spam> wrote: >... Without using something like Spy++ to determine the IDs of Entirely possible. They're defined in Dlgs.h, but the the naming>the check boxes (if that's even possible) there's no easy way to hide these >controls that I can see. convention isn't very helpful (generic st1, cmb1, etc) unless you also look at the actual template (Font.dlg). Way easier to grab them with Spy IMO. Then just flip the bits in the WM_INITDIALOG handler / hook. Of course that doesn't change the fact it's still going to look like crap with all the empty space. <g> -Tom MVP - Visual Basic (please post replies to the newsgroup)
Show quote
Hide quote
"Tom Esh" <tjeshGibber***@suscom.net> wrote in message I still say it'd be easier to create this dialog from your own form. <g>news:gk00l15mbkea5sq3bbp5j7iajkmtmalbu3@4ax.com... > On Fri, 14 Oct 2005 14:42:27 -0400, "Jeff Johnson [MVP: VB]" > <i.get@enough.spam> wrote: > >>... Without using something like Spy++ to determine the IDs of >>the check boxes (if that's even possible) there's no easy way to hide >>these >>controls that I can see. > > Entirely possible. They're defined in Dlgs.h, but the the naming > convention isn't very helpful (generic st1, cmb1, etc) unless you also > look at the actual template (Font.dlg). Way easier to grab them with > Spy IMO. Then just flip the bits in the WM_INITDIALOG handler / hook. > Of course that doesn't change the fact it's still going to look like > crap with all the empty space. <g> -- Mike Microsoft MVP Visual Basic On Fri, 14 Oct 2005 19:52:16 -0400, "MikeD" <nob***@nowhere.edu> Yep, unless you really enjoy hooks and Api hackery :-)wrote: >I still say it'd be easier to create this dialog from your own form. <g> -Tom MVP - Visual Basic (please post replies to the newsgroup) Thanks for all the comments and suggestions.
-- Show quoteHide quoteThanks. "Tom Esh" <tjeshGibber***@suscom.net> wrote in message news:1hn0l15fajn7c6qvo14a2lf73nbsvhr300@4ax.com... > On Fri, 14 Oct 2005 19:52:16 -0400, "MikeD" <nob***@nowhere.edu> > wrote: > >>I still say it'd be easier to create this dialog from your own form. <g> > > Yep, unless you really enjoy hooks and Api hackery :-) > > > -Tom > MVP - Visual Basic > (please post replies to the newsgroup)
Difference in SQL Syntax between Access and MySQL (from VB6 project using ADO)
Using shellexecute...... Ping Ken Halter kill a proccess for a specific user VBA and ADODB.Recordset question Amber Alert Ticker on VB6 Form Problem offering font selection with listview in regions other than US user-defined type not defined Determine when report printed to specific printer Resizing text boxes |
|||||||||||||||||||||||