|
Hi,
There is an application that comunicates with a printer through a serial interface. If i start this application, is there anyway to spy what commands have beeing sent through the used serial port?
Thank u very much,
Dirso
|
|
|
|
|
Connect serial port 1 to 2 via crossover cable.
Write program to open ports 2 and 3 and just act
like a bridge the two-- and to report on what is
sent. Then connect your printer to port 3 and
that application to port 1.
I've not had to go this far before, but I think
that should do it for you.
|
|
|
|
|
|
Ooh, that's so much nicer if you're on Windows.
I just downloaded all those utilities and have
been playing with them. Really useful stuff.
|
|
|
|
|
I have created a table (using VC++ 6.0) with MSHFlexGrid Control where I display data. I am able to add new rows to the table during run-time by calling AddItem( string, rowIndex ). However, the user should be able to delete a row from the table and I cannot find a function that would do such a thing. Of course, I can clear the contents of the row by setting each value displayed in the cell to NULL and shift up all the next rows but that sounds like a time consuming operation and I would be left with blank rows at the end of the table. Or I could redraw the table entirely, but that doesn't sound right to me either. Can somebody please tell me how to delete a row from the table without performing all those operations? If that is possible of course.
none
|
|
|
|
|
I am sorry people but I found the answer to my question. It took me a week to find what was right in front of me. Sometimes when you look too hard for an answer which is screaming in front of you you don't see it. I would have deleted this message but I couldn't. Don't know why.
none
|
|
|
|
|
I want to create a function that will take an array pointers to any data type and resize it at runtime. But I know I can't use xalloc since I'm initially allocating the memory with new. But I also can't use new in the function when I don't know what data type I'm using, or can I? Must I overload the function with everything I use it for and rewrite the operator= for every new class I use it for? There must be an easier way to do it.
|
|
|
|
|
std::vector
std::vector<MyPtr*> vPtr;
for(int i=0; i<nPointers;i++)
{
vPtr.push_back(new MyPtr);
}
MyData = *vPtr[iIndex];
vPtr.clear();
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
brandon1879 wrote:
I want to create a function that will take an array pointers to any data type
That's what templates are for.
template <typename ELEMENT_TYPE>
bool ResizeArray ( ELEMENT_TYPE** ppElts, size_t nCurrSize, size_t nNewSize )
{
}
--Mike--
The Internet is a place where absolutely nothing happens.
-- Strong Bad
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Ok, I am developing a quasi-realtime data display with some dials and sliders on it. The controls are in their own modeless dialog so users can show or hide them as they please. I am aquiring the data from a seperate datasource from within a seperate thread, and will pass the data structure to the UI via message pump. I also wrote a "window manager" class to handle which controls are shown and which ones aren't. I plan on sending a message to the "window manager" with the data structure, and then have the window manager send messages to the individual controls.
So my question is:
Do I:
A. Use SendMessage() from the DAQ thread and wait for the updates to return before acquiring the next sample, and use SendMessage() from the window manager to all the controls.
B. Use SendMessage() from DAQ and PostMessage() to the controls from the window manager, letting the control windows handle their own message que.
C. Use PostMessage() from the DAQ to the manager, and SendMessage() to the controls.
D. Use PostMessage() all around, passing the structures created on the heap and deleting them within the message handlers.
E. Some other method
Aside:
The data aquisition will more than likely take longer than the window updates, so I probably won't be flooding the message que. I plan on running between 10 Hz - 30 Hz.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
I think you have to use PostMessage() all around. Because SendMessage() returns only after the message procceed completely while PostMessage() only puts message into the message queue and returns.
Here data aquisition will take longer time then message processing. SendMessage() also take some time to process the message. So it probably make the whole process slower.
C.R.Naik
|
|
|
|
|
Also for process-safety, prefer using PostMessage. Windows guarantees that PostMessage can always be safely called from within any thread (even inside kernel code or with some gdi-locks unavailable) which is not true for SendMessage, because it is per-se unknown what the called dialog-procedure might do.
|
|
|
|
|
Pater wrote:
Also for process-safety, prefer using PostMessage.
I agree. I will implement it this way. Thanks!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Chintan wrote:
I think you have to use PostMessage() all around.
That's what I was leaning towards but I didn't want to lead any answers. Thanks!
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Hi.
Im creating a print preview and printing classes which use, among others, CRichEdit class. Ive managed to get it working very well (not using Doc/View Arch.) EXCEPT for one detail: when i print a RTF text with double spacing between the lines, it works fine both on preview and on printing. When i use single spacing (default), it puts half the space between lines in printing than in preview!! I dont know if its the printing or the print preview that is working wrong on this, or is it a weird bug in CRichEdit...
Thanks in advance
Miguel Lopes
|
|
|
|
|
E.g., Yahoo.com
When I move the cursor on the Yahoo.com, how can I get the URL of this link from outside. I will not host the internet browser. In other words, is there a function that I can hook to retrieve the URL? Thanks.
|
|
|
|
|
|
Thanks. This is very helpful.
|
|
|
|
|
I am working on some functionality using AnimateWindow() and I was curious to know if anyone had a good example of a WM_PRINTCLIENT implementation.
Any help would be appreciated.
Thanks,
David Ramsey
|
|
|
|
|
Hiya where is the Project->Settings in Visual Studio.NET, that is in Microsoft Visual 6.0. Need to add some .lib files to my project..
Thanks,
grahamoj.
|
|
|
|
|
Go to your project in the solution explorer, right click and choose properties. When the dialog comes up choose Linker and then input. Additional Dependencies is the first item on the page.
Hope this helps.
|
|
|
|
|
When you do this, make sure you right click on your PROJECT, and not on the solution! The properties for the Solution is pretty much worthless.
You can pick your friends, and you can pick your nose, but you can't pick your friend's nose.
|
|
|
|
|
You might be trying to add lib file before starting the project. First select new project and do its settings .
-------------
Fist of all, select
File =>Projects and choose the type of project u want to make ie. MFC exe .
Then complete the steps for project settings
After finishing that then see at menu options on top , click on
Projects==>Setttings==>Click on Link tab and add the lib files in Obje:-Dct/Library module
|
|
|
|
|
You might be trying to add lib file before starting the project. First select new project and do its settings .
-------------
Fist of all, select
File =>Projects and choose the type of project u want to make ie. MFC exe .
Then complete the steps for project settings
After finishing that then see at menu options on top , click on
Projects==>Setttings==>Click on Link tab and add the lib files in Object/Library module
|
|
|
|
|
I have a CFormView. In the lower right corner,
the user can stretch or compress the application.
How can I make the CFormView stay a fixed size
or in other words, how can I get rid of those
slanted bars in the lower right corner so that
a user can not adjust the size?
Please, any response any one can give me will be
greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|