|
There's an email link in my post.
|
|
|
|
|
Hi All,
I want to Use the SQLFetchScroll to Move the Record to First Position.
There is no Article which gives clear clarity of this Usage.
Pls help me out.
Thanks & Regards,
Uday
|
|
|
|
|
There is a good description on MSDN[^]. I haven't tried, but I would guess you use FetchOrientation = SQL_FETCH_FIRST, and FetchOffset = 0 to get the first record.
|
|
|
|
|
Hi,
Im having MDI application.In that for only one view, iam adding menu.
So i reffered one article form MSDN and i create the menu for that particular view.
http://support.microsoft.com/kb/118435[^]
By using this document i coded and i got my menu also.
But what i need is?
Actually for that particular child window im setting size of the window as 0,0,1500,700.
When i set this,the child window menu is attached with mainframe,only the window is getting this postion.
How can i change this.
I want to move this menu from mainframe to the childwindow(below the caption bar).
Pls help.
Anu
|
|
|
|
|
In google chrome they have checksum value for bookmark file.if i add any bookmark manually i need to change checksum value otherwise browser don't display bookmarks...
|
|
|
|
|
Well, Chrome is open source. Presumably the algorithm is in the code somewhere.
Check out http://dev.chromium.org/developers/how-tos/get-the-code[^].
There is a link to search the code on that page, but I couldn't find it, but is is there somewhere. Also Chrome calls bookmarks favourites.
|
|
|
|
|
When I try to save a text file with non-English text in Notepad, I get an option to choose between Unicode, Unicode Big Endian and UTF-8. What is the difference between these formats?
which of these formats is better?
(Assume that the text can be in languages like Chinese or Japanese, in addition to other languages.)
please tell me which option is better and why?
thanks in advance.
|
|
|
|
|
|
What i know is Unicode is UTF-16 and it is of two types big-endian and little-endian.
The difference between the Unicode and UTF-8 is explained in link below:
->[^]
You can save the file in all format but it is better if you are choosing UTF-8.
I think you already know the DOM character. You have to write this DOM character at first and than your data, so that your file is automatically saved in UTF-8 or Unicode format.
Bytes Encoding Form
00 00 FE FF UTF-32, big-endian
FF FE 00 00 UTF-32, little-endian
FE FF UTF-16, big-endian
FF FE UTF-16, little-endian
EF BB BF UTF-8
I use the UTF-8 format because Java client use my text file and it only support UTF-8 not unicode.
[EDIT] One more thing if you have any doubt about Unicode than always prefer unicode.org [/EDIT]
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
Shilpi Boosar wrote: What i know is Unicode is UTF-16 and it is of two types big-endian and little-endian.
Unicode basically is an enumeration of characters in many languages.
Character sets are representations using bytes of most (only most these days) of all of the characters in the total enumeration.
UTF16 is a short hand to refer to a character set that represents each code point (often but not always a single character) as 16 bits.
Big endian and little endian is a separate issue which involves when a computer system represents a single multi-byte value with the most significant byte first or last. This can apply to numerics as well as character representations.
Shilpi Boosar wrote: I think you already know the DOM character. You have to write this DOM character at first and than your data, so that your file is automatically saved in UTF-8 or Unicode format.
The Byte Order Mark or BOM is an optional part of a character file/stream. It does not determine the make up of the character set used after that, but a processor can use it to determine how to correctly consume the source.
However some processors will not read the BOM at all so one must test with it to insure it works.
Shilpi Boosar wrote: I use the UTF-8 format because Java client use my text file and it only support UTF-8 not unicode.
Incorrect.
UTF8 is as valid as a unicode character set as any other unicode character set.
|
|
|
|
|
1) When you save your text file as unicode than the first two character is BOM character i.e. 255 244 (UTF-16 Little endian).
2) When you save your text file as UTF-8 than the first three character is 0xEF,0xBB,0xBF
Programaticallly when I save file as unicode or UTF-8 than I must add these character first in my file. If I am not wrong than these are BOM character as per the Unicode Official site.
3)
jschell wrote: UTF8 is as valid as a unicode character set as any other unicode character set.
Absolutely right. I just explain him my point that if java client is using utf-8 file than only it reads the file properly else not.
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
Shilpi Boosar wrote: 1) When you save your text file as unicode than the first two character is BOM character i.e. 255 244 (UTF-16 Little endian).
I never save files with BOMs. On occasion I have had to go out of my way to insure that it didn't show up in XML streams because some processors wont handle them. That is probably because I only use UTF8 streams though.
Shilpi Boosar wrote: 2) When you save your text file as UTF-8 than the first three character is 0xEF,0xBB,0xBF
Actually with UTF8 you should never use a BOM. UTF8 is a single byte encoding so by definition there can be no ordering.
Not to mention that the unicode site specifically says to not do that. Search for "byte order mark" in the following.
http://unicode.org/faq/utf_bom.html[^]
|
|
|
|
|
char strUTF8[] = { unsigned char(0xEF), unsigned char(0xBB), unsigned char(0xBF),'\0' };
char str[4];
sprintf(str,"%c%c",255,254);
CStdioFile m_OutPutFile;
m_OutPutFile.Open(_T("C:\\ANSI.txt"),CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
m_OutPutFile.Close();
m_OutPutFile.Open(_T("C:\\UTF8.txt"),CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
m_OutPutFile.Write(strUTF8,strlen(strUTF8)*sizeof(char));
m_OutPutFile.Close();
m_OutPutFile.Open(_T("C:\\Unicode.txt"),CFile::modeCreate|CFile::modeWrite|CFile::typeBinary);
m_OutPutFile.Write(str,strlen(str)*sizeof(char));
m_OutPutFile.Close();
Ok run this code in any console application and check in which encoding format these files are saved.
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
Shilpi Boosar wrote: Ok run this code in any console application
Why?
Shilpi Boosar wrote: and check in which encoding format these files are saved.
And exactly what universally accepted standard are you going to use to do that?
|
|
|
|
|
Joel has an easy articlle[^] on basics of Unicode. I'd start with reading that.
|
|
|
|
|
I have a Handle to the Rich Edit Control of Wordpad application in my Keypad application. I want to directly access the Internal Data Structure for this Rich Edit Control without using Windows Messages .
I do not want to use any of the SendMessage PostMessage APIs or Windows Messaging as this exposes my typed data to keyloggers. How can I write directly to the Internal Buffer of Rich Edit Control ?
Kamal Jagesia
|
|
|
|
|
To my knowledge, no windows control, not just richedit32 but buttons, statics and everything can only be interacted with through the windows message pump.
Keyboard loggers generally work by installing keyboard hooks, which wont pick up these interactions, however it is possible (as Spy++ proves) to intercept the message pump however there would be so much data to sift through for the attacker that it wouldn't be a practical attack.
|
|
|
|
|
I'm not sure exactly what you are trying to do but you may wish to create your own class based on the
CRichEdit[^] class. You may then be able to gain access to some of the internals of the class.
I must get a clever new signature for 2011.
|
|
|
|
|
hello
please can any one help me. how to make point to Rect .
for example i had two point..
cpoint p1,p2;
now p1 has (x1,y1);
p2 is (x2,y2);
how to make it into Rect .....
thanking you
sarfaraz
|
|
|
|
|
CRect has a constructor which accepts two points: the top-left corner and the bottom-right corner, please check the MSDN documentation.
|
|
|
|
|
|
Hi dear..
First of all you have to take one CRect..
CRect rectangle;
rectangle.left = p1.x;
rectangle.top = p1.y;
rectangle.right = p2.x;
rectangle.bottom = p2.y;
|
|
|
|
|
1. Is it legal to use
#include<atlstr.h>
in a win32 native Windows Application.
2. Does using atlstr.h in Win32 Native Windows Application causes any kind of error.
<br />
Source Found on Internet:<br />
Starting VS 2003, you can use CString in non-MFC applications by including header atlstr.h:
Some Day I Will Prove MySelf :: GOLD
|
|
|
|
|
Yes you can use it.
1) If you create an application than one option for ATL i.e. "Add common header files for ATL" is displayed.If you select these than it automatically add this header for you.
or
2) You can use basic_string of STL, std::string, std::wstring as per your requirement.
I believe in LOVE AT FIRST SIGHT...
Bcoz I have loved my Mother...
even since I opened my eyes...(ICAN)
|
|
|
|
|
do std::wstring has trim function as CString have.
(Trim, LTrim, RTrim )
Some Day I Will Prove MySelf :: GOLD
|
|
|
|