Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting CFontDialog sample text.

Posted on 1998-03-11
1
Medium Priority
?
396 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 300 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Ready to get certified? Check out some courses that help you prepare for third-party exams.
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.
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…

705 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