Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
H

henchook

@henchook
About
Posts
12
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • WIYO...
    H henchook

    If Jerusalem is really Istanbul, that would certainly solve a lot of Middle East problems (while making a lot of people look pretty stupid in the process).

    The Back Room question com

  • need help again...IS file or directory
    H henchook

    You can call GetFileAttributes and check if the returned DWORD has the FILE_ATTRIBUTE_DIRECTORY bit set. (You may also want to take a look at GetFileAttributesEx).

    C / C++ / MFC c++ json help announcement

  • Programatically copying files
    H henchook

    Or you can use the SHFileOperation function (which also supports recursive copying) to copy. See the following MSDN page[[^](http://MSDN page "New Window")] for more detailed information.

    C / C++ / MFC learning

  • restricting to type in CEdit
    H henchook

    Hmmm.... is there an analgous way to restrict what is types? For example, suppose I only want to allow alphanumeric english letters in the editbox.... Or does that require subclassing?

    C / C++ / MFC tutorial

  • Fonts, linking, OpenType, TrueType - what's going on???
    H henchook

    So "Microsoft Sans Serif" takes care of most situations, but how do we support CJK and other 'exotic' languages? (BTW, thanks for the book link, I'll definitely get it).

    The Lounge question windows-admin announcement

  • Fonts, linking, OpenType, TrueType - what's going on???
    H henchook

    Which brings me back to the question we originally considered before adding Unicode support to our application: Our app uses the MS Sans Serif font, which does not support Unicode. We want to be able to display unicode, and we want to keep using MS Sans Serif, or use an identical font that supports Unicode (like Microsoft Sans Serif). I should mention that we don't want to localize our UI. We simply require to be able to display localized strings in edit boxes, fields, etc... our menus and dialogs will remain in English. I'm sorry, I should have mentioned this before.

    The Lounge question windows-admin announcement

  • Fonts, linking, OpenType, TrueType - what's going on???
    H henchook

    Win2K/XP also provides font linking, controlled through the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink registry key. I can't find anything more about it on MSDN, but it seems like there's more to it. I came to this decision because when I used a font with only one character, the rest of the characters were being displayed despite the absence of font links. Out application is only targeted for Win2k and later, so CE doesn't concern us.

    The Lounge question windows-admin announcement

  • Fonts, linking, OpenType, TrueType - what's going on???
    H henchook

    That's the way it works if you use the system font, I think. Our application must use Microsoft Sans Serif (this decision came from higher up above me), because it's practically identical to "MS Sans Serif" (what our app used before Unicode conversion). We can't use the system font, because it can change, and if it changes to something like Tahoma (which is wider), it can ruin our UI, causing string cuts, etc. I know bad design isn't an excuse, but I'm not the one calling the shots. So what we have now is that our app uses "Microsoft Sans Serif", which is a Unicode font, but it doesn't support ALL languages. If you want to add extra languages, you need to edit the registry. The problem is we don't want to affect the whole system when adding languages to our app, so we were thinking of using a custom (empty) font, and adding linking to that font in the registry. I tried creating an empty OpenType font (the documentation says that's the only kind that supports font linking) using FontLab software (demo version), but ran into problems. I don't know what additional information is embedded into the font, but the bottom line is that I was unable to control which fonts my font linked to. I added links to specific fonts, and used my font in Notepad, and I was surprised to find that it didn't use the fonts I linked to for displaying characters that my font's didn't have, and instead it used some other font. Any bright ideas? Thanks, again. Chen Drori Mercury Interactive

    The Lounge question windows-admin announcement

  • Fonts, linking, OpenType, TrueType - what's going on???
    H henchook

    Thanks Lauren, Joey. Obviously, something like what you described is going on behind the scenes. I thought font linking was limited to the HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\FontLink\SystemLink key, but it seems like there's much more to it. What I'm actually trying to is choose a font for our application, to which we are now adding Unicode support. Our app used "MS Sans Serif", and we were thinking of using "Microsoft Sans Serif", but we though we might run into a problem when adding languages, so we wanted to use our own custom empty font, and add the appropriate links to that. We thought that adding links was simply a matter of editing the appropriate registry keys, but it's begginning to look like it's more than that. Can anyone explain just what font linking involves? Thanks!

    The Lounge question windows-admin announcement

  • Fonts, linking, OpenType, TrueType - what's going on???
    H henchook

    I created a font containing a single character glyph with FontLab's FontLab 4.6 (demo version), and installed the font (by simply copying it to the WINNT\Fonts dir). I then fired notepad up, and chose my font, and I saw that my character was being displayed properly, but all the other characters (which my font didn't have any glyphs for) were also being displayed. Notepad was getting them fron another font - but which font? And how? What is the mechanism that controls this? I did not add any font links in the registry - is there some sort of internal font linking in the font? I tried this with both an OpenType and a TrueType font, and got the same results. Can anyone point me towards some documentation where I can study what's happening? Thanks, -CD

    The Lounge question windows-admin announcement

  • Asynchronously inserting large number of items into TreeView
    H henchook

    The problem was that after inserting each item, there was a call to Expand(), which caused the treeview to scroll to the newly expanded icon. This did not have any visible effect when the tree was being populated off-screen, but once I started doing this in a separate thread after showing the treeview, it was apparent in the tree jumping all over the place. It turns out (this is code I inherited from someone else at my company) that the proper thing to do, instead of calling Expand() after inserting each item, is to set the State bits (and the mask bits) in the TVINSERTSTRUCT before inserting the item, this causes it to be expanded when it is inserted, without the tree scrolling to it. Thanks anyway for your help.

    C / C++ / MFC wpf data-structures xml help question

  • Asynchronously inserting large number of items into TreeView
    H henchook

    I need to insert a very large number of items into a CTreeView derived control. This insertion takes a long time, so I am doing is asynchronously. My problem is: whenever I call InsertItem, the tree selection jumps to the newly inserted item. I want to prevent this, so that my user sees the tree being built, but is able to select an item in the tree and have the selection remain on that item. How would I go about doing this? I tried looking for and using different window styles, and I tried intercepting the TVN_SELCHANGED and TVN_SELCHANGING messages, but wasn't quite able to achieve anything... I want it to behave sort of like IE does when you open a huge (and I mean HUGE, as in 1MB) XML file.... IE parses the file in the background, and keeps adding new nodes to it, but you are able to view whichever part of the document (that has already been loaded you want). Thanks, -CD

    C / C++ / MFC wpf data-structures xml help question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups