|
Hi Alok !
I don't think it's been soo long
But anyway, maybe I don't reply much because I have much more things to do (both in and out work).
And what about you ?
|
|
|
|
|
Since you have not described your problem, my gues on seeing your code is that you should have a default constructor in the baby class.
|
|
|
|
|
yes exactly ur guess is absolutely right. the error being issued is ->> cannot find default constructor to initialize base class 'baby' in function mybaby::mybaby(int,int).
as i am new to inheritance technicalities can u plz tell me how to fix this issue and why did it came up ? ? plz !!
Thank you.
|
|
|
|
|
LRESULT CHttp::OnPingLogMessage(WPARAM wparam, LPARAM lparam)
{
CString* pLogMessage = (CString*) wparam;
int u = (int) lparam;
CString result_val = *pLogMessage;
if(result_val.Find("-") <= -1)
m_Main_List.SetItemText(u,7,*pLogMessage);
return UpdateData(FALSE);
}
I have made this function and called it through SendMessage() which is made in class derieved from CWinThread.What I m trying to do with this function is trying to print different values in different rows at same time...
but same value is displayed in all selected rows............
Can anybody help me in this....
Thanks in advance
|
|
|
|
|
use that bloody <pre></pre> tags to post code samples !!!
|
|
|
|
|
Hi:
if I want to use vc to visit a web site which need password and username,if I want to get a certain page after i visit above page,
I don't know how to do it.
deeply expain my above question:
first page ------the page need i type username and password
second page -------the page need i must visit first page .
for example: I want to visit my Email.
please help me ,thanks!
online-waitting!!!!!!
|
|
|
|
|
Hi!
I've created a single dialog based application in which i am using
flexgrid control.I am using textbox in the cell of flexgrid for writing.
the textbox in the cell is the object of class "MyEdit" which extends CEdit.
I've trapped the enter key pressed in the textbox.
Now I want to tell the dialog box class when enter key pressed in textbox which is the
object of class "MyEdit" so that the dialog class moves the textbox in next cell same
thing as we do in excel.
Thanks in Advance!
Viral Joshi
|
|
|
|
|
Hi,
I wrote an SDI application,drew a rectangle in the view.When i click print,a dialog is appeared,in that there is an option print to flile,i have entered sample.pdf ,then clicked apply button,next clicked print button.sample.pdf file is generated.But i want this be done automatically,i mean the dialog should appear.Is there any way to do it..??Please free ask me,if the question is not clear.
Thanks in before
James
|
|
|
|
|
See PD_PRINTTOFILE of PRINTDLG Structure
|
|
|
|
|
What is the use of the function SystemTimeToFileTime?
Why should we convert a SystemTime to Filetime?
What for it is used?
|
|
|
|
|
A FILETIME is easier to serialize than a SYSTEMTIME struct. FILETIME s are a lot easier to compare too.
|
|
|
|
|
First your user name is very sweet.
The basic use of SystemTimeToFileTime function is to just convert the current system time to the file time i.e
File time is the time related to some specific file i.e the creation time, the Last Access time etc..
you can get more help of the file timing in MSDN in follwoing articles:
1. GetFileTime
2. FILETIME
3. SYSTEMTIME
if you still have any doubt about this pls feel free to ask
Pankaj Sachdeva
|
|
|
|
|
In a game i'm making, i have a projectile which moves in a direction for a limited distance. What i want to do is create the projectile dynamicaly, and then have it control itslef, rather than adding in extra code to check if there is a projectile, how many there are, and then move them all.
Now, if this where C#, i'd just create a new thread for the method. But im not sure what to do here.
|
|
|
|
|
You can create threads in C++. Remember that adding a thread won't make your code any faster.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Of course not, its still the same amount of logic. But it is more convenient.
I'll go look up threading in c++ then.
|
|
|
|
|
The Undefeated wrote: . But it is more convenient.
I'll go look up threading in c++ then.
do you need thread help in c++??
|
|
|
|
|
No i found out about it, much easier than i thought actually
But anyway, it didn't go so well, since i realised the only time the thread could draw the objects, was before everything else. Meaning it would be behind everything, and if there was a background, you wouldn't see it at all. In the end i just made a new class with functions to add / remove the objects and control them. So quite a bit more code. Although it only added 3 lines to the main loop. Projectile.Add(), Projectile.Move() and Projectile.Draw()
|
|
|
|
|
Hello Jason Henderson !
I have seen your article :"WallpaperQ :A Wallpaper Management Tool " .I wrote a program by Win32(in VC++6).My simple program include: a button "OK" and a button "Exit"(in dialog "Test Wallpaper").In button "OK",i wrote code as follows :
//at WM_INITDIALOG event
pIActiveDesktop = NULL;
HRESULT hr = CoCreateInstance(CLSID_ActiveDesktop,
NULL, CLSCTX_INPROC_SERVER, IID_IActiveDesktop,
(void**) &pIActiveDesktop);
if (FAILED(hr)) pIActiveDesktop = NULL;
//in button "OK"
if(pIActiveDesktop == NULL)
{.......
SystemParametersInfo(...,"image.bmp",..);
.......
}
else
{..............
pIActiveDesktop->SetDesktopItemOptions
(&compOptions, 0);
............
pIActiveDesktop->SetWallpaperOptions
(&wpOptions, 0);
// Set the wallpaper image.
pIActiveDesktop->SetWallpaper(T2CW
("image.jpg") , 0);
// Apply all changes.
pIActiveDesktop->ApplyChanges(AD_APPLY_ALL);
}
My program only run the first case(pIActiveDesktop=NULL)(i.e it only set to Desktop Wallpapers ".bmp").I (very)want to try the second case but not succeed (i hide the first case,when i click "OK", a error occur"memory can't read ").
Please help me how to "IActiveDesktop is available"
Thanks !
|
|
|
|
|
If you read an article, you should post your question there.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
You must ask directly of him on his article.
|
|
|
|
|
I have no knowledge in openGL, can anyone tell me how to write a getpixel function?
|
|
|
|
|
I've got a problem with a C++ class template representing a matrix object. The template parameter will be one of a number of things - a double, complex<double>, or a vector<double>, all of which have the * operator overloaded so that they can be multiplied by both themselves and a double.
My code at the moment is:
<code>
template < class T >
Matrix<T> Matrix<T>::operator*(const T val)
{
int ne=NumEl();
Matrix<T> tmp(Rows(), Cols());
for(int i=0; i< ne; i++)
{
tmp[i]=dat[i]*val;
}
return tmp;
}
template < class T >
Matrix<T> Matrix<T>::operator*(const double val)
{
int ne=NumEl();
Matrix<T> tmp(Rows(), Cols());
for(int i=0; i< ne; i++)
{
tmp[i]=dat[i]*val;
}
return tmp;
}
</code>
This won't compile when I declare a Matrix <double>, since the first function implementation with T=double is identical to the second one. Any ideas on how I can fix this?
I'm using gcc version 4.1.2 20060928, if that makes a difference.
Cheers
-Chris
-- modified at 20:10 Friday 16th March, 2007
|
|
|
|
|
I remember researching a similar question a while back, and there is no solution. What you're asking for is a template operator* that only works with certain types (or more precisely, doesn't work on certain types), and C++ doesn't let you do that. You can't restrict template type parameters like you can in C#.
|
|
|
|
|
Why do you need to have a different declaration in that case?
If the code is just an example:
One way would be to specialize Matrix<T> for doubles, to include only one of the "operator*":
<br />
template<><br />
struct Matrix<double><br />
{<br />
Matrix<double> operator*(const double v) { ... }<br />
};<br />
But that might involve lot of typing for a full-fledged matrix class. You might move all implementations to distinctly-named base class functions, but that helps only so much.
Another option (but with slightly different semantics) is to make the first operator weaker by making it a template:
<br />
template <typename T><br />
struct Matrix<br />
{<br />
template <typename T2><br />
Matrix<T> operator*(const T2 v) { ... }<br />
<br />
Matrix<T> operator*(const double v) { ... }<br />
};<br />
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|
|
Thanks for your help - the second bit of code looks like what I want to do.
-Chris
|
|
|
|