示例#1
0
void KUiWndFrameTabControl::SaveData()
{
    KG_PROCESS_ERROR(m_hListWnd);
    KG_PROCESS_ERROR(m_szName[0]);
    IIniFile *pIni = g_Ui.GetIni();
    KG_PROCESS_ERROR(pIni);

    int nMaxNum = 0;
    int i = 0;
    char szKey[128] = "";
    char szKeyValue[128] = "";
    pIni->GetInteger(m_szName, "ItemCount", 0, &nMaxNum);
    for (i = 0; i < nMaxNum; i++) 
    {
        sprintf(szKey, "Item_%d", i);
        pIni->EraseKey(m_szName, szKey);
    }

    nMaxNum = ListView_GetItemCount(m_hListWnd);
    pIni->WriteInteger(m_szName, "ItemCount", nMaxNum);
    for (i = 0; i < nMaxNum; i++) 
    {
        sprintf(szKey, "Item_%d", i);
        ListView_GetItemText(m_hListWnd, i, 0, szKeyValue, sizeof(szKeyValue));
        pIni->WriteString(m_szName, szKey, szKeyValue);
    }

	g_ClientManager.UpDataWndInClient(g_Ui.GetIni(true));
    ShowErrorInformation();

Exit0:
    return;
}
示例#2
0
int TestLoadAllBSP()
{
    int nResult                         = false;
    int nRetCode                        = false;
    HRESULT hrRetCode                   = E_FAIL;
    unsigned uTotalCount                = 0;
    unsigned uFailedCount               = 0;
    unsigned uFailedCountSave           = 0;   
    BYTE *pbyTestFileData   = NULL;
    BYTE *pbySourceFileData = NULL;
    IIniFile *pFile                     = NULL;
    IFile *piTestFile                   = NULL;
    IKG3DModel *piModel                 = NULL;
    IKG3DResourceManager *piModelTable  = NULL;
    char szMessage[MAX_PATH]            = "";
    char szDirPath[MAX_PATH]            = "";
     TCHAR strBSPPathName[MAX_PATH]     = "";
    //vector<string> vecModelList;
    //vector<string> vecMeshList;   
    MSG msg;

    nRetCode = GetCurrentDirectory(MAX_PATH, szDirPath);
    KG_PROCESS_ERROR(nRetCode > 0 && nRetCode < MAX_PATH + 1);
    strcat(szDirPath, "\\data\\source\\*.*");
    szDirPath[MAX_PATH - 1] = '\0';
    //strcpy(szDirPath, "D:\\Kingsoft\\Game\\sword3-products\\trunk\\client\\data\\source\\NPC_source\\*.*");

    piModelTable = g_cEngineManager.Get3DModelTable();
    KGLOG_PROCESS_ERROR(piModelTable);

    pFile = g_OpenIniFile(g_cszErrorFileName[EXT_MESH],false,true);
    KGLOG_PROCESS_ERROR(pFile);

    nRetCode = GetFileList(szDirPath, &g_vecSourceList/*vecMeshList*/, EXT_MESH);
    KGLOG_PROCESS_ERROR(nRetCode);
    //g_vecSourceList.push_back("D:\\Kingsoft\\Game\\trunk\\data\\source\\maps_source\\亭塔\\T_erg风车塔001A.Mesh");
    uTotalCount = (unsigned)/*vecMeshList*/g_vecSourceList.size();

    for (unsigned i = 0; i < uTotalCount; ++i)
    {
        char szKeyName[32] = "";
        snprintf(
            szMessage, sizeof(szMessage), 
            "Mesh模型的BSP文件检查:%s", 
            /*vecMeshList*/g_vecSourceList[i].c_str()
            );
        szMessage[sizeof(szMessage) - 1] = '\0';
        SetWindowText(g_hWnd, szMessage);




        TCHAR strDriver[MAX_PATH];
        TCHAR strPath[MAX_PATH];
        TCHAR strFile[MAX_PATH];


        _splitpath_s(g_vecSourceList[i].c_str(), 
            strDriver,
            MAX_PATH,
            strPath,
            MAX_PATH,
            strFile,
            MAX_PATH,
            NULL,
            0);

        //sprintf_s(strBSPPathName,
        //    MAX_PATH,
        //    "%s%s%s.bsp",
        //    strDriver,
        //    strPath,
        //    strFile);

        //nRetCode = g_IsFileExist(strBSPPathName);

        //if (!nRetCode)
        //{
        //    /*itoa(uFailedCount, szKeyName, 10);
        //    pFile->WriteString("BSP_NotExited",szKeyName, g_vecSourceList[i].c_str());
        //    ++uFailedCount;*/
        //    continue;
        //}

        try
        {
            g_bForceGenerateBspForMesh = /*FALSE*/TRUE;
            hrRetCode = piModelTable->LoadResourceFromFile(/*vecMeshList*/g_vecSourceList[i].c_str(), 0, 0, (IKG3DResourceBase**)&piModel);
            if (FAILED(hrRetCode))
            {
                itoa(uFailedCount, szKeyName, 10);
                pFile->WriteString("ErrorMesh",szKeyName, /*vecMeshList*/g_vecSourceList[i].c_str());
                ++uFailedCount;
            }
            KG_COM_RELEASE(piModel);
            g_cEngineManager.FrameMove();
            g_bForceGenerateBspForMesh = FALSE;
            if (FAILED(hrRetCode))
            {
                continue;
            }

            //cmp
            unsigned uTestFileDataSize      = 0;
            unsigned uSourceFileDataSize    = 0;
            unsigned uSizeRead              = 0;
            

            sprintf_s(strBSPPathName,
                MAX_PATH,
                "%s%s%s.bsp",
                strDriver,
                strPath,
                strFile);

            nRetCode = g_IsFileExist(strBSPPathName);
            if (!nRetCode)
            {
                sprintf_s(strBSPPathName,
                    MAX_PATH,
                    "%s%s%s_test.bsp",
                    strDriver,
                    strPath,
                    strFile);
                nRetCode = g_IsFileExist(strBSPPathName);
                if (nRetCode)
                {
                    itoa(uFailedCount, szKeyName, 10);
                    pFile->WriteString("BSP_NotGenerate",szKeyName, g_vecSourceList[i].c_str());
                    ++uFailedCount;
                    DeleteFile(strBSPPathName);
                }
                continue;
            }

            piTestFile = g_OpenFile(strBSPPathName);
            KGLOG_PROCESS_ERROR(piTestFile);
            uSourceFileDataSize = piTestFile->Size();
            KGLOG_PROCESS_ERROR(uSourceFileDataSize > sizeof(DWORD));
            pbySourceFileData = new BYTE[uSourceFileDataSize];
            KGLOG_PROCESS_ERROR(pbySourceFileData);
            uSizeRead = piTestFile->Read(pbySourceFileData, uSourceFileDataSize);
            KGLOG_PROCESS_ERROR(uSizeRead == uSourceFileDataSize);

            KG_COM_RELEASE(piTestFile);


            sprintf_s(strBSPPathName,
                MAX_PATH,
                "%s%s%s_test.bsp",
                strDriver,
                strPath,
                strFile);

            piTestFile = g_OpenFile(strBSPPathName);
            if (!piTestFile)
            {
                itoa(uFailedCount, szKeyName, 10);
                pFile->WriteString("BSP_Don't Exited",szKeyName, g_vecSourceList[i].c_str());
                ++uFailedCount;
                SAFE_DELETE_ARRAY(pbySourceFileData);
                continue;
            }

            uTestFileDataSize = piTestFile->Size();
            KGLOG_PROCESS_ERROR(uTestFileDataSize > sizeof(DWORD));
            pbyTestFileData = new BYTE[uTestFileDataSize];
            KGLOG_PROCESS_ERROR(pbyTestFileData);
            uSizeRead = piTestFile->Read(pbyTestFileData, uTestFileDataSize);
            KGLOG_PROCESS_ERROR(uSizeRead == uTestFileDataSize);

            KG_COM_RELEASE(piTestFile);

            if (uTestFileDataSize != uSourceFileDataSize)
            {
                itoa(uFailedCount, szKeyName, 10);
                pFile->WriteString("BSP_NotMatchedSize",szKeyName, g_vecSourceList[i].c_str());
                ++uFailedCount;
                DeleteFile(strBSPPathName);
                SAFE_DELETE_ARRAY(pbyTestFileData);
                SAFE_DELETE_ARRAY(pbySourceFileData);
                continue;
            }

            nRetCode = memcmp(pbyTestFileData, pbySourceFileData, uSourceFileDataSize);
            if (nRetCode)
            {
                itoa(uFailedCount, szKeyName, 10);
                pFile->WriteString("BSP_NotMatched",szKeyName, g_vecSourceList[i].c_str());
                ++uFailedCount;
                DeleteFile(strBSPPathName);
                SAFE_DELETE_ARRAY(pbyTestFileData);
                SAFE_DELETE_ARRAY(pbySourceFileData);
                continue;
            }

            DeleteFile(strBSPPathName);
            SAFE_DELETE_ARRAY(pbyTestFileData);
            SAFE_DELETE_ARRAY(pbySourceFileData);


        }
        catch (...)
        {
            itoa(uFailedCount, szKeyName, 10);
            pFile->WriteString("Mesh_Exception",szKeyName, /*vecMeshList*/g_vecSourceList[i].c_str());
            ++uFailedCount;
        }

        while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            switch (msg.message)
            { 
            case WM_QUIT:
                break;
            default:
                TranslateMessage(&msg);
                DispatchMessage(&msg);     
            }   
        }
        if (msg.message == WM_QUIT)
            break;
    }

    //uFailedCount += uFailedCountSave;
    //uTotalCount = (unsigned)(vecModelList.size() + vecMeshList.size());
    // snprintf(
    //    szMessage, sizeof(szMessage), 
    //    "模型加载检查完成:共检查模型 %u 个 已发现错误 %u 个,请检查文件%s", 
    //    uTotalCount, uFailedCount, g_cszErrorFileName[TYPE_MDL]
    //);
    //szMessage[sizeof(szMessage) - 1] = '\0';
    //::MessageBox(g_hWnd, szMessage, "检查报告", MB_OK);

    nResult = true;
