Bug: Windows font change

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • UniqueName
    Scout
    • Sep 2010
    • 32

    Bug: Windows font change

    I get a hang sometimes in the following code

    SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);

    Rebooting clears up the offending receiver but maybe it can be changed to a non-blocking call. I currently encounter this problem in S but this code seems common to all variants. Or maybe someone has suggestions on finding the blocking app? I guess I can try killing processes until I find the blocker.
  • UniqueName
    Scout
    • Sep 2010
    • 32

    #2
    Well I found the blocker, a hung iexplore. MSDN specifically says to do it this way but it still seems dangerous to me.

    Comment

    • takkaria
      Veteran
      • Apr 2007
      • 1951

      #3
      Originally posted by UniqueName
      I get a hang sometimes in the following code

      SendMessage(HWND_BROADCAST, WM_FONTCHANGE, 0, 0);

      Rebooting clears up the offending receiver but maybe it can be changed to a non-blocking call. I currently encounter this problem in S but this code seems common to all variants. Or maybe someone has suggestions on finding the blocking app? I guess I can try killing processes until I find the blocker.
      V fixed this in January 2009, I think other people have copied the relevant code since then. Just change SendMessage to PostMessage and the trick is done.
      takkaria whispers something about options. -more-

      Comment

      • camlost
        Sangband 1.x Maintainer
        • Apr 2007
        • 523

        #4
        I updated this in S (r141).
        a chunk of Bronze {These look tastier than they are. !E}
        3 blank Parchments (Vellum) {No french novels please.}

        Comment

        Working...
        😀
        😂
        🥰
        😘
        🤢
        😎
        😞
        😡
        👍
        👎