Click here to Skip to main content
15,905,682 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Modeless Dialog Doesn't Destroy During WM_CLOSE? Pin
Joaquín M López Muñoz11-Feb-03 11:26
Joaquín M López Muñoz11-Feb-03 11:26 
GeneralRe: Modeless Dialog Doesn't Destroy During WM_CLOSE? Pin
Dan Wilson12-Feb-03 3:23
Dan Wilson12-Feb-03 3:23 
AnswerRe: Modeless Dialog Doesn't Destroy During WM_CLOSE? Pin
valikac11-Feb-03 12:20
valikac11-Feb-03 12:20 
GeneralXML-safe strings, and iostreams Pin
Simon Steele11-Feb-03 11:10
Simon Steele11-Feb-03 11:10 
GeneralRe: XML-safe strings, and iostreams Pin
palbano11-Feb-03 11:13
palbano11-Feb-03 11:13 
GeneralRe: XML-safe strings, and iostreams Pin
Simon Steele11-Feb-03 11:42
Simon Steele11-Feb-03 11:42 
GeneralRe: XML-safe strings, and iostreams Pin
Simon Steele11-Feb-03 11:46
Simon Steele11-Feb-03 11:46 
QuestionHow to draw password bullets in an edit control on XP? Pin
Brian Morearty11-Feb-03 10:30
Brian Morearty11-Feb-03 10:30 
Win32 question: anyone know what font and character used to draw the bullets in a password edit control in XP with Visual Styles turned on?

Background: for historical reasons related to resources and performance on Win16, as well as to reduce flicker when resizing, my Win32 app draws all controls on a window. For edit controls it only moves a REAL edit control into place when the user tries to move the focus there. When the focus moves out, the real edit control becomes invisible again (or is moved to wherever the focus moved, if that was another edit control).

On XP we have visual styles turned on (using a manifest). We call the Theme API functions in uxtheme.dll to simulate the drawing of controls. When visual styles are turned on, bullet points are drawn instead of asterisks. Unfortunately, the Theme API does not provide a "password state" for drawing an edit control. See the Parts and States table[^].

When focus moves out of a password edit control (one with the ES_PASSWORD style), we draw the edit control ourselves. Our old code was drawing asterisks and it looked fine. On XP we're trying to figure out what font and character the edit control uses to draw the password characters.

The documentation for the ES_PASSWORD style says this:


Microsoft® Windows® XP: If an edit control is from user32.dll, an asterisk is the default character for the ES_PASSWORD style. However, if an edit control is from comctl32.dll version 6, a black circle is the default character for the ES_PASSWORD style. Note that comctl32.dll version 6 is not redistributable but is included with Microsoft® Windows® XP or later. To use comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Using Windows XP Visual Styles[^].


I tried sending EM_GETPASSWORDCHAR to the edit control. The result was -59 decimal, or 0xCF. In most fonts this is a capital I with an umlaut. I can't find any symbol font where this is a bullet point.

We've already tried a few bullet points in a few fonts, but can't seem to find one that's the right size and char width. When the user tabs out of the password field, it looks funny because the bullets shift.

- Brian Morearty Smile | :)
AnswerRe: How to draw password bullets in an edit control on XP? Pin
MAAK12-Feb-03 0:02
MAAK12-Feb-03 0:02 
GeneralRe: How to draw password bullets in an edit control on XP? Pin
Brian Morearty12-Feb-03 5:47
Brian Morearty12-Feb-03 5:47 
GeneralDynamic linkage Pin
RalfPeter11-Feb-03 10:25
RalfPeter11-Feb-03 10:25 
GeneralRe: Dynamic linkage Pin
Christian Graus11-Feb-03 11:13
protectorChristian Graus11-Feb-03 11:13 
GeneralRe: Dynamic linkage Pin
Chris Richardson11-Feb-03 11:24
Chris Richardson11-Feb-03 11:24 
GeneralDialogbox doesn't appear when Treelist control added Pin
nitingonsalves11-Feb-03 9:11
nitingonsalves11-Feb-03 9:11 
GeneralRe: Dialogbox doesn't appear when Treelist control added Pin
Michael Dunn11-Feb-03 9:29
sitebuilderMichael Dunn11-Feb-03 9:29 
GeneralRe: Dialogbox doesn't appear when Treelist control added Pin
nitingonsalves11-Feb-03 10:35
nitingonsalves11-Feb-03 10:35 
GeneralRe: Dialogbox doesn't appear when Treelist control added Pin
nitingonsalves11-Feb-03 10:46
nitingonsalves11-Feb-03 10:46 
GeneralTaskbar HELP! - MFC/C++ Pin
mister trunks11-Feb-03 8:54
mister trunks11-Feb-03 8:54 
GeneralShow macro code expanded in Visual Studio Pin
Aaron Schaefer11-Feb-03 8:21
Aaron Schaefer11-Feb-03 8:21 
GeneralRe: Show macro code expanded in Visual Studio Pin
Michael Dunn11-Feb-03 8:28
sitebuilderMichael Dunn11-Feb-03 8:28 
Generalround off problem Pin
wong190711-Feb-03 8:14
wong190711-Feb-03 8:14 
GeneralRe: round off problem Pin
Rickard Andersson2011-Feb-03 8:27
Rickard Andersson2011-Feb-03 8:27 
GeneralRe: round off problem Pin
PJ Arends11-Feb-03 8:35
professionalPJ Arends11-Feb-03 8:35 
GeneralRe: round off problem Pin
PJ Arends11-Feb-03 8:31
professionalPJ Arends11-Feb-03 8:31 
GeneralRe: round off problem Pin
Chris Losinger11-Feb-03 9:36
professionalChris Losinger11-Feb-03 9:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.