|
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.
|
|
|
|
|
h2 is a html tag. Yes to make the question stand out. But it does't seem to be working.
hussein
|
|
|
|
|
The function you are looking for is SQLConfigDataSource() .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Next question is how i call this function from the setup program?
hussein
|
|
|
|
|
You call it just like you would any other function. Check the documentation for the parameter list.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi guys,
I have to make a dialog based application in VC++,in which I need to output some audio frequencies through the speaker system as I did in C by simply calling "sound(frequency)" from dos.h.
Here also I need the same thing in the environment of VC++,i.e., the audio frequency may be supplied at runtime or statically given at compile time.
I need the analogous of the following in VC++, which I found in C within dos.h.
C------------------------------ VC++
sound(unsigned)--------- ?
delay(unsigned)--------- ?
nosound()--------------- ?
Can any one of you help me?
|
|
|
|
|
What about
BOOL Beep(
DWORD dwFreq,
DWORD dwDuration
);
|
|
|
|