zoukankan      html  css  js  c++  java
  • Writing/customizing a language dll

    Writing/customizing a language dll

    WHFC  Home Contents Previous  page 


    With the language dll you can fully customize the look and feel of whfc and translate it in every language you like. To do this you need the sourcecode which contains a project for Visual C++ 5.0, a small piece of sourcecode and the resources of whfc.

    Customizing an own language dll

    This project generates a "language dll" which must have the following naming convention : whfclang.?? . replace ?? by a ending, which gives a hint about the language e.g. for the german language you can call it whfclang.de or whcflang.ger . Whfc searches for all files starting with whfclang and calls GetDLLLanguage. The string which must be returned from this function will then be displayed in it's language selection dialog (can be found in the user preferences). The searchpath can be set in the system settings dialog field "Searchpath for language dll's"

    // Change this variable to your language name

    static char *c_LangName = "English (Example)";

    // The dll call for returning the language name

    char * WINAPI GetDLLLanguage(void)
    {
    return c_LangName;
    }

    // A version info for determing, if this dll has
    // a correct version (do not change anything)

    DWORD WINAPI GetDLLVer(void)
    {
    return 2;
    }

    If you want to generate a new language dll you have to change here the variable c_LangName to your language name. Then change the dll name in the langdll.def file and in the settings of Visual C++. After this you can edit the resources with Visual C++.

    But don't add or delete resource ! This may lead to some strange effects. Also you have to replace the entire resource, when new resources will be added to whfc. Then the complete resource must be translated from scratch 8-( .Therefor i have added the GetDLLVer routine. Whenever i made changes to the whfc resources i will increase this number. The actual new Version of whfc will check this number and skip all dll's with a non matching number.

    If you have an interesting language dll which you will share, then contact me, so that i can put a notice about your language dll to the whfc web pages. But please please contact me, before sending the translated language dlls, since i have set a limit for incoming E-Mails of 60kb on my gmx account. I will send you then an other e-mail address, where you can send the language dll.

  • 相关阅读:
    nunit2.5.7 单元测试时提示:“当前不会命中断点 还没有为该文档加载任何符号”
    文件下载报错:引发类型为“System.OutOfMemoryException”的异常-.Net 内存溢出
    asp.net 访问页面访问统计实现 for iis7
    easyui tree 更改图标
    asp.net 访问页面访问统计实现
    记一次空格引起的查询问题
    SVN如何忽略dll文件和bin目录
    vmware 中安装Ghost XP 版本心得
    冒泡排序
    JS数组去重
  • 原文地址:https://www.cnblogs.com/ddlzq/p/1747548.html
Copyright © 2011-2022 走看看