The R Project SVN R

Rev

Rev 36930 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 36930 Rev 36938
Line 690... Line 690...
690
	/* Set the new text. */
690
	/* Set the new text. */
691
	obj->text = new_string(text);
691
	obj->text = new_string(text);
692
	if (text) {
692
	if (text) {
693
		if (obj->kind & ControlObject) {
693
		if (obj->kind & ControlObject) {
694
			text = to_dos_string(text);
694
			text = to_dos_string(text);
695
			if(is_NT) {
695
			if(is_NT && (localeCP != GetACP())) {
696
			    wchar_t wc[1000];
696
			    wchar_t wc[1000];
697
			    mbstowcs(wc, text, 1000);
697
			    mbstowcs(wc, text, 1000);
698
			    SetWindowTextW(obj->handle, wc);
698
			    SetWindowTextW(obj->handle, wc);
699
			} else SetWindowText(obj->handle, text);
699
			} else SetWindowText(obj->handle, text);
700
			discard(text);
700
			discard(text);
701
		}
701
		}
702
                if (obj->kind == MenuitemObject) {
702
                if (obj->kind == MenuitemObject) {
703
		    if(is_NT) {
703
		    if(is_NT && (localeCP != GetACP())) {
704
			wchar_t wc[1000];
704
			wchar_t wc[1000];
705
			mbstowcs(wc, text, 1000);
705
			mbstowcs(wc, text, 1000);
706
                        ModifyMenuW(obj->parent->handle, obj->id,
706
                        ModifyMenuW(obj->parent->handle, obj->id,
707
				    MF_BYCOMMAND|MF_STRING, obj->id, wc);
707
				    MF_BYCOMMAND|MF_STRING, obj->id, wc);
708
			
708