|
I am hoping to use CFile, and what I want to do is concatenate two files. I dont see an append function. How would one do that? If I cant use CFile I'll have to use system("dosomething") which isnt quite as nice...
Thanks,
ns
|
|
|
|
|
Yes, you can use CFile . Use 2 CFile objects to open and read the files' contents into a couple of variables (eg: data1, data2). Then, use a 3rd CFile object to create a new file and call Write() to write each variable in succession.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Obvious thing to do, in retrospect! THanks! I'm doing some java right now....one nice thing its 'STL' like iterator has is HasNext() which checks to see if the next element exists....
How did the deal go? Hard at work already?
|
|
|
|
|
I *luv* Java's collection classes! Thankfully, the .Net framework has a similar, extensive array (no pun intended) of classes.
ns wrote:
How did the deal go? Hard at work already?
Very well, thanks! I start work on Oct 14. Am looking forward to an initial 2 hour commute . Hopefully, it's only a matter of time before I move to Cambridge. Gadzooks, I'll have to start acting young and hip again. Haven't done that since 1492.
Am riding on a high... was working on an academic problem (sending text messages to an SMS equipped phone which is connected to a GPS, then parsing the query to determine where the target object is) that helped a friend of mine clinch a deal. In appreciation, he gave me an early Xmas present[^]! I'm still in shock! I was just solving the problem for fun!
Now it's back to my portfolio manager hack and a backlog of articles I want to post on CP. Hope you're having a great weekend! Eat lots of jaylee.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Ravi Bhavnani wrote:
I *luv* Java's collection classes! Thankfully, the .Net framework has a similar, extensive array (no pun intended) of classes.
Have you not used the STL ? The C# collection classes blow for many reasons, and a brief use of the STL will reveal them all.
Christian
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
During last 10 years, with invention of VB and similar programming environments, every ill-educated moron became able to develop software. - Alex E. - 12-Sept-2002
|
|
|
|
|
how can i show a dialog using simple asm in vc++?
void showAboutDialog( void )
{
__asm
{
//invoke DialogBox( g_hModule, MAKEINTRESOURCE( IDD_ABOUT_DIALOG ), NULL, (DLGPROC) aboutDialogProc );
//invoke GetDesktopWindow
};
}
any help would be great.
-carl
|
|
|
|
|
This is not 'directly' possible with the VC++ inline assembler. Sure, you could play with the _emit statement and form the needed opcodes yourself, but why? Why not making a direct call to DialogBox(...)?
Dominik
|
|
|
|
|
I have a static function in my class,I want to call a nonstatic function of my class inside that static function.How?
Mazy
"If I go crazy then will you still
Call me Superman
If I’m alive and well, will you be
There holding my hand
I’ll keep you by my side with
My superhuman might
Kryptonite"Kryptonite-3 Doors Down
|
|
|
|
|
Static functions are not associated with a particular instance of a class. They have no this pointer. Like a global function. You would have to pass in a pointer to the object to invoke the method on, since the static function is not associated with a particular object.
|
|
|
|
|
Generally, you use a pointer to the instance of the class whose method you want to invoke. e.g.
/*static*/ void CMyClass::DoSomethingToPeer(CMyClass* pPeer)
{
pPeer->DoSomethingToSelf();
}
/*static*/ void CMyClass::DoSomethingToAllPeers()
{
// s_Peers is a static variable to class-- a list of all instances
for (list<CMyClass*>::const_iterator i=s_Peers.begin();i!=s_Peers.end();++i)
i->DoSomethingToSelf();
}
|
|
|
|
|
Hi,
how can i kill a process? I do not want to send some messages like WM_CLOSE, WM_QUIT or others to the process to kill, i want to kill it, so it not even has the time to ask for file-save for example.
I know, this is somehow possible (I have a tool, which exactly does this). Do you know how to kill a process?
Thanks,
-Dominik
|
|
|
|
|
Try this function: TerminateProcess instead of ExitProcess function.
Appstmd
|
|
|
|
|
Ok, thank you!
|
|
|
|
|
Hi!
I'd like to modify a executable file's icon without using the UpdateResource Windows API because it is'nt supoorted by Windows 98 and Me.
Does anyone know an article or information about it?
Thks in advance!
Appstmd
|
|
|
|
|
Dig into docs on the Portable Executable (PE) file format used for Win32 executables and learn how to parse and make changes to the file.
http://www.microsoft.com/hwdev/hardware/PECOFF.asp
http://www.anticracking.sk/EliCZ/import/msdn_pefile.htm
http://www.msdnaa.net/interchange/preview.asp?PeerID=1083
|
|
|
|
|
Thks. I'll take a look at these docs.
Appstmd
http://www.appstmd.com
|
|
|
|
|
Hello! Everybody!
Now, I have get the HANDLE of an dialog(by FindeWindow function),then ,How can i get the full path of the executtable contaning the dialog.
thanks very much first
|
|
|
|
|
::GetModuleFilename(handle);
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Please search the forum.
Since this question pops up every two weeks (or so), isn't it about time there was a prominent link to a FAQ that included this?
Meaning: it's already documented e.g here.
|
|
|
|
|
I am using....custom...dynamic....plane made up resource ID's instead of predefining them. For a plugin sceme I am doing. Now before you ask if this is possible or why, my question is... Is it true that Resource ID's are just UINTs? I ask because I want to know how high a number I can use. The higher the greater chance that Classwiz wont use it. There is up to 33667 in my resource.h file. Thanks for your help.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
You searched MSDN before posting, right ?
It took me 5 seconds to get to MFC TN020: ID Naming and Numbering Conventions". MSDN7 link[^].
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
StephaneRodriguez wrote:
You searched MSDN before posting, right ?
You read my question first didn't you? Please stop treating ppl like the are idiots and should only come to for your 5 second answer after they spent 5 hours looking it up. If you think it is simple enough that they should look it up themselves then don't respond. And, in this case make sure you read the question before you answer with a smart ass remark. MFC naming conventions is not what I was asking. I want to know the data type that they use so that I can set my own ID's, which aren't true ID's. What I should ask is what data type a wParam is. An UINT like I thought, but man please do not be an ass, and then not even answer what my question was asking.
Sorry to come off as an ass. This type of behavior is getting on my nerves. Not just you.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
No need to be rude, she was just answering your question.
A wParam is a 32 bit value, just like an UINT.
Griffith
Everything you say will be misquoted, ripped out of context and used against you.
|
|
|
|
|
If you read her post you see that SHE STARTED IT I know I know. I am sorry for being rude. It just bugged me when she said, did you even look it up? Jeesh, oh well. Sorry to all! I had a bad night :'(
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
hey guys,
i need to place a bitmap on a CDialog using StretchBlt() functon.
someone give me an example.i would appreciate it ...
Regards,
Kapil
|
|
|
|