|
Pass NULL as the first param, and the entire command line (with the EXE name quoted if necessary) as the second.
bSuccess = CreateProcess ( NULL, _T("C:\\path\\to\\program.exe -root -server"), ... );
--Mike--
"Adventure. Excitement. A Jedi craves not these things."
-- Silent Bob
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I have an edit control working as a log, but when new text gets added to the control that makes the scrollbar active, it scrolls to the top so you can't see what has happened. Is it possible to set it to scroll to the bottom automatically, or is there a message you can send so it does it? I'm programming Win32 BTW.
Thanks all.
|
|
|
|
|
|
ifstream & operator >> (ifstream &ifs, const DownKind & d)
{
ifs >> d.m_strKind >> endl >> d.m_strPath >> endl >>
d.m_strSuffix >> d.m_id >> d.m_idParent >> d.m_lstSub.size()
>> endl;
return ifs;
}
ofstream & operator << (ofstream &ofs, const DownKind & d)
{
return ofs;
}
// class declare
#define DOWNKINDBASE DownKindBase
class DownKind : public DOWNKINDBASE {
public:
friend ifstream & operator >> (ifstream &ifs, const DownKind &d);
friend ofstream & operator << (ofstream &, const DownKind &);
DownKind() ;
DownKind(string, string, string, int idParent = -1);
virtual ~DownKind() { clear(); }
string getKindName();
void setKindName(string);
string getPath();
void setPath(string);
void setSuffix(string);
string getSuffix();
virtual void clone(DownKindBase *);
void load();
void save();
virtual void addChild(DownKindBase *);
DownKindBase *findByKind(string );
protected:
virtual void readFile(FILE *);
virtual void writeFile(FILE *);
virtual void clear();
virtual void setParentId(int);
virtual int getParentId();
private:
string m_strKind;
string m_strSuffix;
string m_strPath;
int m_idParent; // parent id
int m_id; // current id
list<downkindbase*> m_lstSub;
};
could u please tell me what's wrong with this code, don't laught at me.
|
|
|
|
|
and please either fix the email address in your account, or uncheck the setting saying you want to be sent an email copy of replies. It's annoying when they bounce.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
ttzzgg_80713 wrote:
don't laught at me.
I would hope that no-one would laugh at you, I've written far worse code than this, I promise you.
ttzzgg_80713 wrote:
ifs >> d.m_strKind >> endl >> d.m_strPath >> endl >>
d.m_strSuffix >> d.m_id >> d.m_idParent >> d.m_lstSub.size()
>> endl;
You should read my article on iostream inserters and extractors. There is a bit of stuff you should be doing and are not, but the main point here is that you keep using endl, which performs a flush as well as a newline. This is a big performance hit. Also, when I write stuff like this, I have no using statements, I always explcitly scope std:: for everything. The reason is, the code is designed to be included in other projects, and it's probable clients of this inserter will not look at the code, and will silently find stuff pulled into the global namespace. Yes, this is probably just for you ( or your teacher ), but it's good to establish good habits.
ttzzgg_80713 wrote:
private:
You need to make the operator a friend of this class, or provide get methods to get to the data. Again, my article on iostream inserters is the way to go.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|