Normally I would set a line of text in a Static Text Box like this:
CWnd* pWnd;
CString TestString;
pWnd = GetDlgItem(IDC_TESTTEXT);
pWnd->SetWindowText(TestString);
But if I do this, only the last line is displayed.
CWnd* pWnd;
CString TestString;
CString...
Thanks, I'll give it a try, but I am still a little confused. The documentation for SetSel and ReplaceSel looks like it is for selecting or higlighting the text in an edit box. I just want to dump text into it and have the user be able to scroll back and lok at it.
Tim Moody
Sorry for the first year question, but I searched to forum and couldn't find an answer. I need to display test results(CString) to a user in my dialog based app. I would just like to have a simple window, with a vertical scroll bar, so the operator can scroll back looking at the results. This...
Sean,
just a quick note. I write code for test equipment to test electronics product on a production line. I use the bitwise shift operator quite a bit. One of the routines I wrote receives a 32bit word, masks off the upper 24bits, writes the lower eight bits out a port, and then shits that...
Actually the syntax is %.3hu, the original guy on this thread always wanted three places for the milliseconds, at least the way I read it. I've never used the "h" specifier before, but I believe it means a "half word" or only 16 bits. Can anyone verify this??
tmoody
El_Bench,
I checked out the NTPort library and it looks pretty good, although I didn't download and try it. I would certainly give it a try if I had to write any serial port stuff from the ground up. Thanks!
Tim Moody
el_bench,
I assume you are using MFC?? A simple example is included in the SDK. Go to Help and search for "Communications Demonstration". We use the DDK here at work, and I haven't written any code for the serial port, except DOS and Unix, both pretty simple compared to Bill's way. The...
rdubois,
Without looking at your code, I suspect the code is trying to directly access hardware. I am not familiar with 98 but this is a no-no on NT and 2000. No inp OR outp
First off, you probably will have to write some code to handle this. There may be something already out there, but you are locked into it and you need to get a task done. I've done what you requested with remote equipment but since RS232 is rather stupid, you need to rely on hardware. Your...
Another method for transfering packets thru a serial port that are a little easier to understand, but admittedly less robust are the "older" protocols like XModem, Ymodem, or even ZModem. The source for these are readily available. It's even pretty easy to write your own protocol for...
I am having a little difficulty on what I term a simple exercise. I have a text file that has multiple strings seperated by white space and then a newline character. Using fscanf dosn't work very well, and I was wondering the best way this??
Thanks in advance
Tim Moody
I have a list of model numbers that may or may not change. What is the most common way of handling a table. Do we use "ini" files?? Back in the old days I would have just declared them in a header file and then recompile if something was added. Later in life I would use a...
The only help I can offer is Linux. I believe the source code to Apache(web server)is freely distributed, but maybe not. This may be a basis for your code.
Tim
Isn't this as simple as parsing a table, then adding all the numbers?? If someone enters MMDXI you would add 1000, 1000, 500, 10 and 1, for 2511?? Maybe it's more complicated than that, but hey, it's your class!!
I 1
V 5
X 10
L 50
C 100
D 500
M 1000
Tim
All I can do here is quote the book:
The result of a shift operation is undefined if the second operand is negative, or if the right operand is greater than or equal to the width in bits of the promoted left operand.
Shifting a negative value to the right yields half the absolute value...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.