<p>By default Windows (XP) shows the <strong>underlined hotkeys</strong> only, when ALT is pressed. This can be changed in display-properties in the subdialog "Effects" so, that the hotkeys are <strong>always underlined</strong></p>

<p>How can it be changed programmatically? Which API-call or registry-setting can be used to change this setting?</p>

Do you mean you want to change this system-wide setting, or that you want to be able to override the behavior only in your program?
If it's the latter and you're using the Win32 API, it looks like you might be able to catch the WM_CHANGEUISTATE notification:
http://blogs.msdn.com/oldnewthing/archive/2005/05/03/414317.aspx
I've not tried it myself but it seems feasible.
If it's the former you're aiming for, I've not yet been able to discover a method.