|
never used WTL.
for STL, you really don't need anything else.
for ATL, you might need something, depending on what your app does: if you do database stuff, you might need MDAC, etc.. but, in general no, you don't need anything unless you build "Min Size" builds, then you have to ship with a (very small) ATL dll.
-c
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
If I have these below data (base 256)
<br />
data[0] = 154;
data[1] = 203;
data[2] = 15;
data[3] = 54;
data[4] = 248;
data[5] = 175;
and I want to change data(base 256) to Ctring which have format in base 16 character
<br />
CString m_data;<br />
m_data = "9ACB0F38F8AF";<br />
Do you know how to do that?
Thank you for your answer.
|
|
|
|
|
You can do something like this, assuming data is some kind of integer type:
<br />
CString m_data;<br />
m_data.Format(_T("%X%X%X%X%X%X"), data[0], data[1], data[2], data[3],data[4],data[5]);<br />
- Anatari
|
|
|
|
|
Assuming data is an array of int :
m_data.Format ( _T("%02X%02X%02X%02X%02X%02X"),
data[0], data[1], data[2],
data[3], data[4], data[5] );
--Mike--
"alyson hannigan is so cute it's crazy" -- Googlism
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Actually what you have is a decimal number (Base 10) where the maximum value is 256, and you want to convert that to a hexidecimal or Base 16 number.
You should be able to use the Format member function of the CString class to convert each byte for you.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Thank you for your answer.
|
|
|
|
|
I have an MDI program. One of the dialog boxes carries out some calculations and writes them to a file. I would like the program to open the file automatically. The file name will be known. The user defines it in the dialog box.
Thanks
I feel more like I do now than I did awhile ago.
|
|
|
|
|
This is a basic operation with iostreams - I have articles on CP, the MSDN has info also, as does google.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
The MDI program is a text editor. I would like the file to be visable as if the user had opened it with the file open dialog box. Is this still covered with IOstreams?
|
|
|
|
|
Absolutely - an ifstream will read your file in no worries, and then you can just set up your editor to contain the data read in.
something like
std::ifstream a(szFilename);
std::string s;
while (getline(a, s))
MyInternalBuffer += s.c_str();
You need to include string and fstream for this to work.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
How do I set up the editor to contain the data? that is where i am having problems. I have no problem reading the data into the buffer.
I thought maybe I could
CMyDoc* pdoc;
pdoc.OpenFile( CString path );
I have searched my books on Doc/View architecture. I am sure the answer is there but I don't see it.
Thank You
|
|
|
|
|
kjessee wrote:
How do I set up the editor to contain the data?
Oh - the problem is not loading, it's actually having the text in the editor ? There are many ways to go about this, the simplest is to use a CEditView ( from memory ) and call SetWindowText on it.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
Has anybody tried to put a bitmap background on a CRichEditView?
I've tried to use GetRichEditCtrl().ModifyEx (0, WS_EX_TRANSPARENT) and it did give me a transparent background CRichEditCtrl. However, I can't paint the background of the view!
How come ON_WM_ERASEBKGND message is NOT sent to the CRichEditView?
Any help will be appreciated.
Thanks,
Duc Truong
In programming you can do anything (by Paul DiLascia)
In programming you can do anything (by Paul DiLascia)
|
|
|
|
|
Hi.
I am very close to finishing an IOCP Winsock program. However, there is one major bug that I have not been able to debug and determine a working solution. One reason is the fact that I do not know what causes this bug. Note that this now the only bug or at least the only one that Visual C++ Debugger finds.
Here is the message from the debugger.
-----
HEAP[Program.exe]: HEAP: Free Heap block 36a9c8 modified at 36a9f4 after it was freed
Unhandled exception at 0x77f7f570 in Program.exe: User breakpoint.
-----
I notice that the program crashes and Visual C++ Debugger outputs this message only when the IOCP handles multiple sockets. I do not have an accurate count, but I believe ten or more sockets will cause the program to crash. To my understand, IOCP can handle thousands of sockets. In fact, a working WSAAsyncSelect I/O model of this same program works great under hundreds of sockets at any given time.
In terms of IOCP, what could be some causes of this heap problem?
Thanks,
Kuphryn
|
|
|
|
|
It seems that the problems you have do not have anything to do with IOCP. It appears to be a buffer overrun or, more probable, calling delete two times on the same pointer.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Good point. Thanks.
I will check all pointers and allocations and deallocations.
Kuphryn
|
|
|
|
|
Data that exists in CTreeCtrl and can be got by GetItemData is for what ? Is handle of each tree Item not enough? ( HTREEITEM)When should I use GetItemData ?
|
|
|
|
|
Anonymous wrote:
When should I use GetItemData ?
you should use GetItemData when you've already used SetItemData to put set data into the item. it's just a place for you to store something.
-c
“losinger is a colorizing text edit control”
-- googlism
|
|
|
|
|
How can I put transparent image on Edit control or List control ..?
like MSN messanger..
Thanks for reading.
|
|
|
|
|
The list control supports background images. See the docs for LVM_SETBKIMAGE
--Mike--
"I'd rather you just give me a fish today, because even if you teach me how to fish, I won't do it. I'm lazy." -- Nish
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hello everyone,
I am writing a http server, and I can not make the decision whether using blocking socket or noblocking socket. Not long ago I finished a trial edtion with nonblocking socket in a single thread, but I found it is not very efficient, so I am rewriting it using multithreading mode. I puzzle about which kind of socket get a better efficiency.
Who has the experience please give me some advices, my server will transmit about 150kb per response, and I can not identify the amount of responses per second, my server will run at a 100M network.
thanks.
Kerry Chou from STU
|
|
|
|
|
The best performance will be achieved by using from 1 to 4 threads per processor, and Overlapped I/O for transmitting dynamically generated pages.
But if what you need is a high-performance file transfer for your HTTP server, you could use the TransmitFile API function. It has the best sustained data trasnfer rate available.
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Oh, and I almost forgot: this article[^] can be great for you!
lazy isn't my middle name.. its my first.. people just keep calling me Mel cause that's what they put on my drivers license. - Mel Feik
|
|
|
|
|
Thanks, Daniel, your information is valuable
Kerry Chou
|
|
|
|
|
whats interop?how it is used to get process id?
r00d0034@yahoo.com
|
|
|
|