Click here to Skip to main content
15,894,410 members

Comments by princektd (Top 24 by date)

princektd 4-Jan-18 20:21pm View    
Also, as given in the code example, this issue happens when I try to handle the edit box creation in the 'WindowProc' override, while, if I do the editbox creation in 'PreTranslateMessage',it works fine in Win 10 1709 also. Thus the question of what changed in the workings of WindowProc in Windows 10 1709, and how to work around it...
princektd 4-Jan-18 20:09pm View    
@KarstenK The issue seems to be some under the hood update to how IME works... Everything works the way it is supposed to with Windows 7 ~ Windows 10 upto the Creators Update. The issue pops up once you have updated to Windows 10 build 1709...

The project is already set for Unicode and the issue only happens with the first keystroke on IME. after that, it works fine.
That is, if I use IME to type 'sakura', an edit box is created on the 's' KeyDown event. After creating the edit box, the 's' is entered into it, followed by the rest of the characters so that you finally get 'sakura' which IME converts to the japanese input 'さくら' in the IME composition window, and pressing the Enter key will confirm this word into the created edit box. This is the expected behaviour and works correctly prior to Windows 10 Creators Update. But after updating to the Creator's Update, the same input works differently in that, on the 's' KeyDown, the edit box is created, but after that, for some reason, it does not get included into the IME composition. So, typing 'sakura' as before now inputs 'akura'which IME converts to the japanese input 'あくら'.
The conversion to japanese in itself is correct. In the first case the japanese character is 'さ' which corresponds to 'sa', while in the 2nd case, the first japanese character is 'あ' which correctly corresponds to 'a'. As you can see, the first character 's' is missing. This problem can be seen as you are typing, that is, normally, as soon as you type 's', IME composition window will display it as an 's' with wavy underlines. The next keystroke 'a' will be appended to the existing 's' and will get converted to 'さ'. You dont need to type the whole 'sakura' word to see the issue, as in Windows 10 1709, as you type 's', the edit box will be created, but the IME composition window will not be displayed with the 's' character. The next keystroke 'a' will now open the IME composition window and input 'a' into it, which will be converted to 'あ'. Thus, the first 's' keystroke seems to get discarded somewhere, though debugging generates no errors or warnings.
princektd 5-Apr-16 21:14pm View    
Usually, the entity framework in MVC4 is used along with LINQ.That is the norm. However, Entity Framework does allow execution of raw queries for special circumstances, for example, if the query has to be generated dynamically or so. Of course, you can do the same with LINQ also. But anyway, the point is that you can execute raw queries.

Check these links for examples:
1) BinaryIntellect Knowledge Base: http://www.binaryintellect.net/articles/fbc96859-8a31-4735-baeb-7adcbc521b30.aspx
2) StackOverflow: http://stackoverflow.com/questions/16828974/how-to-execute-raw-sql-query-with-in-entity-framework

princektd 4-Apr-16 21:13pm View    
Thank you Karsten for your fast reply.
The fact that CE7 is old is worrying, but currently, even our desktops support upto windows 8. Windows 10 support is planned for our desktop application and is on the way. The problem is that the client is still on windows 7 in the desktop, and they had some discussions with CASIO before they decided on the CASIO device. It is true that they may still change the device, but the chances of that happening are less. Also, Android and iOS are not supported by us. Our software is windows only. Our clients being Japanese, they worry about security, and they dont want to use any mobile devices except those specifically made for such use cases as their own business flow. So, most probably we will be stuck with this device in case of this particular client. Hence the need to find a solution for WinCE7. If we get a solution ready, we can influence the next client more strongly saying that we already have a solution for WinCE7.
princektd 23-Aug-15 22:05pm View    
Thanks for the reply. I think maybe I still have not made myself clear. I have already got all that information into a CRecordset using afxdb.h.
that part is allright. Next, I have already displayed the tablespaces, tables and column info to the user using list controls.

The user may make changes to the data in these lists, ie, he might add a new row to the columns list, in effect, he is adding a new column to some table.
or he might delete a row from the tables list. it means he wants to delete a table.

Now, instead of directly executing these commands on the database one by one, what I want is to cache these things, and write it down in some sort of structure. After some thinking, I feel XML might be a good choice. The reason to cache the changes is that
1) reduce waiting time and confirmation prompts from the user (which will be the case if i execute each change directly to the DB)
2) the user might want to rollback some change. Thus, instead of executing the changes, I have to display the changed structure using some list controls and also output it as XML. Then I display a single confirmation prompt. Once confirmed, all the changes will be executed and there will be no rolling back. In effect, upto the final confirmation, the user has a chance to rollback any changes.

Maybe the requirements may sound odd, but I cannot change them.

After deciding to use XML, I have looked at a few MFC C++ xml classes. The msxml looks OK, but I am not sure about the COM things shown in its example.
I also looked at 2 XML classes from codeproject itself:
http://www.codeproject.com/Articles/24492/CXMLFile-A-Simple-C-XML-Parser and
http://www.codeproject.com/Articles/982/XML-class-for-processing-and-building-simple-XML-d

these might work, but they don't seem to have a remove node function (which will be needed in case the user performs a delete operation.)

Do you have any other ideas of any simple xml class? I need to be able to add nodes, change the attribute values, add or remove attributes to selected nodes,
select nodes programmatically (search for a node), and remove nodes.