|
My OS is Windows 2000 with the Microsoft multilingual add on. I have a simple non-unicode windows MFC app that contains one standard property sheet with three pages on it. The property pages are displayed fine when I am using the "English" language.
I now change my language to use "Chinese (standard)". When the sheet is displayed, the pages inside the sheet appear with the wrong font and are oversized, with most of my controls not visible off the edge of the property sheet (the sheet does not resize to accommodate the oversized pages). Other standard dialogs appear OK.
I think this may be some kind of windows bug. Has anyone encountered anything like this before? Any ideas on a solution? No matter how hacky...
|
|
|
|
|
how can i add unicode support and arabic support in visual c?
|
|
|
|
|
I just converted a simple APP to unicode and I had to change the following on my settings dialog:
1) Add ",_UNICODE,UNICODE" to the "Preprocessor definitions" edit box on C/C++ tab.
2) Add ",_UNICODE,UNICODE" to the "Preprocessor definitions" edit box on Resources tab.
3) Change my "Entry-point symbol" to "wWinMainCRTStartup" on the Link tab.
Then, whenever you use strings in your code, you have to use the unicode functions and the "_T" macro and all that.
Not sure about Arabic support specifically...
|
|
|
|
|
And use TCHAR*, CString , wchar*, wstring, wstringstream throughout.
no char*, string as it is meant for MBCS or system without UNICODE.
Hope this helps
Sonork 100.41263:Anthony_Yio
|
|
|
|
|
how to get the type of the system registry of a particular value using c++..
i use RegOpenKeyEx to open reg and RegQueryValueEx to get the value of the subkeys..
how to get the data and type of that value?
ranjani
|
|
|
|
|
how to get the type of the system registry of a particular value using c++..
i use RegOpenKeyEx to open reg and RegQueryValueEx to get the value of the subkeys..
how to get the data and type of that value?
ranjani
|
|
|
|
|
|
ranjjj wrote:
how to get the data and type of that value?
You seem to have answered your own question. RegQueryValueEx() is used to retrieve both the type and data for a specified value.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
for example to get the type of HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup
..what hould be the parameters to be passed on to thef unctiona dn chow should i use it in my code?
ranjani
|
|
|
|
|
DWORD dwType;
RegQueryValueEx(HKEY_CURRENT_USER, "SYSTEM\\CurrentControlSet\\Control\\BackupRestore\\FilesNotToBackup", NULL, &dwType, ...);
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
for example to get the type of HKEY_CURRENT_USER\SYSTEM\CurrentControlSet\Control\BackupRestore\FilesNotToBackup
..what hould be the parameters to be passed on to thef unctiona dn chow should i use it in my code?
ranjani
|
|
|
|
|
Hello people,
i am working on a dialog-based mfc app. I added a member-variable of type CMenu to the CDialog-derived class, so that a menu is available. I use the ON_UPDATE_COMMAND_UI makro in the message-map of the Dialog to enable/disable menu-items. But the corresponding menu-item isn't drawn in grey color as expected when it is disabled. Why? Does someone has a clue how i can fix this?
Best regards
tabor25
|
|
|
|
|
|
Thank you very much for answering to my question. I read the recommended article and added a menu to the demo-project including a test-item. Then i added a UI notification-handler for the menu-item to the dialog-class (where the ui-handler for the button is located), but in case of disabled the menu-item would not be drawn in grey color. I don't know what to do!
Best regards
tabor25
|
|
|
|
|
Hi all,
I have a unicode file (strings.mc contains ids and langauge translations).
i wrote to methods to perfrom reading from and saving to this file:
void CMyClass::ReadingMCFile()
{
FILE* fp = fopen(m_szMCFile, "rb");
ASSERT(NULL != fp);
if (NULL == fp)
{
AfxMessageBox((_T("Could not open the file : %s"),m_szMCFile),MB_ICONERROR);
return;
}
wchar_t wcBuff[MAX_PATH];
do
{
fgetws(wcBuff, MAX_PATH, fp);
m_vecMCFile.push_back(wcBuff);
} while(!feof(fp) );
fclose(fp);
}
where m_vecMCFile is in the type of :
std::vector<wchar_t*> m_vecMCFile;
now i wrote a method to write the changes back to the mc file (meaning going over the vector and write each line to the file as follows:
void CMyClass::WriteMCFile()
{
if (!DeleteFile(m_szMCFile))
{
AfxMessageBox((_T("Could not delete the file : %s for writing "),m_szMCFile),MB_ICONERROR);
return;
}
FILE* fp = fopen(m_szMCFile, "wb");
ASSERT(NULL != fp);
if (NULL == fp)
{
AfxMessageBox((_T("Could not open the file : %s"),m_szMCFile),MB_ICONERROR);
return;
}
wchar_t* wcBuff = NULL;
std :: vector<wchar_t*>::iterator vecIT;
for (vecIT = m_vecMCFile.begin(); vecIT != m_vecMCFile.end(); vecIT++)
{
wcBuff = (*vecIT);
fputws(wcBuff, fp);
}
fclose(fp);
}
this code doesn't work...
can any1 help me fix it?
thanks in advanced
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
trouble was the wchar_t wcBuff[MAX_PATH]; was defined local, so when the scope was out of the method the value was garbage, so i needed to save the value using the new operator......
that did the trick
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
hi all,
i am using AutoRichEditCtrl for displaying few text.i have set it to a different font in which some characters have a dot above it. whenever i try to write such characters with a dot above it a white space gets automatically appended. how do i remove such white spaces???
please help me......
thanks!
ramya.
|
|
|
|
|
something that came through my mind : may be the use of '\b' in the TXT string could help ?
when you add a new character, you're program looks if that character is not a white-space and so if you have a w/s as your last char, use \b to delete that w/s.
F
|
|
|
|
|
Hi there. I created a window with "CreateWindow" API as a child window in another application. I want that this window is transparent which isnt a problem using GetDC and BitBlt... but the problem: the parent window has a changing background. How can my created window notified when the parent refreshes?
Thanks for reading & helping
|
|
|
|
|
I'm working on an MDI application in MFC. I need my CMDIFrameWnd to be able to tell which CMDIChildWnd is currently active. Specifically, I need it to know which CMDIChildWnd's name is currently being displayed in the title bar of the CMDIFrameWnd, even if that CMDIChildWnd does not have the focus (due to focus being controlled by a modeless dialog, for example).
How can I track for that?
|
|
|
|
|
I Found When I click Startmenu->Log Off, MessageBox " Are you sure You Want to Log Off" is appear,the background is fade off on gray scale.
I want to do my dialog is activate,background color is fade off on gray scale.
HOW CAN I DO IT
Please Help me
|
|
|
|
|
Never tried this, but I'd imagine the thing to do is take a screenshot of the whole screen, then paint that image onto a window the size of the screen, then progressivly repaint while desaturating the image.
*¨¨`)
¸¸.·´ ¸.·*¨¨`)
(¸¸.·* ¸ .·*
¸¸.·*
(¸¸.~~> Joel Holdsworth.
|
|
|
|
|
Hi,
My prob is like this...
1) I have a CMain wh is the parent of several propertysheets, eg CPptySheet1.
2) After pressing a button on CMain, a modal dialog box pops up, CModal.
3) I change some values using CModal and i want the changes to be reflected in PptySheet1.
4) I cannot use OnInitDialog coz the ppty sheets are initialized b4 CModal.
5) I have also tried using OnSetActive...and even OnShowWindow.....but it doesnt work. How can i dynamically show changes, if there are any, every time the property sheet is shown? Please advise...thanks!
|
|
|
|
|
Use Messages defined by oneself.
And SendMessage(...);
Hello World!
|
|
|
|
|
Erm...i'm nt too familiar with that...Could u elaborate? So do i need to specify where the message is sent to or where it is sent from etc? Thanks!
|
|
|
|