Exit0:
    if (pFile)
    {
        pFile->WriteInteger("ErrorMesh", "ErrorNum", uFailedCount);
        pFile->Save(g_cszErrorFileName[EXT_MESH]);
    }
    SAFE_DELETE_ARRAY(pbyTestFileData);
    SAFE_DELETE_ARRAY(pbySourceFileData);
    if (strstr(strBSPPathName, "_test.bsp"))
    {
        DeleteFile(strBSPPathName);
    }


    KG_COM_RELEASE(piModel);
    KG_COM_RELEASE(pFile);
    KG_COM_RELEASE(piTestFile);
    g_bForceGenerateBspForMesh = FALSE;
    g_vecSourceList.clear();
    return nResult;
}
示例#3
0
int TestLoadAllDetail()
{
    
    int nResult                         = false;
    int nRetCode                        = false;
    HRESULT hrRetCode                   = E_FAIL;
    unsigned uTotalCount                = 0;
    unsigned uFailedCount               = 0;
    unsigned uFailedCountSave           = 0;    
    IIniFile *pFile                     = NULL;
    IKG3DModel *piModel                 = NULL;
    IKG3DResourceManager *piModelTable  = NULL;
    char szMessage[MAX_PATH]            = "";
    char szDirPath[MAX_PATH]            = "";
    //vector<string> vecModelList;
    //vector<string> vecMeshList;   
    MSG msg;

    nRetCode = GetCurrentDirectory(MAX_PATH, szDirPath);
    KG_PROCESS_ERROR(nRetCode > 0 && nRetCode < MAX_PATH + 1);
    strcat(szDirPath, "\\data\\source\\NPC_source\\*.*");
    szDirPath[MAX_PATH - 1] = '\0';
    //strcpy(szDirPath, "D:\\Kingsoft\\Game\\sword3-products\\trunk\\client\\data\\source\\NPC_source\\*.*");

    piModelTable = g_cEngineManager.Get3DModelTable();
    KGLOG_PROCESS_ERROR(piModelTable);

    pFile = g_OpenIniFile(g_cszErrorFileName[EXT_MESH],false,true);
    KGLOG_PROCESS_ERROR(pFile);

    nRetCode = GetFileList(szDirPath, &g_vecSourceList/*vecMeshList*/, EXT_MESH);
    KGLOG_PROCESS_ERROR(nRetCode);
    uTotalCount = (unsigned)/*vecMeshList*/g_vecSourceList.size();
    /*uFailedCountSave = uFailedCount;*/
    for (unsigned i = 0; i < uTotalCount; ++i)
    {
        char szKeyName[32] = "";
        snprintf(
            szMessage, sizeof(szMessage), 
            "Mesh模型加载检查文件:%s", 
            /*vecMeshList*/g_vecSourceList[i].c_str()
            );
        szMessage[sizeof(szMessage) - 1] = '\0';
        SetWindowText(g_hWnd, szMessage);

        try
        {
            hrRetCode = piModelTable->LoadResourceFromFile(/*vecMeshList*/g_vecSourceList[i].c_str(), 0, 0, (IKG3DResourceBase**)&piModel);
            if (SUCCEEDED(hrRetCode))
            {
                KG3DModel *pModel = (KG3DModel*)piModel;
                if(pModel->GetDetail() == NULL)
                {
                    itoa(uFailedCount, szKeyName, 10);
                    pFile->WriteString("ErrorDetail",szKeyName, /*vecMeshList*/g_vecSourceList[i].c_str());
                    ++uFailedCount;
                    KGLogPrintf(KGLOG_ERR, "%s", g_vecSourceList[i].c_str());
                }
            }
            KG_COM_RELEASE(piModel);
            g_cEngineManager.FrameMove();
        }
        catch (...)
        {
            itoa(uFailedCount, szKeyName, 10);
            pFile->WriteString("Detail_Exception",szKeyName, /*vecMeshList*/g_vecSourceList[i].c_str());
            ++uFailedCount;
        }

        while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            switch (msg.message)
            {
            case WM_QUIT:
                break;
            default:
                TranslateMessage(&msg);
                DispatchMessage(&msg);     
            }   
        }
        if (msg.message == WM_QUIT)
            break;
    }
    pFile->WriteInteger("ErrorDetail", "ErrorNum", uFailedCount);
    pFile->Save(g_cszErrorFileName[EXT_MESH]);

    //uFailedCount += uFailedCountSave;
    //uTotalCount = (unsigned)(vecModelList.size() + vecMeshList.size());
    // snprintf(
    //    szMessage, sizeof(szMessage), 
    //    "模型加载检查完成:共检查模型 %u 个 已发现错误 %u 个,请检查文件%s", 
    //    uTotalCount, uFailedCount, g_cszErrorFileName[TYPE_MDL]
    //);
    //szMessage[sizeof(szMessage) - 1] = '\0';
    //::MessageBox(g_hWnd, szMessage, "检查报告", MB_OK);

    nResult = true;
