1. We have created a dialog with unicode compilation. In this we have some text boxes or other controls where we don't want to allow to enter any non-english charaters.
Can there is some easy way to set the flag for CEdit, so that it won't allow to enter any non english characters. I don't want to override (MaskEdit) the CEdit. In MBCS build we are able to type only English chars. Non english is converted to ????.
How Windows is managing this Non unicode and unicode windows?
2. Is the support for _MBCS is removed from the Visual Studio 2005.
In non unicode (MBCS) build, in Visual Studio 98, we were able to type the unicode characters, but this seems not to be working with VS 2005
By default VS2005 new projects are set to UNICODE, you need to change this in the project settings for MBCS. The reason for you not being able to see non english characters is probably due to a local setting. Without seeing any code there is not much else I can say to help you.
I've an exe and related folders in the Machine1.
The exe will be run as a service using srvany.exe in Machine2 and Machine3.
Based on the availablity of network connection I need to stop or proceed the application. I'm getting unhadled exception instead of catching the exception.
if the exe is run from the system where the exe and dlls are, the exception will be caught properly.
Why do this happen?
Just before opening a recordset, i disable and enable the network connection.
While opening, it throws an exception which is not getting caught, though i've given CDBException, CException, default exception block.
In the dbcore.cpp, it goes to the catch block of Open() from where TROW_LAST is called and writes these trace messages.
State:08S01,Native:11,Origin:[Microsoft][ODBC SQL Server Driver][DBNETLIB]
State:01000,Native:10054,Origin:[Microsoft][ODBC SQL Server Driver][DBNETLIB]
General network error. Check your network documentation.
The hierarchy is like this CRecordset->CMyRecordset->CTableRec.
The CMyRecordset::Open() will check for network availability before calling CRecordset::Open().
The network availablity is checked using:
SQLRETURN nReturnVal = ::SQLGetConnectAttr(m_hdbc,SQL_ATTR_CONNECTION_DEAD,
bStatus = (BOOL) ((nConnectionStatus == SQL_CD_TRUE) ? FALSE : TRUE);
bStatus = FALSE;
bStatus is always 1, irrespective of network connection.
How do i check it or how do i handle the unhandled exception?
The best way is to draw each dialog for each language due to the diferent length of words in different languages (it will be easier to move), and to have string table for each language for specific messages.
to load string:
DESKDELIVERY_IDS_PAPERPORT_FOLDERS - is ID of string in string table(For Each Language must be the same)
After this you will have dlls with different languages and same dlls names, better to place them in separate directories, and depending on selected languge copy them to program folder and load.
Ofcourse you can use one dialog for all languages, but it is more comfortable to edit form in designer, than you will write case statements for each language calculating size of label, button etc... - its horror if you have big project. Imagine that one of your strings will not fit in one line what would you do? Or imagine that you will need to change some text, in designer it's simply, while with one form you will need to find it in code and set new coordinastes, so if your project is not too big you can use one form, but if big I advice you to use separate forms.