|
actually it seems to work just fine the way i was doing it, and no offense, but i would like a second opinion, before doing this the way you have suggested
|
|
|
|
|
Archer282 wrote:
but i would like a second opinion, before doing this the way you have suggested
Archer, I had this very same question. With the help of a couple of others I started using std::vector. It works very well.
Here is the thread I started Data Storage[^]
Here is an article explaining Vectors[^]
Hope this helps, Good Luck...
-------------------------------
DEBUGGING : Removing the needles from the haystack.
|
|
|
|
|
Now I must call IDL's routine using VC. Those routines are in sav file, and I don't have source codes of sav file. How can I do this? Thanks.
|
|
|
|
|
I have simple class
template< class TProblemType >
class CFemInput
{
public:
CFemInput(CFemInputAdapter::eAdapterType eType, const TCHAR* szFileName);
virtual ~CFemInput(void);
private:
// proxy class
CFemInputAdapter* m_pAdapter;
};
template< class TProblemType >
CFemInput< TProblemType >::CFemInput(CFemInputAdapter::eAdapterType eType,
const TCHAR* szFileName)
: m_pAdapter(NULL)
{
switch(eType)
{
default:
case eFile:
m_pAdapter = new TProblemType(szFileName);
break;
}
}
template< class TProblemType >
CFemInput< TProblemType >::~CFemInput(void)
{
}
For some unknown reasons I getting link error if I split this code in h and cpp file. If everything in one h file everything is fine. Why linker can't find constructor or destructor if they in sepparate files. First time have such problem. I have VS2003 under debug (no optimisations)
Thanks.
|
|
|
|
|
|
Thanks man. I aways thought that in VS6 I was able to sepparate it.
My bad.
|
|
|
|
|
I have sometimes separated them using an .inl file.
Pssst. You see that little light on your monitor? That's actually a government installed spy camera. Smile and wave to big brother!
Painted on the side of a dog trainer's van: SIT HAPPENS
|
|
|
|
|
But the INL file still is compiled into each of the CPP files needing the template function definitions.
Saying that the functions must be implemented in the H file is just the easy and quick answer to a more complicated issue. To be more correct, a template function/method implementation must be in the same compliation module as where it is referenced. (I don't know exactly what the standard says.)
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Dear Friends,
Trying to make a dialog based application. I am trying to use CDialog::OnTimer() and set the timer before this. But function having CDialog::OnTimer() is never called by the application .....
Can anyone help me wat cud be the possible reason.....
Thanking u in anticipation.....
mukhan
NOte:- MSVC++ 6.0
OS: WinXP
|
|
|
|
|
I assume you've called SetTimer() , presumably in OnInitDialog() . You also need to add a ON_WM_TIMER() entry in your dialog's message map, eg:
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
ON_WM_TIMER()
...
END_MESSAGE_MAP() My new year's resolution: 2048 x 1536
Home | Music | Articles | Freeware | Trips
ravib@ravib.com
|
|
|
|
|
Thx Ravi Bhavnani,
its working now
mukhan
|
|
|
|
|
Result of SetTimer(...) was equal to what? Do you check result? Message map is OK
has entry for timer?
|
|
|
|
|
|
I'm writing a VC++ .NET application in which I need to present the user with data on an on going basis. The user always needs to see the most most recent data.
I'm dumping the data to a RichTextBox. The only problem is that the richtext box keeps scrolling up to the top of the box, showing the use the first data entered.
Is there a property of the richtextbox that can be changed to show the last data entered? Or is there a custom control that could do this?
Thanks.
|
|
|
|
|
If you are dumping the data one line at a time, one option might be to insert the newer info at the top instead of at the bottom. For example:
5
4
3
2
1
instead of
1
2
3
4
5
However, take a look at this article (http://www.codeproject.com/editctrl/history_edit.asp[^]) and see if this will help you out. The article uses a CEdit control instead of a rich text box but it might get you pointed in the right direction. I hope this helps. Good luck with your project.
John 3:16: "For God so loved the world, that he gave his only begotten Son, that whosoever believeth in him should not perish, but have everlasting life."
|
|
|
|
|
This looks like exactly what I need. Thanks bneacetp!
|
|
|
|
|
OK,
I'm having some trouble with Step #2 using this control in another VC 6.0 MFC project. I think it is just a MFC Wizard thing. I'm following the instructions in the Guide:
1. Include CHistoryEdit.h in your dialog class' header file.
-Done, no issues .
2. Add member variables of type CHistoryEdit for every edit control you want to subclass.
-Here is where I have issues. When I use the MFC Wizard to add a memeber variable to my Edit Box, the drop-down variable Type selection dones not show a pick for the new custom class HistoryEdit. It's like the new class is not registered with MFC or something. What am I doing wrong?
3. Subclass the edit controls in your dialog's OnInitDialog() method.
- Not there yet!
Thanks.
|
|
|
|
|
Have you added the HistoryEdit source files to the project ? The class wizard looks there.
Elaine
The tigress is here
|
|
|
|
|
I did have the HistoryEdit.cpp source file as one of the source files and that still did not let the Wizard find the class.
I did discover a work-a-round. I added a member variable of one of the default MFC types "Control" and "CEdit". I then searched the code for the declaration of the variable and changed it to "HistoryEdit" type. This works and I can now use added custom control functions.
However, it still would be nice to know the "right" way to do this. ie, how to make the Wizard recognize custom class types without using the back-door approach.
|
|
|
|
|
It's the header file the class wizard looks in for the declarations and the CPP file for the references.
Always add both to the project source files.
Elaine
The tigress is here
|
|
|
|
|
Freddie Code wrote:
However, it still would be nice to know the "right" way to do this. ie, how to make the Wizard recognize custom class types without using the back-door approach.
I'm not sure if it's possible to make the Wizard recognize those classes, but what you did is right anyway. Just to clarify, both of the following options will work:
1 - You manually declare new variable members in your dialog class and then manually subclass the windows in OnInitDialog() .
2 - You add a variable member through the wizard, which also adds the subclassing in DoDataExchange() , which is called through CDialog::OnInitDialog() , and then manually change the class of the control in your dialog class declaration.
The latter is easier, of course
--
jlr
http://jlamas.blogspot.com/[^]
|
|
|
|
|
I am trying to find a video capture board for my PC that:
1) captures video from either a standard TV cable or line in cables
2) is able to output to a VCR or TV
3) I can use to turn a TV into a computer monitor
Is there anything that does all this with decent quality? Are there any other forums I should post at instead? My email is f-m-n@ig.com.br. Thanks,
fmn
|
|
|
|
|
|
My have writen an application which uses ODBC and Ms Access database, using visual c++ .net.
I need to know how setup the data source programmatically, when the application is been installed. I need to do programmatically the stuff you do with odbc addministrator tool. thaxx
hussein
|
|
|
|
|
What is with the H2 stuff? Trying to make your question stand out from the rest?
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|