title: Programmatically enable ClearType in Windows Mobile
body: <p>For our Windows Mobile application I want to enable the ClearType option on the device. According to <a href="http://msdn.microsoft.com/en-us/library/aa911460.aspx" rel="nofollow noreferrer">this</a> article on MSDN it should be done be setting the following registry key:</p>
  
  <pre><code>HKEY_LOCAL_MACHINE\SYSTEM\GDI\Cleartype
  </code></pre>
  
  <p>But nothing happens after setting this particular key. Even a soft reset does not enable it, but simply gets rid of the registry key I just created.</p>
  
  <p>Strange thing is that when I set it manually using Settings->System->Screen->ClearType it works immediately. And comparing the registry exports before and after changing the setting show that it is just the key mentioned above that changes.</p>
  
  <p>I don't quite understand why it wouldn't work when I change the registry key myself. Anyone who knows what I'm doing wrong here?</p>
  
  <p>[update]
  It looks like the solution is to do either:</p>
  
  <ul>
  <li><p>Broadcast a WM_SETTINGCHANGE message with the correct parameters like:</p>
  
  <p><code>SendMessage(HWND_BROADCAST, WM_SETTINGCHANGE, 0, 1)</code></p>
  
  <p>But that has not worked so far. I guess the wParam parameter might need a different value.</p></li>
  <li><p>Or call CreateEvent with the relevant event for ClearType changes. A bit like BacklightChangeEvent or SDKBacklightChangeEvent would work. But so far I haven't seen any documentation on these events, so I can't work out what the event would be.</p></li>
  </ul>