Exemplo n.º 1
0
void InitLanguageDialog()
{
	int langRet;

	langRet = InitLanguage( MyPrefStruct.language, 0 );
	if ( langRet ) // Have defaulted to loading English
		mystrcpy( MyPrefStruct.language, ENGLISH_LANG );
	Init_LangComboBox( hDlg, IDC_LANGTOKEN_LANG );
	SetComboLanguageSel( hDlg, IDC_LANGTOKEN_LANG, MyPrefStruct.language ); 
	InitLangList();
}
Exemplo n.º 2
0
void ChangeLanguageStringInComboBox()
{
	int langRet;
	if ( changedSomeStrings )
	{
		if ( MessageBox( GetFocus(), "Some strings have been changed!\nAre you sure you want to load another language without saving the current language?", "Unsaved language strings"/*ReturnString(IDS_MAKEDIR)*/, MB_YESNO|MB_ICONWARNING ) == IDNO ){
			return;
		}
	}
	LanguageString_GUItoData( hDlg, IDC_LANGTOKEN_LANG, MyPrefStruct.language );
	langRet = InitLanguage( MyPrefStruct.language, 1 );
	if ( langRet ) // Have defaulted to loading English
		mystrcpy( MyPrefStruct.language, ENGLISH_LANG );
	InitLangList();
	SetComboLanguageSel( hDlg, IDC_LANGTOKEN_LANG, MyPrefStruct.language );
	gSaved = FALSE;
}
Exemplo n.º 3
0
VOID
UpdateLayoutsList(VOID)
{
    HIMAGELIST hImgList;

    /* Clear the list */
    (VOID) ListView_DeleteAllItems(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST));

    /* Crate new list */
    hImgList = ImageList_Create(16, 16, ILC_COLOR8 | ILC_MASK, 0, 1);
    InitLangList(MainDlgWnd, hImgList);
    hImgList = ListView_SetImageList(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST), hImgList, LVSIL_SMALL);

    /* Destroy old image list */
    if(hImgList)
        (VOID) ImageList_Destroy(hImgList);
}
Exemplo n.º 4
0
/* Property page dialog callback */
INT_PTR CALLBACK
SettingPageProc(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lParam)
{
    UNREFERENCED_PARAMETER(lParam);

    switch (uMsg)
    {
        case WM_INITDIALOG:
        {
        	HIMAGELIST hImgList;

            MainDlgWnd = hwndDlg;
            AddListColumn(hwndDlg);
            (VOID) ListView_SetExtendedListViewStyle(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST),
                                                     LVS_EX_FULLROWSELECT);
            hImgList = ImageList_Create(16, 16, ILC_COLOR8 | ILC_MASK, 0, 1);
            InitLangList(hwndDlg, hImgList);
            (VOID) ListView_SetImageList(GetDlgItem(MainDlgWnd, IDC_KEYLAYOUT_LIST), hImgList, LVSIL_SMALL);
        }
            break;
        case WM_NOTIFY:
        {
            switch (LOWORD(wParam))
            {

            }
        }
            break;
        case WM_COMMAND:
            switch (LOWORD(wParam))
            {
                case IDC_REMOVE_BUTTON:
                    DeleteLayout();
                    break;

                case IDC_KEY_SET_BTN:
                    DialogBox(hApplet,
                              MAKEINTRESOURCE(IDD_KEYSETTINGS),
                              hwndDlg,
                              KeySettingsDlgProc);
                    break;

                case IDC_ADD_BUTTON:
                    DialogBox(hApplet,
                              MAKEINTRESOURCE(IDD_ADD),
                              hwndDlg,
                              AddDlgProc);
                    break;

                case IDC_PROP_BUTTON:
                    if (IsLayoutSelected() != -1)
                    DialogBox(hApplet,
                              MAKEINTRESOURCE(IDD_INPUT_LANG_PROP),
                              hwndDlg,
                              InputLangPropDlgProc);
                    break;

                case IDC_SET_DEFAULT:
                    SetDefaultLayout();
                    UpdateLayoutsList();
                    break;
            }
            break;
        case WM_DESTROY:
            break;
    }

    return FALSE;
}