zoukankan      html  css  js  c++  java
  • LoadString(nID) Problem and Solution

    CString::LoadString(UINT nID)
    Conclusion: the correct way to load string resource by ID is to call CString::LoadString(HINSTANCE hInstance,UINT nID), specifying the dll handler you want to search for.

    Problem
    CString::LoadString(UINT nID) will first use the instance handle of the main application to search for a string with the given ID. Failing that, it will look in DLLs in the order they were loaded until there is a match. If DLL A is loaded, then B and C, calling LoadString from DLL C will first find a matching resource in DLL A before finding its own resource.

    Solution
    Use CString::LoadString(HINSTANCE hInstance,UINT nID) or ::LoadString() function.
    Another seem-to-work way (not suggested):
    CString strTemp;
    AFX_MANAGE_STATE(AfxGetStaticModuleState());
    strTemp.LoadString(uID);
  • 相关阅读:
    Linux文件查询笔记
    C语言学习和回顾
    hive的数据压缩
    进程线程那些事儿
    hive的数据存储格式
    hive的内置函数
    Hive自定义函数
    spark编译
    Impala的安装和使用
    数据库的读写分离
  • 原文地址:https://www.cnblogs.com/taoxu0903/p/1431230.html
Copyright © 2011-2022 走看看