Solved

Setting CFontDialog sample text.

Posted on 1998-03-11
1
392 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Prevent this page from creating additional dialogs. 3 764
Smart Camera scanning and reading information 3 126
EvenOdd challenge 10 157
Problem to open Excel file 15 255
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Hints for the grid button.  Nested classes, templated collections.  Squash that darned bug! Continuing from the sixth article about sudoku.   Open the project in visual studio. First we will finish with the SUD_SETVALUE messa…
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.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

742 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