|
I'm using TCP/IP to transfer some raw bytes.
Ok, as you said, I'll do my own research. I came to ask this when my own research isn't good enough, and I was trying to share my knowledge with the rest of ya'll. Ever thought of the purpose of this news group?
Thanks for replying though.
|
|
|
|
|
hi, i am (trying) to learn assembly and downloaded MASM. This includes many examples, but they all seem to be using include files and working with messageboes just like in C, in fact i dont really see why i should use Asm instead of C. I mean, where is the code behind, for example CreateWindow(), either in C or in Asm, how is it done? down to the very basics... If anyone knows a good tutorial on this or anything it would be greatly appreciated.
Thanks
Kuniva
--------------------------------------------
|
|
|
|
|
Kuniva wrote:
in fact i dont really see why i should use Asm instead of C
There is often no reason to use assembler instead of C. Since I don't know where you got that idea, it's impossible to judge it more than saying it's in general false.
|
|
|
|
|
win32 asm tutorial[^]
You may download asm books on k*z*a as well/.
if you start putting in too manay features, it no longer remains useful for beginners
quote in a CP article comment, shiraz baig
|
|
|
|
|
Kuniva wrote:
I mean, where is the code behind, for example CreateWindow(), either in C or in Asm, how is it done?
Bad news, fellow, CreateWindow is made in C.
Only the innermost kernel features are made in ASM. And this is kept to a bare minimum. You could start seeing something like this downloading the linux kernel.
"In an organization, each person rises to the level of his own incompetence." Peter's Principle
|
|
|
|
|
CFileFind finder;
static const TCHAR szFileToFind[] = _T("*.dll");
Cstring Plugins[100];
int tag = 0;
bool bResult = finder.FindFile(szFileToFind);
while (bResult)
{
// Grab actual results
finder.FindNextFile();
Plugins[tag] == (LPCTSTR) finder.GetFileName();
tag++;
// Get next file
bResult = finder.FindFile(szFileToFind);
}
finder.Close();
I am away from a compiler ATM. Thanks for your help.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
The CFileFind interface is a bit wonky.
BOOL bWorking = finder.FindFile ( szFileToFind );
while ( bWorking )
{
bWorking = finder.FindNextFile();
Plugins[tag] = finder.GetFileName();
} The return value from FindNextFile() indicates whether you just got the last file in the search, which is contrary to how most classes do it (where the return indicates whether you've gone through all the files). When it returns FALSE, you still have one file left to process.
--Mike--
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Hi,
I wish to be able to delete a specifed section of my *.ini file. I have been adding things to it, but how do I delete things? I have been using the following code without the SetRegKey() function to create my .ini:
AfxGetApp()->WriteProfileString("Section", "Part", data);
I wish to delete the "Section". Code to the "Part" would also be appreaciated.
Thanks,
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
I have been using this to help me with ini files. http://www.codeproject.com/cpp/cinifile.asp
You could see how he does it then impliment that, or switch over and use this. It is fairly straight forward and clean. Hope this helps.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
Excellent!
I wish I had known about that class sooner!
~ Selevercin
If you have a problem with my spelling, just remember that's not my fault. I [as well as everyone
else who learned to spell after 1976] blame it on
Robert A. Kolpek for U.S. Patent 4,136,395.
|
|
|
|
|
That class is indeed wonderful, but I'm just curious: Why isn't there a way to delete an INI section or entry by API calls? I've tried to search through MSDN and studied all(I think) INI-file-related API's, no lucky, i really can't beleive that.
|
|
|
|
|
Bin wrote:
Why isn't there a way to delete an INI section or entry by API calls?
You are always limited by Win32 API (actually, in this case it's inherited from Win16), and if Micros~1 didn't think of something you'd want to do, there us usually no documented way to do it.
Easy as pie (unless you try a GDI Pie...).
|
|
|
|
|
AfxGetApp()->WriteProfileString("Section", "Part", NULL) should delete "Part" from "Section".
AfxGetApp()->WriteProfileString("Section", NULL, NULL) should delete all of "Section".
See the documentation for ::WritePrivateProfileString and look at the source code for CWinApp::WriteProfileString. The documentation for CWinApp::WritePrivateProfile string apparently fails to mention that you can use it to delete entire sections from the INI file.
|
|
|
|
|
Before every function definitions, I have gotten into the habit of prefacing each with COMMENTS on what's being accomplished in that function (such as which parameters are input, output, and what changes were made to that function, when, and for what reason, etc.).
However (useful as it is), it has become something of a labor for which I would like to formulate a way in which I could do something that would automate the process of inserting a "template like" generic header, which I could then modify with only the specifics for that particular function.
IOW, my rough idea is to insert a macro (or something like that) before each function definition, and when the program is compiled, to have the macro expand into this generic template layout which I would then simply fill in with the relevant information (etc.).
Any idea on the best approach?
Thanks!!
William
|
|
|
|
|
|
Amazing that someone would promulgate this.
This sort of commenting has been discredited as very hard to maintain, and therefore more likely to be misleading than informative. Bad idea.
|
|
|
|
|
I don't see the problem, the guy asked for a way to add comments via macros, and a solution was given; whether the solution is good or bad, is another story, but the principles are there and it's up to the user to modify the script to generate his own good format for him.
Suggest another format!
Max.
|
|
|
|
|
I am not promulgating anything. I am the one asking for ideas.
Like everything good and beneficial, discipline is required if it's to remain that way.
I cannot count the amount of times I've had to spend hours playing detective to applications nobody seemed to remember what all have been done to it (not even the author who wrote it).
Tell me at such times you couldn't use all the help you can get (especially at 2 in the morning when your phone rings because some user on the other side of the world has just experienced a crash or some other anomally while using the application).
Nevertheless, I see your point, because of what good would documentation be if it's out of date and misleading, WHICH IS WHERE DISCIPLINE WILL HAVE COME IN.
Discipline is never easy. It requires (for a lot of people) training, consistence, and (for some) enforcement.
I like to think I'm helping out the next person whose phone might get ring at 2 in the morning, so he/she would know what to do and wouldn't have to call me (which in a way is helping myself).
William
|
|
|
|
|
I am not at my home computer, so I cannot research this up myself. What is the best/easiest way to search a directory and return the file name of every dll? Is it CFileFind()? Thanks for your help.
Darroll
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
See MSDN:
FindNextFile
It has the sample code you want.
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
|
|
|
|
|
Would someone please look this over tell me if I got it right. I am not at my computer so I have no compiler to check it. Thank you.
CFileFind finder;<br />
static const TCHAR szFileToFind[] = _T("*.dll");<br />
Cstring Plugins[100];<br />
int tag = 0;<br />
bool bResult = finder.FindFile(szFileToFind);<br />
<br />
while (bResult)<br />
{<br />
finder.FindNextFile();<br />
Plugins[tag] == (LPCTSTR) finder.GetFileName();<br />
tag++;<br />
<br />
bResult = finder.FindFile(szFileToFind);<br />
<br />
}<br />
finder.Close();<br />
Not one person lives in the present. Only the past. I can prove it.
|
|
|
|
|
How do I get the rect of a subitem in a report-style CListCtrl? I'm wanting to paint icons in the subitems, but in order to paint icons there, I need to know where to put it Basically, I just need a GetItemRect function for subitems.
Thanks!
|
|
|
|
|
|
Doh! Thanks
|
|
|
|
|
Hi guys,
I've a declared bunch of global variables in
CMyClass
{
}
and I want to access them in CMyOtherClass. How do I do that?
Can I use extern? how about static? The compiler still warns me that I've "undeclared identifier" in CMyOtherClass when use those two keywords.
Help?
|
|
|
|