|
hi
thank u 4 ur reply
yes, it is.
ur right. i may set a breakpoint anywhere in the mfc sources. but what if i have to change some parts of them?
unfortunately i couldn't imply what i meant, sorry
|
|
|
|
|
ilostmyid2 wrote:
but what if i have to change some parts of them?
While it is possible (I've never known anyone to do it), it's certainly not advisable.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi all;
I am currently buidling an SDI application. This application has a CDialogBar (well, some sort of. The actual class used is derived from CDialogBar). The problem is that i have some list_controls which need to be updated and i need the dialog handle. Since the CDialogBar is modeless, the handle is lost and i get an "enormous" assertion error each time i try to add or remove items to the list_control. Can somebody please help me on this.
I badly need it.
Thank you
Krugger
|
|
|
|
|
We have derived our own class from the MFC CRichEditCtrl, in order to implement various streaming functions as well as providing a context menu for cut,copy and paste. This derived class simply inherits from CRichEditCtrl. This all worked fine under NT however we are now porting to XP and have found that cut and copy no longer work, paste is fine. This is the case if you use ctrl+c or the context menu. The code we implemented behind the context menu simply called the rich edits own functions copy() and cut(). I can get the context menu copy to work if I use :
HANDLE hMemory;\\Contains our text string
OpenClipboard();
EmptyClipboard();
HANDLE hData = SetClipboardData(CF_TEXT,hMemory);
However ctrl+c still doesn't work. Cut (ctrl+x) appears to remove the selcted text but it is not put on the clipboard. If I change my control to be simply a CRichEditCtrl, ctrl+c and ctrl+x both work. Why was this ok for NT but not XP? Any help would be appreciated.
Thanks.
Dave.
|
|
|
|
|
Hi all;
Is there in Visual Studio .Net visual form designer for c++, and how to use one?
Thanks
|
|
|
|
|
In VS .NET 2003 there is a form designer for the Windows Forms widgets. But there's not a RAD environment for unmanaged (i.e., non-.NET widgets).
Kevin
|
|
|
|
|
Hi friends,
I want to open/use a file. But I dont know wheather that ffile is accessed bu somebody else also.So I have to wait until that IO finishes.How do I achieve that? I am on W2K.
VikramS
|
|
|
|
|
Create a worker thread, and give it access to a file handle. In that thread, create a loop that tries to open the file, and sleeps for a few seconds with each pass. When the file is successfully opened, end the thread. Now the primary thread has an open file handle to operate on.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Is tat is only way. I meant is there any API exists which will notify me for File IO?
|
|
|
|
|
vikrams wrote:
...is there any API exists which will notify me for File IO?
None that I know of. There are ways of being notified that a file/folder is being changed, but you'd still have to periodically poll to check when those operations are actually finished.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Okey. Thanx a lot for help.
|
|
|
|
|
Hi all;
I am developing an SDI application which consists of a CDialogBar. On the bar, i have a tree control displaying some data. I also have a webbrowser control in the View. I need to display an HTML page in the webbrowser control according to the selected tree child clicked by the user. Can somebody, please help me, to access the webbrowser control from my TreeControl.
Thank you
Krugge
|
|
|
|
|
Hi all;
I have downloaded Skin Magic in order to build custom skins for my application. Everything works fine and i have exported the .h file associated with my skin. The problem is now, "how will i include the skin in my application?".
Can somebody please help, i'm pretty at lost with this issue.
Thanks
Krugger
|
|
|
|
|
Hello,
This arrives at my serial port:
924.09,-4.06,676.26,0.156488,-0.653856,-0.714853,-0.192273
<br />
CString nx;<br />
<br />
while(port.Read(cReceivedChar, 1 , overlapped, &dwBytesRead)) <br />
{<br />
<br />
nx += cReceivedChar[0];<br />
SetDlgItemText(IDC_SHIFT_X,("%c", nx));<br />
}<br />
but my dialog only shows 06,676 ?? Why?
Thanks, Mark
|
|
|
|
|
What is in nx?
Try a MessageBox call
and why not a SetDlgItemText(IDC_SHIFT_X,(LPCSTR)nx);
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hello,
nx contains nothing when i trace it.
cReceivedChar[0] contains confused values from the string..
I think the whole procedure must be rewied
Thanks, Mark
|
|
|
|
|
CString nx;
char cReceivedChar;
while(port.Read(&cReceivedChar, 1, overlapped, &dwBytesRead))
nx += cReceivedChar;
SetDlgItemText(IDC_SHIFT_X, nx);
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
char cReceivedChar; is not working (other type expected)
<br />
BOOL CSerialPort::Read(void* lpBuf, DWORD dwCount, OVERLAPPED& overlapped, DWORD* pBytesRead)<br />
Thanks, Mark
|
|
|
|
|
How are you calling the Read() method?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
while(port.Read(cReceivedChar, 1 , overlapped, &dwBytesRead))
Thanks, Mark
|
|
|
|
|
The first parameter is supposed to be a pointer.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
<br />
<br />
char *cReceivedChar;<br />
<br />
while(port.Read(cReceivedChar, 1, overlapped, &dwBytesRead))
Thanks, Mark
|
|
|
|
|
But then you'd have to allocate one byte of memory from the heap (i.e., cReceivedChar = new char ). Why not just use this instead:
char cReceivedChar;
while(port.Read(&cReceivedChar, 1, overlapped, &dwBytesRead))
...
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
yep, it seems to be better to use a reference.
with this procedure my string output is only "0.1922"
remember incoming:
924.09,-4.06,676.26,0.156488,-0.653856,-0.714853,-0.192273
It looks like that the first values running through the digits in the dialog..mmh?? Is this so complicate to give out the full string?
Thanks, Mark
|
|
|
|
|
macmac38 wrote:
yep, it seems to be better to use a reference.
My example was not a reference. It was a pointer, exactly what the Read() method is expecting. Had it wanted a reference, the signature would look like:
BOOL Read(void& lpBuf, ...); You mentioned that 924.09,-4.06,676.26,0.156488,-0.653856,-0.714853,-0.192273 is arriving at the serial port. How are you verifying this?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|