|
how to write a program in which whatever the user types into program is typed into microsoft word letter by letter....like i paste the essay of 10 pages into the program n the program gives the same in ms word letter by letter......plzz help
i know i can just copy paste it or just type into ms word directly but still i need the program..
|
|
|
|
|
|
|
Extend your legal chess move identification program as follows:
• Allow the user to add an arbitrary number of pieces to the board (either red/black or
white)
• Allow the user to select a given piece and then that piece must work out its set of
valid moves from its current position
• A piece cannot move over a piece which is the same colour as it is
• A piece may move over (and replace) a piece which is of the opposite colour.
• Create a Visualiser Abstract Base class which implements a show() pure virtual
function
• Create a TextVisualizer derived class which overrides show to display
the chess board (with legal moves for the selected piece) to the standard
output stream
• Create a GraphicalVisualizer derived class which overrides show to
display the chess board (with legal moves for the selected piece) as an
image.
|
|
|
|
|
go do your own homework
OR
alternatively ask Christian Grass to help you out. I know him well and he enjoys walking new coders through their homework exercises.
B
MCAD
---
|
|
|
|
|
At least this kid is smart enough to remove school/ college name from the assignment text....
|
|
|
|
|
But that smartness is negated by forgetting to omit "Allow the user."
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
Reading this[^] may help. Be sure to read at least items 2 and 11.
|
|
|
|
|
Raymond5056584 wrote: Extend your legal chess move identification program as follows:
This made you think it was the right time to extend also the Lounge the forum tolerance to homework programming requests?
(Lounge? I need more caffeine, this morning...)
Veni, vidi, vici.
|
|
|
|
|
I have a CListCtrl control with single column (item only , no subitems yet) containing text “COMX” - list of all COM ports in the system.
I can select the first and last COM port with mouse pointing to letter "C" only.
The mouse cursor changes when the mouse is over “OMX” part of the entry.
All of the other ports can be selected with mouse anywhere over the “COMX” text.
Is this normal or user error?
Cheers
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: The mouse cursor changes when the mouse is over “OMX” part of the entry. Is the item just a simple text string or is there something special about it?
Use the best guess
|
|
|
|
|
Just plain text , the first one is " COM1:" , and here is the code processing the click. But that is after the selection so it should not matter.
<pre lang=" LPNMITEMACTIVATE pia = (LPNMITEMACTIVATE)pNMHDR;
CPoint point(pia->ptAction);
// Select the item the user clicked on.
UINT uFlags;
int nItem = m_list.HitTest(point, &uFlags);
CString strText = m_list.GetItemText( nItem, 0);
SetDlgItemText(IDC_EDIT3, strText);
*pResult = 0;"></pre>
|
|
|
|
|
|
Nice, but...a little issue with MS terminology, as always.
The item is not really "selected", that to me implies some outside act.
I have been using POSITION iterating thru document / view the term used there is "get".
But I am just too picky.
I have a feeling the problem is related to PropertyPage "dialog".
Been having problem selecting CEdit control using mouse ( it works fine using tab) and just "discovered " when I run the dialog test by itself it works just peachy , but won't work in ProperyPage.
Maybe this selection issue is related. I'll try to run the dialog outside PropertySheets to see if it works differently.
Don't spent too much time on it, it is just annoying , but I can live with it.
Vaclav
|
|
|
|
|
In your message handler, you could try:
int nItem = m_list.GetNextItem(-1, LVNI_SELECTED);
CString strText = m_list.GetItemText(nItem, 0);
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
David,
the "problem" is indicated by mouse pointer changes from howering over "C" to "OM1:" and than there is no event. The actual processing is fine.
And it does it only on first "COM1:" and last "COM5:" lines.
The "COM2:" thru "COM4:" it works on the entire text.
Richard,
just confirmed that in plain dialog app I can select the CEdit box using mouse.
I guess in my spare time I'll kluge some workaround. Perhaps real subclassing will work.
Vaclav
|
|
|
|
|
Sorry. I misinterpreted this:
I can select the first and last COM port with mouse pointing to letter "C" only.
What styles does your list control have?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
modified 22-Aug-13 11:28am.
|
|
|
|
|
David, it's the little details which will get you each and every time. Ha ha.
Have a great day.
Vaclav
|
|
|
|
|
I just added a list control to a dialog, changed its style to report, and added the following code:
m_list.SetExtendedStyle(LVS_EX_TRACKSELECT);
m_list.InsertColumn(0, _T("COM port"), LVCFMT_LEFT, 100);
m_list.InsertItem(0, _T("COM1:"));
m_list.InsertItem(1, _T("COM2:"));
m_list.InsertItem(2, _T("COM3:"));
m_list.InsertItem(3, _T("COM4:"));
m_list.InsertItem(4, _T("COM5:")); Now, no matter where the mouse hovers over any of the five items, that item will be selected after about 0.5 seconds.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
David,
same problem. Only works when then mouse is over "C" in first line.
I really believe it has something to do with CPropertPage.
But I like the tracking better than clicking.
Now if I could apply that to CEdit I'll be a happy camper.
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: same problem. Even on a dialog box?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Show me a community that obeys the Ten Commandments and I'll show you a less crowded prison system." - Anonymous
|
|
|
|
|
David,
I am bad in multitasking, so I am trying to keep the CEdit problem separate.
I have not tried to implement your tracking method on the CEdit.
I got too many fires going same time. I'll keep you posted on this one.
Vaclav
|
|
|
|
|
Vaclav_Sal wrote: And it does it only on first "COM1:" and last "COM5:" lines. The "COM2:" thru "COM4:" it works on the entire text. That is just bizarre!
If it was not for that piece of information, I was going to suggest it might have something to do with the width of the column set really narrow and the rest of the text for some reason being written outside of the column - I believe I have seen something like that before, but what you describe here is just weird.
Sorten Madsen
"When you don't know what you're doing it's best to do it quickly" - Jase #DuckDynasty
|
|
|
|
|
I just put over 30 random characters in the item column and the problem is really on the first and last line. ONLY when the mouse is over the first character in the field it will get selected.
I give up.
Cheers
Vaclav
|
|
|
|
|
Here is a crazy update.
Now I cannot even select by "howering " over the first letter! But I can change / edit the item by moving the mouse to the left until I get "regular" focus. I deffinetly have an issue with my VC 6.0.
Case closed.
|
|
|
|