Solved

Setting CFontDialog sample text.

Posted on 1998-03-11
1
386 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
repeateFront java challenge 31 87
Define unique primary key 9 81
if loop in java 3 114
mapAB Challlenge 35 89
Introduction: Dynamic window placements and drawing on a form, simple usage of windows registry as a storage place for information. Continuing from the first article about sudoku.  There we have designed the application and put a lot of user int…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

760 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

18 Experts available now in Live!

Get 1:1 Help Now