Exit0:
    KG_COM_RELEASE(piModel);
    KG_COM_RELEASE(pFile);
    g_vecSourceList.clear();
    return nResult;
    
}
示例#4
0
int TestLoadAllMaterial()
{
    int nResult                         = false;
    int nRetCode                        = false;
    HRESULT hrRetCode                   = E_FAIL;
    unsigned uTotalCount                = 0;
    unsigned uFailedCount               = 0;
    unsigned uFailedCountSave           = 0;    
    IIniFile *pFile                     = NULL;
    IEKG3DMaterial *piMTL               = NULL;
    char szMessage[MAX_PATH]            = "";
    char szDirPath[MAX_PATH]            = "";
    //vector<string> vecMTLList;   
    MSG msg;

    nRetCode = GetCurrentDirectory(MAX_PATH, szDirPath);
    KG_PROCESS_ERROR(nRetCode > 0 && nRetCode < MAX_PATH + 1);
    strcat(szDirPath, "\\data\\*.*");
    szDirPath[MAX_PATH - 1] = '\0';


    pFile = g_OpenIniFile(g_cszErrorFileName[EXT_MTL],false,true);
    KGLOG_PROCESS_ERROR(pFile);

    g_vecSourceList.clear();
    nRetCode = GetFileList(szDirPath, &g_vecSourceList/*vecMTLList*/, EXT_MTL);
    KGLOG_PROCESS_ERROR(nRetCode);

    uTotalCount = (unsigned)/*vecMTLList*/g_vecSourceList.size();
    for (unsigned i = 0; i < uTotalCount; ++i)
    {
        char szKeyName[32] = "";
        snprintf(
            szMessage, sizeof(szMessage), 
            "材质加载检查文件:%s", 
            /*vecMTLList*/g_vecSourceList[i].c_str()
            );
        szMessage[sizeof(szMessage) - 1] = '\0';
        SetWindowText(g_hWnd, szMessage);
        try
        {
            hrRetCode = g_cMaterialTable.LoadResourceFromFile(/*vecMTLList*/g_vecSourceList[i].c_str(), 0, 0, (IKG3DResourceBase**)&piMTL);
            if (FAILED(hrRetCode))
            {
                itoa(uFailedCount, szKeyName, 10);
                pFile->WriteString("ErrorMTL",szKeyName, /*vecMTLList*/g_vecSourceList[i].c_str());
                ++uFailedCount;
            }
            KG_COM_RELEASE(piMTL);
        }
        catch (...)
        {
            itoa(uFailedCount, szKeyName, 10);
            pFile->WriteString("MTL_Exception",szKeyName, /*vecMTLList*/g_vecSourceList[i].c_str());
            ++uFailedCount;
        }

        while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            switch (msg.message)
            {
            case WM_QUIT:
                break;
            default:
                TranslateMessage(&msg);
                DispatchMessage(&msg);     
            }   
        }
        if (msg.message == WM_QUIT)
            break;
    }
    pFile->WriteInteger("ErrorMTL", "ErrorNum", uFailedCount);

    //uFailedCount += uFailedCountSave;
    //uTotalCount = (unsigned)(vecModelList.size() + vecMeshList.size());
    // snprintf(
    //    szMessage, sizeof(szMessage), 
    //    "模型加载检查完成:共检查模型 %u 个 已发现错误 %u 个,请检查文件%s", 
    //    uTotalCount, uFailedCount, g_cszErrorFileName[TYPE_MDL]
    //);
    //szMessage[sizeof(szMessage) - 1] = '\0';
    //::MessageBox(g_hWnd, szMessage, "检查报告", MB_OK);

    pFile->Save(g_cszErrorFileName[EXT_MTL]);
    nResult = true;
