|
Hi,
I need to implement an ActiveX control in a simple Dlg based MFC application.
This controls scans the serial port after messages and sends them to my application
( in theory that is)
In a VB application there is no problem to receive the event. But i need it in VC (MFC)
the init of the object seems to work and the messages should be sent (trace line in the
on_fire call) but i don't receive anything in my dlg.
I think that i missed some small init to work with events but i simply can't rememeber
what or wich. Any pointers would be very appriciated.
codito ergo sum
|
|
|
|
|
The following is for MSVC6. If you right click on the ActiveX control on the dialog and select "Events..." a dialog appears which will let you add event handlers.
Steve
|
|
|
|
|
Hi
I did that and a new member functions is created but i never seems to fall into
that function.
Very strange ???
codito ergo sum
|
|
|
|
|
I tested it with the calendar control and it works fine. I would guess the control isn't actually firing the event.
Steve
|
|
|
|
|
Ok
i've done some deep debugging into that altough the Fire_Message is called
there are no connections (connected appz) for this control ????
how is this possible ??? I have attached my project(activeX control) to the
test application (MFC dlg) and I am falling into a breakpoint in the
Fire_Message function, but there is no connection ???
Something wierd is going on.
codito ergo sum
|
|
|
|
|
Does anyone know what the following statement refers to:
//lint !e740
Thanks
r
|
|
|
|
|
It's a single-line comment.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Yes, I know this.
Any idea on the "lint !e740" part? Is this a comment I should understand?
|
|
|
|
|
russeller wrote: Any idea on the "lint !e740" part? Is this a comment I should understand?
It all depends on the context (e.g., how did it get there (Lint is assumed)? what code is it near?), I guess.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
They want to ignore the Error 470 that the lint might have output for the following code.
You can maybe find out wht PC-Lint Error 470 is, and then that would give you some idea of what potentially squirelly code you are looking at.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
Now that is a good quote!
It is the best description I have ever read about the difference between a programmer and a Software Engineer.
INTP
Every thing is relative...
|
|
|
|
|
Thanks for noticing. I think some people do not beleive there is a difference ...
That is why I kept it as the byline for quite awhile now.
People that start writing code immediately are programmers (or hackers), people that ask questions first are Software Engineers - Graham Shanks
|
|
|
|
|
I think it's related to LINT[^] which is a static C/C++ Analyser, to check for programming errors and other stuff like that.
might be to suppress error 740 when running lint on that file ( or next few lines ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Thanks, that helps. I had not heard of PC-lint before.
r
|
|
|
|
|
Found the Lint error list if anyone is interested:
http://gimpel.com/html/pub80/msg.txt
Thanks to all who responded.
r
|
|
|
|
|
Hi!
I am using Visual Studio 2005 Standard.
I am having a hard time with below,
c:\program files\microsoft visual studio 8\vc\include\stdlib.h(406) : error C2381: 'exit' : redefinition; __declspec(noreturn) differs
1>c:\program files\microsoft visual studio 8\vc\include\gl\glut.h(146) : see declaration of 'exit'
Please help me!
Yonggoo
|
|
|
|
|
What do I use to see some output in the pane when the code is running in debug?
thanks,
sb
|
|
|
|
|
With Win32, use OutputDebugString() . With MFC, use TRACE() .
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
Thanks. I had forgotten what it was, and there was no simple way to google it
|
|
|
|
|
Can't you use OutputDebugStr()? Try the TRACE macro also.
Why is common sense not common?
Never argue with an idiot. They will drag you down to their level where they are an expert.
|
|
|
|
|
I have given the following arguments to a program.
-i:Test_Data1.txt -i:Test_Data2.txt -o:Test_Data_Diff.txt
-c:"TOW:Udop:dN,0.2:vU,0.0005:L1P Sats:Slow nSat" -r:TOW -a:alertfile.txt
-i:Test_Data1.txt ....... This is the filename of first file
-i:Test_Data2.txt ....... This is the filename of Second file
My goal is to do the differences between both the files. I have 39 columns in both the files. I need to get the differences for only the columns i need.
so, i am giving the column names for which i want the differences as arguments i.e the following
-c:"Time:Salary:limit,0.2:age,25:Status:hours".
Suppose i declare two variables int argc, char *argv[]
i know that i would have "-" in argv[i][0], i/i/o/c/r/a in argv[i][1] etc
I want to take out 0.2 or 25 from this argument and store it in another varable. How can i do it?
c:"Time:Salary:limit,0.2:age,25:Status:hours".
the argument can also be like this.
c:"Time,0:Salary:limit:age,25:Status,1:hours".
I want to pick up the number which comes after the comma and store it in another variable. How is this possible?
|
|
|
|
|
I remember tackling the command-line-parsing problem back when i was in college. It was very challenging and also very rewarding. Years later when I started using Turbo C, I had a file, getopt.c, that I simply added to any project that needed this functionality. Now the function, in its various forms, can be found in several places on the Internet.
cuteee wrote: i know that i would have "-" in argv[i][0], i/i/o/c/r/a in argv[i][1] etc
Right.
argv[1] = -i:Test_Data1.txt
argv[2] = -i:Test_Data2.txt
argv[3] = -o:Test_Data_Diff.txt
argv[4] = -c:TOW:Udop:dN,0.2:vU,0.0005:L1P Sats:Slow nSat
argv[5] = -r:TOW
argv[6] = -a:alertfile.txt
cuteee wrote: I want to take out 0.2 or 25 from this argument and store it in another varable.
In your example, you'll need to parse argv[4] . Take everything between the first comma and the subsequent colon.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
I'm working on an application that can get to a serial/Usb port to communicate
with exturnal devices over a serial or Usb connection/session.
Could someone direct me, point me at the form and function.
I'm NOT looking to create a modem prorgam, but a function to
pass the required parameters from the main prog to an extrunal device
that recieves command string.
Thanks
Regards
Marc
Marc Andrews
mandrews@andrewsapplications.com
|
|
|
|
|
Use CreateFile("\\\\.\\COM1", ...) to open the port, and the send() /recv() pair to send and receive data.
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"There is no death, only a change of worlds." - Native American Proverb
|
|
|
|
|
DavidCrow wrote: and the send()/recv() pair to send and receive data.
WriteFile() /ReadFile() ?
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|