Quantcast
Channel: Windows Presentation Foundation (WPF) forum
Viewing all articles
Browse latest Browse all 18858

How can I limit the fonts in the Character Map (charmap) and reinitialize the state after use?

$
0
0

            In a WPF application I have a RichTextBox in which users will be inserting text. I also must give the user the ability to insert characters. To do so I have called up charmap.exe using

           Process charProcess = new Process();

           ProcessStartInfo startInfo = new ProcessStartInfo();

           charProcess.StartInfo.FileName = strCharmap;

           charProcess.Start();

etc., and it works fine. There are several problems I have basically with charmap, however, not with WPF. The first is that because of the subsequent use of the user’s insertion in the RTB, I must restrict the font to “Ariel Unicode MS.”  So far all I have been able to do is instruct and warn the user not to change fonts and change back any font change that occurs as a result of use of “Advanced view” features.

           Question number one is, how can I restrict the fonts loaded into charmap to this one font? The second problem is that if another font is called up, or the “Advanced view” state of charmap is closed, or a “Group by” feature is opened, these choices will be retained for the next user that opens charmap. How can I initialize the state of charmap for each new user with the correct font and “Advanced view” features showing. It is said,but in old posts, that reinitialization occurs for all but administrative users, but this seems to be no longer true. I have tried permission changes in charmap’s Properties, but I can’t get the necessary reinitialization to occur even if user’s don’t have modify permission. Can one use a .ini file, or the .mui file, or make Registry changes to accomplish my goals. There seems to be a warning in the .mui file about changing fonts, but is it cancelled? Whatever I have to do, does it get done in the code behind or do I have to modify the Windows OS and files. I am using Windows 7 and C#.

           I have looked at other character maps but they are either too complicated for the casual user, or they have no search engine and advanced features, or they have the same problems.

           I am somewhat a novice with respect to the Windows files use and WPF, so please be fairly clear, complete, and prescriptive in your answer. Also so that I and others can learn, it would be nice to have an explanation of why one does whatever you suggest. Your help is appreciated.


Viewing all articles
Browse latest Browse all 18858

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>