C / C++ / MFC
|
|
 |

|
My guess is that login being a modal dialog will prevent the parent window from processing things (like paint messages) until the modal dialog is dismissed. Might you use a modeless dialog in this case?
|
|
|
|

|
Why, oh, Why do you want to minimize the main frame window when the Modal login dialog is displayed ?
Don't make it hard on you, just keep the main frame as is.
Nihil obstat
|
|
|
|

|
Hi all,
I'm abit of a newbie to C so what i am askign may be simple but i can't seem to find much on the internet.
i have:
char name[15];
Which could for example, contain the name "james". What can i use to check if the first character (in this case "j") is lowercase and if it is, change it to uppercase.
Many Thanks!
|
|
|
|

|
Sorry just found it myself, literally just after i posted this.
name[0] = toupper(name[0]);
|
|
|
|

|
In c language you can check wether the language is in lower case or upper case by using their ASCII value.
ie, for "A" ASCII value is 65. for "a" ASCII is 97. by directly checking this condition you can ensure character is small letter or capital letter.
to convert you can use toupper or tolower .
|
|
|
|

|
What happens if the letter is "b" or ... The standard way of checking is to use isupper()[^].
One of these days I'm going to think of a really clever signature.
|
|
|
|

|
Hi,
I am working on a project in which we can capture a video, save it in avi format. We are using Microsoft Directx for the same.
Now I want to increase the quality of the video similar to the HD mode. Is It possible using C++/VC++/MFC.?
Is it possible that we can capture a video with high quality or after capturing/saving the video, play the same in HD mode.?
Please let me know if the above discussion is ambiguous.
Anybody have any idea regarding the same.?
Any help would be appreciated.
Thanx in Advance.
Regards,
Mbatra
|
|
|
|

|
Hi All,
I am using below code to convert CString to char* and again back to CString. I am using 3rd party code which takes char* only.
const size_t newsizew = (str.GetLength()+1)*2;
char *nstringw = new char[newsizew];
size_t convertedCharsw = 0;
wcstombs_s(&convertedCharsw, nstringw, newsizew, str.GetBuffer(), newsizew /*_TRUNCATE*/ );
AfxMessageBox(CString(CA2T(nstringw)));
The conversion is working fine when content of str is in english. But this is not working properly when str is in other language.
Can anyone suggest me how to make it work even for other languages.
Thanks in advance.
|
|
|
|

|
To convert wide strings to char or multi-byte without loss of information, the wide string must only contain characters from a specific known character set / code page.
When using the wcstombs() conversion function, you must first set the locale to those used by the input string and restore it after conversion (see setlocale()[^]). The default locale is 'C' which is not language specific (English).
Another method is using WideCharToMultiByte()[^] where the code page can be specified:
int nCP = 1252; int nSize = ::WideCharToMultiByte(nCP, 0, str.GetString(), -1, NULL, 0, NULL, NULL);
char *nstringw = new char[nSize];
::WideCharToMultiByte(nCP, 0, str.GetString(), -1, nstringw, nSize, NULL, NULL);
If the code page of the input string is the same as for the current thread, you can use conversions provided by the CStringT class. This should do the job in most cases:
CStringA strA(str.GetString());
CStringW strW(strA.GetString());
|
|
|
|

|
Thanks for your reply. I am able to convert successfully using WideCharToMultiByte function. But I am facing the same problem when I use CStringA strA(str.GetStrng()) for conversion, even when I use SetLocale() function. Can you please help me out in this.
modified 21 Nov '12 - 5:49.
|
|
|
|
 |
|
|
General
News
Suggestion
Question
Bug
Answer
Joke
Rant
Admin