Solved

Setting CFontDialog sample text.

Posted on 1998-03-11
1
387 Views
Last Modified: 2013-11-20
When I use the standard CFontDialog, the sample text displayed is AaBbYyZz.   How would I set the value to be something else?
0
Comment
Question by:JohnWeidner
1 Comment
 
LVL 11

Accepted Solution

by:
mikeblas earned 100 total points
ID: 1316917
Once the dialog is created, you can use this code:

#include <dlgs.h>

CWnd* pWindow = GetDlgItem(stc5);
ASSERT(pWindow != NULL);
pWindow->SetText("This is the text you want.");

If you're creating a modal dialog, you'll need to subclass the dialog and do this code in an WM_INITINSTANCE handler after you call the base-class WM_INITINSTANCE handler.

.B ekiM

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
MFC Dialog 9 48
ODBC Connection Logging, ADO.NET 6 56
sumDigits challenge 9 125
Path of Workbook 3 61
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Introduction: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Windows 10 is mostly good. However the one thing that annoys me is how many clicks you have to do to dial a VPN connection. You have to go to settings from the start menu, (2 clicks), Network and Internet (1 click), Click VPN (another click) then fi…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now