cls = MSSTYLES_FindClass(tfActiveTheme, szAppName, szClassName);
else
cls = MSSTYLES_FindClass(tfActiveTheme, pszAppName, szClassName);
Let's put these parse and find parts into a find_app_class() helper to avoid code duplication. So that you don't need to make the same changes twice in the patch set.
Let's use "szAppName[0] ? szAppName : pszAppName" instead. It will look cleaner.
Can this micro optimizations be made in a folow up patches?