|
|
Thankyou very much Whitesky
Thanks 4 ur help
|
|
|
|
|
Jawad Yasin wrote: Please i want to have a full source code
If you want some help, you have to ask precise questions. Where are you stuck exactly ? What have you already done ? What is the problem with what you already did (errors + details, crash, ...) ?
To start, you can look at the MSDN for CreateFile (opening the port), ReadFile (for reading the port) and ofstream (to save your data to a file).
|
|
|
|
|
yeah i've checked MSDN & read CreateFile, ReadFile... but the problem is there's no onearound me who can tell me how to use them in a program. Basically I'm trying to read data from the serial port of my PC. and wanted to make its program. I've searched through Webcrawler.com & checked many links but didn't found how can i use them in the form of a program. so can u please help me with this as i don't have any one who can teach me.
Thanks for helping
Jawad
|
|
|
|
|
Come on Cedric, on CodeProject it should be a perfectly valid request to ask for the source code for a module or class that can do serial communication. In my mind, he doesn't have to try to make it himself before he asks for an "off-the-shelf" class. His question may not be the best worded one, but this goes for many of us non-native-english speakers.
I know, and I fully agree, that we see some rather stupid requests here at CP from time to time (the guy with about 60 minutes patience comes to mind). I just don't think this is one of them.
Cheers
Steen.
"Are you gonna check your makeup when you're done whining?" John Simmons, 05/31/2006
|
|
|
|
|
Yes I agree with the part that there are some classes ready on the website.
But he asked also how to save the data, which is generaly not included within these kind of classes.
So, basically he didn't explain where was the problem.
That's way I was asking for more precisions (ok, maybe this sounded a little bit too agressive but it wasn't ).
Steen Krogsgaard wrote: the guy with about 60 minutes patience comes to mind
|
|
|
|
|
You have to improve your search skill.
While searching for "serial port" (keyword) related articles in CodeProject "MFC/C++" category, I got 49 articles.
Maxwell Chen
|
|
|
|
|
He said me that he dosent find any good articles in codeproject about serial port?
|
|
|
|
|
See here.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
in a Dialog OnPaint() message:
//-------------------------------
void TheDlg::OnPaint()
{
CPaintDC dc(this);
//============================
dc.SetPolyFillMode(WINDING);
CPen penRed(PS_SOLID,1,RGB(255,0,0));
CBrush brhRed(RGB(255,0,0));
CPen*pPenOld=dc.SelectObject(&penRed);
dc.BeginPath();
dc.Rectangle(10,10,100,100);
dc.EndPath();
CRgn rgn;
rgn.CreateFromPath(&dc);
dc.FillRgn(&rgn,&brhRed);
dc.SelectObject(pPenOld);
//================================
but I can see Nothing be drawn, what is wrong? how to correct code above to see the Rectangle?
|
|
|
|
|
When you run these code you see a red rectangle,right? now whats problem?
|
|
|
|
|
It works in our tests. Are you sure your dialog client area is not covered by a child window?
|
|
|
|
|
I am using Win98 for developing, may it not wor on the OS?
|
|
|
|
|
Hi All,
I need to know how to use XmlTextWriter and XmlTextReader classes in VC++. I just gone thru an article in CodeGuru (It's here[^]).
I want to know how to use that program snippets in my VC++.net 2005.
How to include the required header files and dlls?
Kindly suggest me to achieve this.
Thanks in advance,
Sarvan AL
|
|
|
|
|
|
|
Hai,
pls help me to find a solution.
Display the dialog Not in a Moving state.it should be fixed.
|
|
|
|
|
Uh ?
What is a Moving state ?
|
|
|
|
|
Wild stab in the dark; the OP wants to prevent the dialog from being moved on screen.
(Why would you want to do this? it's inconsistent with other apps and will irritate users; maybe that's why )
If this is the case, handle WM_NCHITTEST, and return HTBORDER instead of HTCAPTION. In addition, you will want to handle WM_SYSCOMMAND, and ignore SC_MOVE requests.
Ithangyew.
Steve S
Developer for hire
|
|
|
|
|
Steve S wrote: the OP wants to prevent the dialog from being moved on screen
Wow, I didn't understand that at all (I was thinking of something much more complicated ).
|
|
|
|
|
Occam's razor. The best a man can get
Steve S
Developer for hire
|
|
|
|
|
Steve S wrote: Occam's razor.
Err, what's that ?? Never heard about that before
|
|
|
|
|
I think my answer got lost.
It's usually simplified to mean "The simplest explanation is usually the correct one."
see http://en.wikipedia.org/wiki/Occam's_Razor[^] for more. Last modified: Wednesday, August 09, 2006 10:42:58 AM --
|
|
|
|
|
Hai
How to Display the Dialog not in a Moving state? it should be fixed.
Dont Move here and there? how it is possible? pls help me.
|
|
|
|
|
How can I remove spaces from my string ? i don t now how ? how ?The spaces become from the database and when i loaded ... in list ctrl ....?
How can i : FindItem in the second column and the 3- column ...etc.?
Because my string searches only in the first column and GetItemText from second column , 3 column etc . this is my code the code from yesterday is not good for me :
void CMyList::OnOK()
{
UpdateData();
m_list2.RedrawItems(0,m_list2.GetItemCount());
CString sName = _T("Name");
m_name.GetWindowText(sName);
LVFINDINFO stInfo = {0};
stInfo.flags = LVFI_PARTIAL;
stInfo.psz = sName;
int nItem = m_list2.FindItem( &stInfo );
if( nItem != -1 )
{
// the item is in the list control
CString sSecondColumnText = m_list2.GetItemText( nItem, 1 );
// set the text to the second edit box
m_rezult.SetWindowText( sSecondColumnText );
}
}
Only this code works !
I remind you :
0 1 2
----------------------------------
| Name | City | Country |
-----------------------------------
-----------------------------------
| George | London | England |
-----------------------------------
|George | NewYork | USA |
-----------------------------------
|George | Madrid | Spain |
-----------------------------------
all i want is to find in my list the country from example from my both edit boxes : m_name (sName) , m_city (sCity) , m_rezult(sRezult)
Please help me with my code ....!!!!(The data are from a database fox pro and have spaces when i loaded )is works only with (LVFI_PARTIAL) and is not so good!
I promise you when i finish my program i will loaded on codeproject !
and will be very usefull for many things !
Thanks for your help ! And i will wait your answer because i dont now how to continue i will try something but ...
Bravoone
|
|
|
|