|
Use GetLine to read a line at a time, then parse each string for comments or function declarations, etc. I'd do it in C#, because then you can use Regular Expressions, which would have to help.
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
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
|
|
|
|
|
Really??I want to use the regular Expression too.But I am not familar with it.Can you show me the example.
By the way,I can use the regular expression in VC6 ,so I do't have to use C#
I am I,Who is who,I am who,Who am I
|
|
|
|
|
roboo wrote:
I want to use the regular Expression too.But I am not familar with it.
At it's simplest, a regular expression is like when you search for a file and type *.txt to get a text file - the * stands for any number of characters. RegEx can be a lot more complex, the MSDN is full of examples. C++ does not support RegEx natively, the .NET framework does. If you have VC6 it may not be worth the effort of finding something you can plug in to do it for you, although it's possible that Boost has something ( www.boost.org ).
The C# compiler is free from Microsoft and there are some open source, free IDE's, so it's not entirely out of the question to give C# a 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
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
|
|
|
|
|
Thank you very much again.
Can you tell me where can I find the example code either C++ or C#.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
MSDN is full of RegEx code, I have some articles on CP about iostreams ( which is how you read and write files ), apart from that I guess your options include string mashing, if you're using MFC then CString is the best string class to do that sort of stuff, unless you want to write funky STL functors for std::string.
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
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
|
|
|
|
|
I think you had misunderstood me.I know how to use regular expression.
I just want to know how to judge the "/**/" "//"
"{}" string by regular expression.I cannot write the correct and workable expression.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
Ah... I see. To be honest, I need to look up MSDN myself to build them, I'm not that experienced. The MSDN docs are very good though, I just don't know the stuff well enough yet to do it without them.
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
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
|
|
|
|
|
Go to the macros and add-ins section for some add-ins that do this (maybe not all you need - but a start)
cheers,
Chris Maunder
|
|
|
|
|
I want to pratice my VC++ skill by creating a project.The project is about a web server.
I want to use the CAsyncSocket to finish the task.I had made a lot of progress.Now I meet a problem.
I can load the onReceive event agian,and if one browser visit the http://127.0.0.1 I can get the resquest.But When and How can I response the bwowser bu reloading the onSend event.
Any informaition may help me and thank you very much.
I am I,Who is who,I am who,Who am I
|
|
|
|
|
I'm trying to find a virtual listbox class but I can't seem to find one anywhere. I need to have a listbox with alot of values which takes too long to load in a regular listbox.
|
|
|
|
|
I'm trying to find a virtual listbox class but I can't seem to find one anywhere. I need to have a listbox with alot of values which takes too o\long to load in a regular listbox.
|
|
|
|
|
I'm having some problems with the heap..
First I create a new heap object:
m_phArray=new HTREEITEM[nSizeOfArray];
Then later I try to delete it, in a different virtual function:
delete[] m_phArray;
And after debugging I get:
memory check error at 0x016A0048 = 0xD8, should be 0xFD.
memory check error at 0x016A0049 = 0x21, should be 0xFD.
memory check error at 0x016A004A = 0x62, should be 0xFD.
memory check error at 0x016A004B = 0x00, should be 0xFD.
Is there a simple sollution to my problem, or an in depth web page on the Heap you could reference me to? Thanks.
-Templeton
|
|
|
|
|
this almost certainly means you've written a value off the end of the array. check every place you write a value into the array and make sure you're not going past the (nSizeOfArray-1)th element.
-c
A conclusion is simply the place where someone got tired of thinking.
|
|
|
|
|
it's not almost certainly; it is. Thank you, works like a charm.
-Templeton
|
|
|
|
|
Hi there,
What's the best way to show a HTML in the dialog ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
|
I have created MFC single document application
I want my application to support the winsocket .
if i typed in following code, I got errors eventhough i have included <windows.h> header file.
WSADATA wsda;
SOCKADDR_IN serverAddr;
SOCKET theSocket;
LPHOSTENT hostEntry;
int ws, conn, snd, rev;
char buffer[256];
how can i get window socket supporting for my current application without recreate a new project?
Thanks
|
|
|
|
|
If you tell us what the errors actually are, then we might be able to help you...
Dave
|
|
|
|
|
I am having a problem using print and printpreview in a FormView.
If I build using MFC as a shared dll, all works as it should.
If I build using MFC as a static library, I get an error when the print function tries to create the dialog to show print status. Apparently when
Create(CPrintingDialog::IDD, pParent);
gets called in the CPrintingDialog contructor,
if (!_AfxCheckDialogTemplate(lpszTemplateName, FALSE))<br />
{<br />
ASSERT(FALSE);
PostNcDestroy();
return FALSE;<br />
}
in CDialog::Create fails because there isn't a valid document template name. Is this the document template name of my form view or one created by MFC for the print dialog? How do I make sure it gets set? I need to compile using MFC as a static library due to installation on other Windows versions.
Ed
|
|
|
|
|
I want to set the transparency (SetLayeredWindowAttributes(...))of my dialog. One option is to LoadLibrary, i did, and it was successful.
But I want to do this the primitive way: Project>Setting>Link>Object/Library module
"C:\Program Files\Microsoft Visual Studio\VC98\Lib\User32.lib"
"C:/Program Files/Microsoft Visual Studio/VC98/Lib/User32.lib"
"User32.lib"
User32.lib (without quotation)
none worked. I didnt get any compiler error but the compiler does not recognise SetLayeredWindowAttributes(...) for one reason or another...
Help! feel like an idiot.
norm
|
|
|
|
|
If you want to use the lib file then you need the latest header files, you must download the lastest Platform SDK from http://MSDN.microsoft.com
Btw actually it's enough to include User32.lib (without quotation) to your project settings, although it should be included by default
modified 12-Sep-18 21:01pm.
|
|
|
|
|
i think u're right... i searched winuser.h and it's not even there.
and MSDN didnt mention that u need the latest version for this sh*t..
thanks anyway. got my hands on Platform SDK Build2601 August 2001 Edition.
norm
|
|
|
|
|
(Not 100% sure) Try definining the macros _WIN32_WINNT and WINVER as 0x0500 before any inclusion (or preferrably on the preprocessor editbox in the project settings).
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
thanks!
but, is this what u mean?
#define _WIN32_WINNT
#define WINVER 0x0500
norm
|
|
|
|
|
#define _WIN32_WINNT 0x0500
#define WINVER 0x0500
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|