Exit0:
    KG_COM_RELEASE(piMTL);
    KG_COM_RELEASE(pFile);
    return nResult;
}
示例#5
0
int TestLoadAllSound()
{
    int nResult                         = false;
    int nRetCode                        = false;
    HRESULT hrRetCode                   = E_FAIL;
    unsigned uTotalCount                = 0;
    unsigned uFailedCount               = 0;
    IIniFile *pFile                     = NULL;
    KG3DAnimationTagContainer *pContainer = NULL;
    char szMessage[MAX_PATH]            = "";
    char szDirPath[MAX_PATH]            = "";
    //vector<string> vecContainerList;
    vector<string> vecErrorSoundList; 
    MSG msg;
    BOOL bSave = g_eEngineOption.bUseMultiThreadAni;
    g_eEngineOption.bUseMultiThreadAni = FALSE;

    nRetCode = GetCurrentDirectory(MAX_PATH, szDirPath);
    KG_PROCESS_ERROR(nRetCode > 0 && nRetCode < MAX_PATH + 1);
    strcat(szDirPath, "\\data\\*.*");
    szDirPath[MAX_PATH - 1] = '\0';

    pFile = g_OpenIniFile(g_cszErrorFileName[EXT_TANI], false,true);
    KGLOG_PROCESS_ERROR(pFile);

    g_vecSourceList.clear();
    nRetCode = GetFileList(szDirPath, &g_vecSourceList/*vecContainerList*/, EXT_TANI);
    KGLOG_PROCESS_ERROR(nRetCode);

    uTotalCount = (unsigned)/*vecContainerList*/g_vecSourceList.size();
    for (unsigned i = 0; i < uTotalCount; ++i)
    {
        char szKeyName[32] = "";
        snprintf(
            szMessage, sizeof(szMessage), 
            "加载检查标签文件:%s", 
            /*vecContainerList*/g_vecSourceList[i].c_str()
            );
        szMessage[sizeof(szMessage) - 1] = '\0';
        SetWindowText(g_hWnd, szMessage);
        try
        {
            pContainer = new KG3DAnimationTagContainer();
            hrRetCode = pContainer->_Load(/*vecContainerList*/g_vecSourceList[i].c_str());
            if (FAILED(hrRetCode))
            {
                itoa(uFailedCount, szKeyName, 10);
                pFile->WriteString("ErrorTani",szKeyName, /*vecContainerList*/g_vecSourceList[i].c_str());
                ++uFailedCount;
            }
           /* else
            {
                for (int i = 0; i < (int)(pContainer->m_vecTags.size()); ++i)
                {
                    KG3DAnimationTagContainer::Item Tag = (pContainer->m_vecTags)[i];
                    if (Tag.Type == 1)
                    {
                       KG3DAnimationSoundTag *pTag = (KG3DAnimationSoundTag *)Tag.pTag;
                       KG3DAnimationSoundTag::DataStructure::iterator itFind = pTag->m_Tags.begin();
                       while (itFind != pTag->m_Tags.end())
                       {
                           for (int j = 0; j < (itFind->second).Data.dwValidateCandidate; ++j)
                           {
                               char *pSoundName = (itFind->second).Data.SoundCandidates[j].strSoundFileName.strFileName;
                               nRetCode = g_IsFileExist(pSoundName);
                               if (!nRetCode && pSoundName[0])
                               {
                                   vecErrorSoundList.push_back(pSoundName);
                               }
                           }
                           ++itFind;
                       }
                    }
                    if (vecErrorSoundList.size())
                    {
                        ++uFailedCount;
                    }
                    for (int j =0; j < vecErrorSoundList.size(); ++j)
                    {
                        itoa(j, szKeyName, 10);
                        pFile->WriteString(vecContainerList[i].c_str(), szKeyName, vecErrorSoundList[i].c_str());
                    }
                }
            }*/
            SAFE_RELEASE(pContainer);
        }
        catch (...)
        {
            itoa(uFailedCount, szKeyName, 10);
            pFile->WriteString("Tani_Exception",szKeyName, /*vecContainerList*/g_vecSourceList[i].c_str());
            ++uFailedCount;
        }

        while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
        {
            switch (msg.message)
            {
            case WM_QUIT:
                break;
            default:
                TranslateMessage(&msg);
                DispatchMessage(&msg);     
            }   
        }
        if (msg.message == WM_QUIT)
            break;
    }
    pFile->WriteInteger("ErrorTani", "ErrorNum", uFailedCount);

    //snprintf(
    //    szMessage, sizeof(szMessage), 
    //    "模型加载检查完成:共检查标签 %u 个 已发现错误 %u 个,请检查文件%s", 
    //    uTotalCount, uFailedCount, g_cszErrorFileName[TYPE_SOUND]
    //);
    //szMessage[sizeof(szMessage) - 1] = '\0';
    //::MessageBox(g_hWnd, szMessage, "检查报告", MB_OK);

    pFile->Save(g_cszErrorFileName[EXT_TANI]);
    nResult = true;
Exit0:
    SAFE_DELETE(pContainer);
    KG_COM_RELEASE(pFile);
    g_eEngineOption.bUseMultiThreadAni = bSave;
    return nResult;
}
示例#6
0
void KUiWndCheckBoxCommon::OnUpdateEditText(int nId)
{
    LPCTSTR pszKeyName = NULL;
    int nValue = 0;
    IIniFile *pIni = g_Ui.GetIni(true);
    KG_PROCESS_ERROR(pIni);

    switch(nId) 
    {
    case IDC_WND_CKECKBOX_TIP:
        {
            char szBuffer[128];
            ::GetDlgItemText(m_hWnd, IDC_WND_CKECKBOX_TIP, szBuffer, sizeof(szBuffer));
            pIni->WriteString(m_szName, "$Tip", szBuffer); 
            g_ClientManager.UpDataWndInClient(pIni);
            ShowErrorInformation();
        }
    	break;
    case IDC_WND_CKECKBOX_NORMAL:
        pszKeyName = "UnCheckAndEnable";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_NORMAL, NULL, false);
        break;
    case IDC_WND_CKECKBOX_SEL:
        pszKeyName = "CheckAndEnable";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_SEL, NULL, false);
        break;
    case IDC_WND_CKECKBOX_UNSEL_AND_DISABLE:
        pszKeyName = "UnCheckAndDisable";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_UNSEL_AND_DISABLE, NULL, false);
        break;
    case IDC_WND_CKECKBOX_SEL_AND_DISABLE:
        pszKeyName = "CheckAndDisable";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_SEL_AND_DISABLE, NULL, false);
        break;
    case IDC_WND_CKECKBOX_UNSEL_MSOVER:
        pszKeyName = "UnCheckedAndEnableWhenMouseOver";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_UNSEL_MSOVER, NULL, false);
        break;
    case IDC_WND_CKECKBOX_SEL_MSOVER:
        pszKeyName = "CheckedAndEnableWhenMouseOver";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_SEL_MSOVER, NULL, false);
        break;
    case IDC_WND_CKECKBOX_SEL_AND_DIABLE_MSOVER:
        pszKeyName = "CheckedAndDisableWhenMouseOver";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_SEL_AND_DIABLE_MSOVER, NULL, false);
        break;
    case IDC_WND_CKECKBOX_UNSEL_AND_DIABLE_MSOVER:
        pszKeyName = "UnCheckedAndDisableWhenMouseOver";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_UNSEL_AND_DIABLE_MSOVER, NULL, false);
        break;
    case IDC_WND_CKECKBOX_CHECKING:
        pszKeyName = "Checking";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_CHECKING, NULL, false);
        break;
    case IDC_WND_CKECKBOX_UNCHECKING:
        pszKeyName = "UnChecking";
        nValue = ::GetDlgItemInt(m_hWnd, IDC_WND_CKECKBOX_UNCHECKING, NULL, false);
        break;
    default:
        break;
    }

    KG_PROCESS_ERROR(pszKeyName);

    pIni->WriteInteger(m_szName, pszKeyName, nValue);
	g_ClientManager.UpDataWndInClient(pIni);
    ShowErrorInformation();        

Exit0:
    return;
}