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.

  • 相关阅读:
    protocol buffer
    一个数组中只有0,1,2三种元素,要求对这样的数组进行排序
    初见-TensorRT简介<转>
    如何制作python安装模块(setup.py)
    Reservoir Sampling
    Tensorflow 之 name/variable_scope 变量管理
    Tensorflow之调试(Debug) && tf.py_func()
    python with和上下文管理工具
    hello--GAN
    metronic后台模板学习 -- 所用外部插件列表
  • 原文地址:https://www.cnblogs.com/ddlzq/p/1747548.html
Copyright © 2011-2022 走看看