|
i want to add to CDocument not the derived class!
I WANT DO THIS !THANK YOU!
ZHANGYIFEI
|
|
|
|
|
Sorry, you can't. MFC is in a dll and is used by all sorts of other programs. You can't change the implimentation to suit you, you'll need to derive from it.
Maybe if you said what you're trying to do, I could offer more of a suggestion.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
Hi,
In my project,I have to make a custom software that should be able to interface with other standard s/w in the market for some calculations.How can I do this because I donot know the functions used in that s/w?
I may have to interface with Mathlab.
Please help me.If the solution is lengthy ,would you mind mailing to jumvmk@yahoo.com.
Thanx.
|
|
|
|
|
How/why do you want to interface with other software ? What software ? Some software, like Office, exposes interfaces through COM, others may not be written to allow your participation and will therefore only be possibly on a limited basis, and based on your code invading the progam involved.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
The solution depends on the software you need to use. In case of Matlab, see the Matlab external interface documentation, under the headings "Calling Matlab from C and Fortran programs" and "ActiveX and DDE support".
|
|
|
|
|
I have a class which handles serial port communication.
It works fine on windows 95 and windows 98 but it fails on
Windows 2000.
Actually there is a worker thread which reads data from serial port and sends the message to the main thread when
data is available.
Under windows 2000 ReadFile and WriteFile
functions does not return and program stucks up there.
|
|
|
|
|
Well, without more information I can't tell you what is wrong, but I do know ReadFile and WriteFile work just fine on W2k without hanging the program.
Are you using SetCommTimeouts?
Are you using Overlapped reads and writes?
Tim Smith
Descartes Systems Sciences, Inc.
|
|
|
|
|
Yes, I am using SetCommTimeouts, but overlapped I/O is not used.
Program is vary simple. Port is opened using CreateFile as follows
m_hComm = CreateFile(sPort, GENERIC_READ |GENERIC_WRITE, 0, NULL, OPEN_EXISTING, bOverlapped ? FILE_FLAG_OVERLAPPED: 0, NULL);
then comm timeouts are set as follows
memset(&m_commtimeouts, 0, sizeof(COMMTIMEOUTS));
m_commtimeouts.ReadIntervalTimeout += 2;
if(parity != NoParity)
m_commtimeouts.ReadIntervalTimeout++;
if(stopbits != OneStopBit)
m_commtimeouts.ReadIntervalTimeout++;
m_commtimeouts.ReadIntervalTimeout++;
m_commtimeouts.ReadIntervalTimeout += byDataBits;
m_commtimeouts.ReadIntervalTimeout *=
(int)ceil(1.0 / (double)dwBaud);
SetCommTimeout(m_hComm, &m_commtimeouts);
|
|
|
|
|
hey
anybody got any ideas as to why the following should be the case:
on a windows nt ws machine with a windows nt svr we use a simple server side file lock to prevent multiple accesses to the same data on the server (ie, the ws checks for a locked file before accessing data on the server) ... this works fine
same scenario but with a win2k client the file lock doesn't seem to show up
puzzled me and i wondered if anyone a) knows what i'm on about and b) has a clue as to why it should be so
---
"every year we invent better idiot proof systems and every year they invent better idiots ... and the linux zealots still aren't being sterilized"
|
|
|
|
|
Anyone got any ideas on how else to boost by internet speed (DL and UL)
Currently I'm altering IPMTU and MSS
FIFO Modem buffer
TCP Recieve Window Size,
And NDICache (although I don't even know what it does)
Anything else I should be trying,
I welcome any ideas
Regardz
Colin J Davies
|
|
|
|
|
hi all,
in my project, i have a long procedure to run (around 1sec). i want to display a kind of status on screen when this procedure running. i found some problem.
in my code,
CABC::OnButton1
{
this->SetWindowText("start"); // display in window caption
m_edit->SetWindowText("start"); // display in a editbox
LongProcedure();
this->SetWindowText("finish"); // display in window caption
m_edit->SetWindowText("finish"); // display in a editbox
}
the result is that, only window caption display "start" and "finish" accordingly. the editbox can only able to display "finish" after the longprocedure(). seems to me that, the editbox only update after the finished the OnButton1 procedure...
does anyone know how to display "start" in editbox, start the longprocedure(), and display "finish" in editbox after long procedure() accordingly?
regards,
Jim
|
|
|
|
|
Try calling m_edit->UpdateWindow () immediately after the call to m_edit->SetWindowText ("Start");
|
|
|
|
|
+----------+ +----------+
| Process1 | | Process2 |
+----------+ +----------+
| |
| |
+----|----------------|-----+
| | (Shared) DLL | |
| V V |
| Func1 Func2 |
| | | |
| +-V-----------+ | |
| | HANDLE hVxD |<---+ |
| +-------------+ |
+-------|-------------------+
|
V <----- hVxd = CreateFile(...)
+-------+
| VXD |
+-------+
Question> How to share 'hVxD' between 'Process1' and 'Process2' ?
Process 1 open device(vxd). then process 2 access the device using opened-vxd handle(hVxd).
I think use DuplicateHandle().
please let the show the details how to use it.
Thanks in advance.
|
|
|
|
|
Hello All,
How do I connect to Access database file directly without first registering the files with the ODBC Administrator?
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
For a good general answer to this question, look here:
http://www.able-consulting.com/ADO_Conn.htm#ODBCDriverForAccess
The relevant example to your question is:
For Standard Security:
oConn.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=c:\somepath\mydb.mdb;" & _
"Uid=Admin;" & _
"Pwd=;"
|
|
|
|
|
Thanks so much, the link is great.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Hi,
I was wondering, if any one knows how to add hyperlinks to a dialog, in Visual C++ 6.0 Enterprise. I want to know how, by doing the OnHyperlink method.
Please help,
Casey
|
|
|
|
|
Hello,
Do you mean something like this...
http://www.codeproject.com/miscctrl/hyperlink.asp
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|
|
Hi all!
How do we know what branch of the tree (CTreeCtrl) is clicked on.
Thank You
Vu
vucsuf
|
|
|
|
|
Can this help?
void CMyTreeCtrl::OnRightClick(NMHDR* , LRESULT* pResult)
{
CPoint point(GetMessagePos());
ScreenToClient(&point);
HTREEITEM hItem = HitTest(point, &nFlags);
}
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
|
Not really, I`m looking more for a straight conversion from a CString class to a CPoint class if its possible, by thanks for taking to the time to have a go, I appreciate that Paolo.
Alan.
AEGC
|
|
|
|
|
I'm not sure of what you're trying to do, but if you want to know where an item is, just call GetItemRect().
Paolo
------
"airplane is cool, but space shuttle is even better" (J. Kaczorowski)
|
|
|
|
|
Hello,
I'm searching the last free version of the BCGControlBar.
I think it is the 4.7
Can somebody send it to me ?
thanks,
Stephane
|
|
|
|
|
I think the last free version was 4.75. I should have it somewhere on my disk, but do not know exactly where. However, I could easily fetch 4.73/4.74 for you.
You may however use the 5 series for the cool new features, and be supported too.
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for programming contract anywhere!
|
|
|
|