Font dialog Sample Window problem

Am using a CFontDialog derived class (CInwinFontDlg) to allow user to select
new font/size etc. But for some reason cannot get the text in Sample window
to either show or change when font attribute selected. The following is how
my font dlg is constructed.

CInwinFontDlg dlg(&lf, CF_SCREENFONTS| CF_INITTOLOGFONTSTRUCT|
CF_FIXEDPITCHONLY| CF_SHOWHELP | CF_ENABLETEMPLATE);

Does one have to control the look and appearance or does the Common Windows'
font dialog do this with the which CF flag?

-- 
Kevin Kohler
INWIN Development Manager
Response Technology, Inc.


0
4/13/2004 4:32:25 PM
vc.mfc 33608 articles. 0 followers. Follow

1 Replies
592 Views

Similar Articles

[PageSpeed] 52

Kevin,

How you construct the class is not enough info, much more important is what
happens in the class itself. You are obviously adding your own dialog
template, for example. Try remove that part, for a start, removing code from
the CInwinFontDlg until the sample window works. This will probably give
more detailed info, which will also make it possible for someone here to
assist you!

Johan Rosengren
Abstrakt Mekanik AB

"Kevin Kohler" <kevinkohler@responsetech.com> a �crit dans le message de
news:Op1ZCQXIEHA.2480@tk2msftngp13.phx.gbl...
> Am using a CFontDialog derived class (CInwinFontDlg) to allow user to
select
> new font/size etc. But for some reason cannot get the text in Sample
window
> to either show or change when font attribute selected. The following is
how
> my font dlg is constructed.
>
> CInwinFontDlg dlg(&lf, CF_SCREENFONTS| CF_INITTOLOGFONTSTRUCT|
> CF_FIXEDPITCHONLY| CF_SHOWHELP | CF_ENABLETEMPLATE);
>
> Does one have to control the look and appearance or does the Common
Windows'
> font dialog do this with the which CF flag?
>
> -- 
> Kevin Kohler
> INWIN Development Manager
> Response Technology, Inc.
>
>


0
4/15/2004 5:01:24 AM
Reply:

Similar Artilces:

Windows update just does not find any patches for windows
I run windows update but no patches ever show up for windows. Belarc advisor and It.shavlik both say that I am missing critical and regular patches. Any thoughts would be appreciated. Always state your full Windows version (e.g., WinXP SP3; WinXP 64-bit SP2; Vista SP1; Vista 64-bit SP2; Win7; Win7 64-bit) when posting in a forum or newsgroup. Please do so in your next reply. RonRPh wrote: > I run windows update but no patches ever show up for windows. Belarc > advisor > and It.shavlik both say that I am missing critical and regular patches. > Any > thoughts ...

Printing Barcode Font in RS2008
We have several reports that use custom barcode fonts, and these have been working happily for ages. We have recently deployed our reports to a sql2008 instance and have hit a big problem. The Report Previews correctly in Reporting services (i.e. the user sees the barcode) The report previews AND prints correctly in VS2008. but... When we print from Reporting services the barcodes font is not displayed (gibbersish characters are displayed instead). We have checked that the users all have the barcode fonts installed locally. We have also installed the barcode fonts on t...

How can I change the default pushbutton in a dialog?
Hi to all, Can someone please tell me what is the use of CDialog::SetDefID() and CDialog::GetDefID()? I tried to use them to change the default button of a dialog without success. Here's what I did: - Created an MFC dialog-based application. I called the project "Def" and therefore a class called "CDefDlg" is created. When I run the application a dialog box with "OK" and "Cancel" buttons is displayed. The "OK" button being the default button. - From the resource editor I added two buttons "Button1" (IDC_BUTTON1) and ...

best GPS sofware for Windows Mobile 5 to sync with Outlook?
Hi all! I am looking for recommendations on GPS/Navigation software for a pocket pc. Specfically, I have a PPC-6700 that I use with my Sprint cell service. Before I had this smart phone, I had a Garmin iQue M5 which I absolutely LOVED the GPS software on... it used MapSource. MUST-HAVES for me on this software are: -voice-command turns -automatic routing -prefer to have multiple-waypoint routing -prefer to have it sync with my outlook contacts and calendar so that I can route directly to them thanks for your help! -Eddie You might want to post to microsoft.public.pocketpc for others wh...

caption font
Hi, I would like to know if it is possible to change by program the font used in caption bar, menu, status bar, ... Thank you Raymond Mercier Raymond Mercier wrote: > Hi, > > I would like to know if it is possible to change by program the font > used in caption bar, menu, status bar, ... > > Thank you > > Raymond Mercier The status bar is a control, and like other controls its font can be changed by calling its SetFont function with a CFont that you initialize. But the caption bar and menus are drawn by Windows using the system preferences. You cannot direct...

