|
That's it - whenever I build, even if I've done no changes, every class gets built. Please help me .....
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Check the last-modified date on your header files, especially stdafx.h. Something may have glitched and set the date/time to a time in the future.
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Thanks - all my files thought they had been created in 2020. I found a shell extension that allowed me to change them all and now all is fine...
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Just for anyone else who may be wondering where to find such a shell extension... You can get DateEdit at:
http://home.worldonline.dk/~ninotech/freeutil.htm
|
|
|
|
|
Thanks a lot, I was wondering all this time.
|
|
|
|
|
have u got pre-compiled headers on?
mostly watching the human race is like watching dogs watch tv ... they see the pictures move but the meaning escapes them
|
|
|
|
|
Hi.
I need to execute a bat file (don't ask why, it's a long and sad story) from within my program.
I'm using CreateProcess(...) to start the bat file and WaitForSingleObject(...) to wait for it to finish.
Well, a dos box opens, the bat is executed, but when the bat file has done it job it just writes: "Finished - Foo.bat" in the title bar. Nothing happens until the user closes the dos box.
How to I avoid that?
I know that I could create a pif file with "Close on exit" enabled but is there another way?
Thanks
/Henrik
|
|
|
|
|
I don't know if this works, but it may be a solution:
Execute "command /C <batname>" instead of the batch itself. This is for windows 9x, in windows NT/2000 you have to replace "command" through "cmd /X".
But there should always be another way than executing a batch.
|
|
|
|
|
Hi,
I made a list box, and a button.
I want the button to do somthing if example: "Print" is selected. But i dont know how.
void CTestDlg::OnExe()
{
if ( ?? == "Print");
{
//Do somthing
}
}
The ?? is what i dont know what to put in, it must be somthing like: m_List == "Print"
But i tryed that. Help is needed.
Thank you..
|
|
|
|
|
I think you'll find it's GetItemText(GetCurSel());
The outer gets the text and the inner returns the index of the selected item.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Can't get it to work, i did this:
void CMenuDlg::StartGame()
{
if (m_Games.GetCurSel("Tribes"));
{
//Do Somthing
}
}
Error:
C:\Dokumenter\C++\Menu\MenuDlg.cpp(180) : error C2660: 'GetCurSel' : function does not take 1 parameters
C:\Dokumenter\C++\Menu\MenuDlg.cpp(182) : warning C4390: ';' : empty controlled statement found; is this the intent?
Did i do somthing wrong??
Thanks
|
|
|
|
|
You want it to be:
void CMenuDlg::StartGame()
{
if (m_Games.GetLbText(m_Games.GetCurSel()) == "Tribes")
{
//Do Somthing
}
}
There ia an aletrnative (and possible easier approach). Since you are obviously using this as an application launcher, you coudl store the command line you are executing as m_Games's Item data. Something like teh following;
m_Games.SetItemData(m_Games.InsertItem("Tribes"), DWORD("c:\\program files\\tribes\\tribes.exe"));
then your start game function woudl look like:
CString strCommand = LPCSTR(m_Games.GetItemData(m_Games.GetCurSel()));
then call ShellExecute (or whatever you're using to launch the application) with strCommand.
Note - this post made before morning coffee and ius therefore subject to containing countless errors and typos.
|
|
|
|
|
I did what you did:
void CMenuDlg::StartGame()
{
if (m_Games.GetLbText(m_Games.GetCurSel()) == "Tribes");
{
//Do somthing
}
}
Error:
C:\Dokumenter\C++\Menu\MenuDlg.cpp(184) : error C2039: 'GetLbText' : is not a member of 'CListBox'
c:\programmer\microsoft visual studio\vc98\mfc\include\afxwin.h(2741) : see declaration of 'CListBox'
Dosn't GetLbText belong to a combo box??
Thank's
|
|
|
|
|
"Dosn't GetLbText belong to a combo box??"
Yeah it does...and didn't I say that that post was written before morning coffee? And besides...what do you expect from free advice?
Make that m_Games.GetText(m_Games.GetCurSel()) and it shoudl work better.
|
|
|
|
|
if (m_Games.GetText(m_Games.GetCurSel()) == "Tribes")
{
//Do somthing
}
Only one error left
error:
Error C2661: 'GetText' : no overloaded function takes 1 parameters
Whats an overloaded function?? I got lots to learn
Ps. Am glad you help's me with this one
|
|
|
|
|
Am trying to make a tab control, but am new at programming, so i would like a litle help
ex: Where i could find Tutorials on a simple Tab Control.
Thank you very much
|
|
|
|
|
Anyone got an good sources of information on implementing USB functionality. Just looking for some decent reference material.
Thanks.
Joseph Dempsey
jdempsey@cox.rr.com
Joseph.Dempsey@thermobio.com
"Software Engineering is a race between the programmers, trying to make bigger and better fool-proof software, and the universe trying to make bigger fools. So far the Universe in winning."
--anonymous
|
|
|
|
|
Try www.usb.org and http://www.lvr.com/usb.htm
My next step would be to open up Copernic (www.copernic.com) and do a search for "USB development" etc..
Sorry I can't help any more...
|
|
|
|
|
I have a very annoying problem. I have two static classes, declared right after each other and somehow, I want them to be able to reach each other...
static class A : public Location
{
public:
Location *GetB { return &B; }
} A;
static class B : public Location
{
public:
Location *GetA { return &A; }
} B;
The code above is how I 'want' it to work.
Any help on this would be very appreciated.
Erik
|
|
|
|
|
First of all, let me say that I've never seen ANYONE declare a static class in the same manner as a struct typedef. I would recommend changing your code for clarity's sake, but that's now back to your question...
If you would like each class to access the other, I would recommend the following:
<br />
class A : public Location<br />
{<br />
public:<br />
static A instance;<br />
Location* GetB() { return &B::instance; };<br />
}<br />
<br />
class B : public Location<br />
{<br />
public:<br />
static B instance;<br />
Location* GetA() { return &A::instance; };<br />
}<br />
Hope this helps! (Basically, you create two singleton objects.)
|
|
|
|
|
You need to forward-declare class B before the definition of class A. (And BTW, your naming is confusing - a class "A" and a variable "A" together is a no-no if you care about readability.)
class B;
class A : public Location
{ ... } objectA;
class B: public Location
{ ... } objectB;
--Mike--
http://home.inreach.com/mdunn/
Time is an illusion; lunchtime doubly so.
|
|
|
|
|
Hi
does anyone have links or idea on different way of implementing an undo for my app...
thanks
Raphael mor
|
|
|
|
|
You have two options - maintain a list of copies to the entire document in different states, or maintain a list of actions that you can unperform.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
hi,
I have been trying to include a template class into a CList object but i it does not seem to work. I have tried to put in this way in the "Population" class:
Typedef Chromosome<cgene> chromosome
CList<chromosome,chromosome> PopulationArray;
Is there any way to put a template class into another template class??
I appreciate your help. Thank you.
leonwoo
|
|
|
|
|
I'm not having problems inserting template classes in a CList:
template <class t="">
class Cell {
public :
T SetData(const T& t) {
T old = data;
data = t;
return old;
}
T GetData() const {
return data;
}
private :
T data;
};
CList<cell<int>, Cell<int> > lst;//NOTE--there *must* be a space between the right-most braces : > >
lst.
Walter Gildersleeve
Freiburg, Germany
walter.gildersleeve@pe-gmbh.de
|
|
|
|