Solved

How to set a font to a CMenu ?

Posted on 2008-10-09
3
1,290 Views
Last Modified: 2013-11-20
Hi,
I have a dialog box with a menu attached to it. How do I set a font to the menu?

Thanks
0
Comment
Question by:UdiRaz
3 Comments
 
LVL 55

Accepted Solution

by:
Jaime Olivares earned 500 total points
ID: 22683530
Not possible with regular options, all menus uses the default windows appeareance settings. You will need to do with owner-draw functions. This is a complex task.
Some related articles:
http://www.codeproject.com/KB/menus/CMenuEx.aspx
http://www.codeproject.com/KB/menus/menuch.aspx
http://www.codeguru.com/Cpp/controls/menu/article.php/c3721


0
 
LVL 5

Expert Comment

by:isprabu
ID: 22685253
Jaime is right. You need to implement owner drawn menu to achive what you want. There is also an article in MSDN which you can refer to. This one has many different examples and you can look at the section titled "Setting Fonts for Menu-Item Text Strings" in this page.
http://msdn.microsoft.com/en-us/library/ms647558(VS.85).aspx#_win32_Creating_Owner_Drawn_Menu_Items
Hope this helps!
0
 

Author Closing Comment

by:UdiRaz
ID: 31504886
thanks
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
sumHeights  challenge 17 79
computer science syllabus 3 101
trigs fail! I thought I knew how to do trignometry 3 83
Beginner to Unreal Engine 4 5 105
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…
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.
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.

749 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