Frustrating problem with Windows Media Player
I opened Windows Media Player today and went to minimize it while I did other things, and it informed me that it would revert to it's miniplayer mode (the thing where it moves to the right side of the taskbar and makes a miniature player; not skin mode) and I checked the box that says "don't show me this message again" I don't even know why it was telling me this, since that is what it has until now always done, since I had already gotten that message and ok'd it ages ago. When I clicked "Ok", it did not revert to the miniplayer at all, and now...

Printing problems
My computer is running Windows XP with 384MB of RAM, and I am using Publisher 2000. I am printing to a HP color laserjet 5 which HP does not offer any drivers on thier site for this printer and Win XP. The HP driver site for this printer says that the driver was included into Windows XP. The printer is connected using the parallel port. I have cropped a picture of a group of teens and made three pictures out of the one and added some text to create a publicity flier. I accomplish this by inserting the picture and then making 2 copies of it and then I crop each one to make 3 dif...

Memory Problem
Hi While using new and delete operator for eg) for(i=0;i<condition;i++) { nFileSize=GetFileSize; if(nFileSize>=10000) { DWORD size=10000; DWORD dRemaining=nFileSize%size; HANDLE hFile; hFile=::CreateFile (filename,GENERIC_WRITE,FILE_SHARE_WRITE,NULL,CREATE_ALWAYS ,FILE_ATTRIBUTE_NORMAL|FILE_FLAG_WRITE_THROUGH,NULL); for(int i=size;i<=nFileSize;i+=10000) { ...

How to write in Japenese font?
I want to write in Japenese font in Word. Is there any possibility to write in MS Office 2003 with On-screen keyboard? Yes. It's not a Word thing, it's a Windows thing. Go to Start > Control Panel > Regional and Language Options, and try to follow the tabs and buttons for "installing a new keyboard" (not "installing a new language") They are rather different in XP, Vista, and 7. In XP you need to check the box for "Asian scripts" (not "complex scripts"). There are many different input methods for Japanese; you can read ...

modeless dialog buttons
Newbie problem: I cant get buttons to display on my modeless dialog?!* : class CProgressDlg : public CDialog { DECLARE_DYNAMIC(CProgressDlg) public: CProgressDlg(CWnd* pParent = NULL); // standard constructor virtual ~CProgressDlg(); BOOL OnInitDialog(); // Dialog Data enum { IDD = IDD_PROGRESS_DLG }; protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support DECLARE_MESSAGE_MAP() public: // control variable for progress bar CProgressCtrl m_progressBar; // control variable for static text above progress bar CStatic m_staticText; // control variable for bu...

Signature Fonts
We are using Outlook 2000 and need to disable the font selection for signature blocks (we want to keep it at Times New Roman 10). Is this possible? Again thank you in advance for your help. ...

Returning to Windows 7
Hello, I recenlty purchased two laptops for a client installed with Windows 7 in XP mode. Can these be switched to Windows 7 and how. Thank you and God Bless, Mark A. Sam Mark A. Sam wrote: > I recenlty purchased two laptops for a client installed with Windows 7 in > XP mode. Can these be switched to Windows 7 and how. You are actually some guru for this "client" and yet you think Windows 7 itself is running under XP mode? Do some research. I pity your clients. Those laptops already have Windows 7 whether or not XP mode was installed. Hi Ma...

Problem in Advanced Find
I have added another value in the drop down for activities search and that is to search in activity body text. It works fine but when ever i combine it with the criteria to find for last 7 days it got stucked and after a while gives time out expired message for ADO. I have searched the error on MS support and according to the solution reseted the timeout value to unlimited but it didnt work both on unlimited and 1 hour settings. It works fine if i give it the criteria of 7 days the other way like on or after 15/09/2004 while current date is 22/09/2004. Can any one know the solution to ...

POP 3 Connector problem on Exchange Server 5.5
Hi there, I am having a problem with junk email with null characters. (see http://support.microsoft.com/default.aspx?scid=kb;en-us;280331). This has only become a problem is the last month or so. As the article says, "This behavior occurs because one or more e-mail messages in the mailbox of the POP3 server may contain Null characters and the POP3 Connector for Small Business Server 4.5 is not able to download e-mail messages if they contain Null characters." 1. Can someone explain to me what a "null character" is? 2. What are some options to cure the problem. Simp...

Q: How could I add a picture(eg. *.jpg) to my dialog?
Take a look at the loadpic sample : http://support.microsoft.com/default.aspx?scid=kb;en-us;218972 http://msdn.microsoft.com/msdnmag/issues/01/10/c/ Sreeram novad wrote: If you're using VS7 or later, I think the CImage class will let you load a jpg image and convert it to a bitmap that you can then display relatively easily. Dave -- MVP VC++ FAQ: http://www.mvps.org/vcfaq This is a multi-part message in MIME format. ------=_NextPart_000_000C_01C3786F.0884A6C0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Thanks very much...

Is there font size limitation on antialiasing?
Hi, I made a program to display a character on LCD. To apply anti-aliasing, I created font with ANTIALIASED_QUALITY flag. [ CFont.CreateFont(... , lfQuality, ...) ] The problem is like this: When I displayed characters that the font size is larger than about 680-pixel, the anti-alising is not applied on displayed character. So I tested my program on the other computer. (My computer is Win2k, the other is WinXP.) At this time, characters that the font size is larger than 330-pixel is displayed with no anti-aliasing. On MSDN, [ ANTIALIASED_QUALITY ] Windows NT 4.0 and later: Font is ant...

Internet
-- Internet - Take Advantage of Multiple Windows When Surfing SUMMARY: Stop jumping back and forth between index pages by using several browser windows. Why use one web browser window when you can have multiple? If you have an adequate amount of memory, open up several web browsers to maximize your surfing experience. One great way to do this is via a start page. Select a page from where you would like to begin browsing, such as a table of contents or links page. Now, instead of left-clicking on links or entries to view other pages, right-click the links. From the pop-up menu that a...

Opening Excel-file in new window
I would like to be able to open an Excel-file in a new window through shortcut. I know I can do this by putting the path to excel before th path to the file in the target for the shortcut. ex) "C:\Program\Microsoft Office 2000\Office\EXCEL.EXE" C:\MyFile.xls This way I need to know the path to Excel all the time and also kno which version is installed. As long as I have the file on my computer know all these things but since I'm creating this shortcut via a installationprogram I don't know what's installed on the client computer... Have any suggestions -- Message po...

font size in comments
Excel 2003 all sp and patches loaded OS: Windows XP Can you change the default font size in comments? Thanks, Will Will From Debra Dalgleish.............. You can change the font size of new comments by changing the settings in your Control Panel. (Instructions for Windows XP) Right-click on the desktop, and choose Properties On the Appearance tab, click Advanced. From the Item dropdown, choose Tooltip Choose a font Size, click OK, click OK (Note: selecting a font type here will not affect the default font used in Excel's comments) Gord Dibben MS Excel MVP On Tue, 9 Jan...

Password Problem
Hello everyone I have lots of users whom connect through the Internet to the Exchange 2000 server using either Outlook or Outlook express. Because of my gateway resides in the same computer than the exchange, the last uses port 6000 to send e-mails. The problem is that even with the passwords configured on the Outlook client, when the users try to send e-mail, the login screen comes up again, every time they close the outlook and re-open it it asks for password. I know I must validate the users that send mail to prevent the open relay, but is there something I can do to stop the password windo...

problem with sending this-pointer thru a hook
i have multiple dialogs (Modeless, in TabCtrl) associated with classes (all derived from a single derived class of CPropertyPage) and i need to fill in data from outside. my principal design is this: <pagebase (derived from CPropertyPage)> | | | | <page 1> <page 2> <page 3> <page 4> (all derived from base) then i have a class for the dialog (lets call it "super") containing the TabCtrl with page (1-4) as members. up to this point, all is running perfectly well. now to my following little problem: in the pagebase i defined a st...

Excel 97
Hi all. I'm currently designing an Excel spreadsheet at work, and everything is exactly the way I want it when unprotected. However, my group and outline (1 group for each Quarter of the year (Q1, Q2, Q3, Q4) and 1 group for Yearly summary (QSummary)) does not expand when I protect the worksheet. The worksheet MUST be protected as I have some extremely large formulas and chart data that I need locked / hidden, but I want the users to be able to select what quarter they enter data into. Currently, I have to unlock the worksheet every time I want to expand a new section. Does anybody know ...

Plugin problem
Hi all, I have plugin registered for Quote products update. Now I want to trigger plugin when my total sales price of quote product changes. I am not able to find from where total sale price is being changed but its changing when i save the quoteproduct from but plugin is not triggered although i selected attribute as total sale price and post and pre satages. I have seen both onload and onsave methods of form but it was not updated from there. Any body has an idea on this please help me out. Regards, MKR ...

Is it SQL 2008 or VB 2008 problem? I don't know
Hello, I have created an application with Visual Basic2005 Standard Edition 2 years ago. The application imports CSV files in the database. The application is connecting to the database that I made it with SQL Server 2005. This is the connection string: Data Source=XXX; Initial Catalog=YYY; Integrated Security=SSPI; Pooling=true; The application uses the TransactionScope class this way with no problem: Using Scope As New Transactions.TransactionScope(Transactions.TransactionScopeOption.RequiresNew) ... Scope.Complete() End Using In the transaction, the applicat...

CTabCntl doesn't show up in Dialog-based application?
I am a newbie to MFC, but have some experience with VS 2005, and am attempting to write my first C++ MFC Dialog-based application. I can successfully add all sorts of controls, but if I add a CTabCntl, it doesn't show up in the application, except as a blank panel. I have read some tutorials on how to add a CTabCntl, but all of them are for earlier versions of VS, and I can't do the things that they say to do. How do I add a CTabCntl to a Dialog in C++ and VS 2005? A pointer to a tutorial on using MFC and C++ in VS 2005 would be helpful as well. Thanks in advance. I'd reco...