|
I am new to Visual C++, and I added a class to a project, and now would like to remove it. I managed to delete the files from the file view of the project, but when I build, I still get "No Such File Error". Can some one tell me how to remove files from a project?
Thanks
Kevin Shaffer
Student of Computer Science
University of Kansas
kshaff03@msn.com
|
|
|
|
|
Check to see if any files in your project are doing a #include on your deleted files.
Phil Boyd
MCP
CPT, AR
You may be gone, but we will never forget your sacrifice.
"Proud to be an American..." Lee Greenwood
|
|
|
|
|
That was it! Thanks
Kevin Shaffer
Student of Computer Science
University of Kansas
kshaff03@msn.com
|
|
|
|
|
I assume you mean you deleted it from the work space and assuming you also remove any reference, if any, in the rest of your code. Then just press 'Rebuild All' because you need to rebuild the precomiled header(s). You will find that there may be many occasions when a minor change in code will generate unexpected errors that will disapear by simply pressing 'Rebuild All'.
Trust in the code Luke. Yea right!
|
|
|
|
|
Hi All !
Does anyone know the way to share one COM-port for a few applications ?
I know that OS gives only one handle for COM-port for all applications, but may be exist some sharing method ?
|
|
|
|
|
I do not know what you are trying to do?
Are you writing all the applications that needed to share the COM-port?
If so, then only open the port when you needed to use it and close it when done. This should allow any other application on your system to use it when you are not.
If you want to share it with other application out side of your control. Sorry, if they keep it open continuiously
then there is nothing you can do but close that application.
Trust in the code Luke. Yea right!
|
|
|
|
|
You make no sense.
Which of the XX ports sharing the port should control the hardware lines? Any? All?
What you might want is a proxy, one app to take commands from mulitple sources, queue them, and spit them out. When stuff comes in, who then gets it? the next person to call read, or all of them?
|
|
|
|
|
By nature the comm ports are asyncronous. "sharing" them is not feasible as it makes logical sence that only one program at a time would be reading / writing data via a comm port.
Simply open them when you have data you wish to read from or write to the port and close it as soon as you are done.
Some applications are arrogant enough to think that they have permenant control of hardware resources such as the comm ports. Palm "Hotsync" is one that comes to mind, opening the comm port and holding it open the entire time it runs. The solution to someone needing to share the comm port is to close these errant apps and only allow them control of the port when their device is read to communicate via the comm port.
I guess that last sentence really says it all. By nature you need to know when "your data" is coming down the async stream and read it. The rest of the time you care less what data is coming in. The same goes for outbound data.
On the other hand if you truly wish to "share" the data coming in via the comm port then write a single program that reads and records the data to a fifo file and use that file as input to the various applications that are all wanting to read the same data. You cannot share the port for output since that would mean a garbled data stream going out.
|
|
|
|
|
Hi!
I have a database project using MFC and ODBC. When we create a ODBC project, we obtain a CMyRecordView class derived from CRecordView. This class use a dialog template to represent data.
I want to use a CListCtrl to represent my data.
So in my class CMyRecordView.h I have declared
CListCtrl m_wndListCtrl;
In my CMyRecordView.cpp :
DDX_Control(pDX, IDC_LISTCTRL_VIEWDATA, m_wndListCtrl);
and :
void CDataBaseManagerView::OnInitialUpdate()
{
m_wndListCtrl.InsertColumn(0,_T("Item"),LVCFMT_LEFT,100);
m_wndListCtrl.InsertColumn(1, _T("Value"),LVCFMT_LEFT, 100);
m_wndListCtrl.InsertColumn(2, _T("Time"), LVCFMT_LEFT, 100);
m_pSet = &GetDocument()->m_DataBaseManagerSet;
CRecordView::OnInitialUpdate();
}
In my dialog, my control style is set to VS_REPORT
The problem is that I dont see my columns.
I see a grey bar, but I dont see any text and I dont see any line break.
thanks for helping...
Everything's beautiful if you look at it long enough...
|
|
|
|
|
something similar happened to me. Try putting your code OnInitialUpdate() code in OnCreate().ie. add a WM_CREATE handler thru classwiz and add code there.
Hush,hush...
thought I heard you call my name now.
Kula Shaker.
Amit Dey
Latest articles at CP - PocketPC New menu
Office addin
|
|
|
|
|
|
Nop, I didn't work,
I think that the problem is caused by the fact that it's a CRecordView derived class. I will try to used a CPropertySheet and CPropertyPage
Everything's beautiful if you look at it long enough...
|
|
|
|
|
I using CWebControl2 to show a web page in one of my UI.
It's working nicelly, but there are no controls, I wasn't sure to expect them or not.
Is there some default "explorer band" that I can use ?
Thanks.
Maximilien Lincourt
For success one must aquire one's self
|
|
|
|
|
If you can get the IHtmlWindow2 interface, then call ShowBrowserBand().
|
|
|
|
|
Hi,
This is not a programming question but I did not want to post it in the lounge.
I would like to know how to map data values to a logarithmic scale. Fr example, say I have numbers in the range of 0-50,000 and I want to map them between 0 to 1. I once read that I can use a logarithmic scale for such scaling purposes. How can I do this?
Thanks for any help.
Pankaj
Without struggle, there is no progress
|
|
|
|
|
logarithmic scale is usefull to reveal percentage changes.
"A change from 100 to 200, for example, is presented in the same way as a change from 1,000 to 2,000."
or to represent really "big" numbers or small ones all together
lets say u have 10 exp(500) and 10 exp (-500) and values between u can represent it much better if u use log of the values
If u want to represent between 0 and 1 u can divide by the maximum of ur segment
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Just plot the values of log(n)50 i.e. log of n (the data value) to the base 50. They will range from 0 to 1.
<edit>
Ooops - I meant to the base 50000. Thanks JB!
</edit>
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi, i have two questions.
1) I have been studying the CArchive a bit but what i don't understand is when for example when you save two CStrings, the Archive somehow "Archives" it putting some Byte data in between the string values when u look at the file. I would like to know WHY and how does this system work? why does it do that (well obviously my guess would be to determine where a variable begins and ends, but how? what the system behind it?).
2) How does the < > operator work? For example:
CList <CString, CString> *mylist;
what does that do??
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
1. Right, what do u mean by "what the system behind it?"
2. Check templates in any C++ book or tutorial or here at CP
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
1) i mean, how does it work... why does it insert a byte 06(in hex) and one 05 etc at certain places, or how does it determine what value goes where, it puts some bytes of data between the variables to recognise them (i think) but what data? i mean.. god, it must have a meaning!! lol
2) ok
Kuniva
--------------------------------------------
|
|
|
|
|
1. These are "special signature to recognize unicode strings"
For more info search for the file ARCCORE.CPP in VC++ folder
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Serialization usually causes a signature, an optional version/schema id, and binary data to be written to physical storage. See this[^] article.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
yes, but i read that article 10 times already, it doesnt say what kinda of data the CArchive delivers and how it works internally. The reason i want to know this is because, before there even was MFC or a CArchive, programmers must made some kind of function of their own to act like a CArchive and sort the data, and maybe they worked differently from the CArchive, thats why i want to know how it works, and maybe how to do the same thing, but without MFC...
Kuniva
--------------------------------------------
|
|
|
|
|
CArchive is just a convenient conduit class that provides a streaming operator for a variety of standard objects. You could write your own low level serialization code by providing your object with a serialize() method that takes a FILE* (instead of a CArchive* ) and a flag that indicates whether the object is being read or written.
As I mentioned, the actual process of serialization usually causes a signature, an optional version/schema id, and binary data to be written to physical storage (i.e. the file).
Hope this helps!
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
1) CString stores the length of the string before the string, so for the string "Hello", it would store a byte with the value 5, and then the actual string data. This is documented in the CString/CArchive documentation (sorry, I can't remember which one).
2) They're called templates. There is plenty of information about templates on CP. Have a look at some of the articles. Basically, they let you customize a class without having to rewrite it, eg. You could have a CList<cstring,cstring> or CList<int,int> without having to write two different classes. Again, have a look at the articles for a more in-depth discussion of templates.
Hope this helps
Ryan
He who laughs last thinks too slowly.
|
|
|
|