|
ack! i hope not.
|
|
|
|
|
eh, don't mean to be rude but f**k no I wouldn't work on something like that. Anyone who works on them deserves to have all of the spammers in the world thrown into a room with them and nuked alongside the <insert sweary="" word="" here="">.
Its all part of a contract I've been working on with an accountancy firm. Its a whole bigass project but the thing with the email address relates to them needing a central database with all the email addresses of their clients/partners/co-workers in the Far East and USA. The email part of it is pretty insignificant in the scheme of the whole project hence the bodge job before the demo next week
|
|
|
|
|
Don't shoot me, shoot bryce.
|
|
|
|
|
/me gets out the gun
Nah, I just think that helping people spam more crap about getting a bigger ehhhhhh member or sending your cash to a king fleeing his country so he can pay you back double is just asking to be shot. Spammers should have their testicle hairs pulled out by a lion, the people who write the mass-senders just need a good slap and to have their internet connections taken away.
|
|
|
|
|
because ...
print "$1\n" if /(\S+\@\S+)/;
|
|
|
|
|
What is that? Perl? Perhaps you are correct. I'm not a big Perl fan.
|
|
|
|
|
So what ? C# would also do it quickly with a regular expression. That does not help much if you're doing work on data from a data source in C++, now does it ?
Christian
No offense, but I don't really want to encourage the creation of another VB developer.
- Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael
P Butler 05-12-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
|
|
|
|
|
If you want to get it right you better start off without CString. I've done RFC compliant mailparsing and you can believe me when I tell you that a working parser takes more that 200 lines of C++ code.
just as an example: <"Duh:my=mail-home"@[100.99.98.1]> is a perfectly valid mail address and yummy: "Jonny\"s Dumb" (who's he anyway) <jd@dumb.com>; too
Holy Sh*t! I'm speechless. (hey, that's a first) Marc Clifton, The Lounge
|
|
|
|
|
Thanks for the answers Larry and the advice Andreas, the reason for using C++ is that this is a small part of a much larger project that I've been working on.
To be honest I only need basic email parsing just now because this is mainly for a demonstration next week for the company buying it so after 20 revisions of the interface and other features, they can get their hands on a demo so we can do a final usability test and start the intended users off with a good run through of the program.
Once this is done I can get down to the nitty gritty of trying to get proper RFC compliance rather than the quick bodge I'm trying to do just now. As I said, the email parsing is a really small part of the project that just now is getting pushed aside in favour of working on getting other things up to scratch. I've got a full week pencilled in for working on this and another thing next month but until then its bodgey bodgey for me.
blehhh, to many big posts in one day make my head hurt Thanks for the hints & tips guys
|
|
|
|
|
How do I make a toolbar like the one i exploror?
The criterion is that the combo-box part is resized as the mainframe changes size.
I've looked in the "All Topics, MFC / C++ >> Toolbars & Docking Windows" area but I couldn't find it.
I would be very pleased if anybody who has done this would reply the thread.
Thanks.
Tobben
|
|
|
|
|
Hi
I have a problem with a application that i have written in vc7. It works perfect in Win XP and Win 2000.
But fails in Win 98 and Win ME.
This is what happends.
When i hover the mouse above a toolbar button the application terminates when the tooltip for the button is about to be shown. I tried to debug, and the debugger stop in comctl32.dll. But i don't know what to do about it.
The second problem i have is that i have a list control where i can edit the items on every row. I can have a DateTime control, edit controls and comboboxes.
It is no problem when i use the datetime or the edit controls. But if i begin to edit in a combobox, when i leave the combobox i get a GPF in User.exe. And the debugger can't give me any help.
Im guessing that all this have something to do with different versions of system dll's. But i'm not sure, and i don't know how to find out which dll's to update. Or if i could work around these problems.
So my question is how could i make my application work in win98?
Because it should be possible to write a application in XP and then it should work in Win 98, right? And i don't think that i'm doing anything advanced. So i can't understand why it won't work all the way.
|
|
|
|
|
http://www.dependencywalker.com
use profile menu
|
|
|
|
|
Stefan Dahlin wrote:
When i hover the mouse above a toolbar button the application terminates when the tooltip for the button is about to be shown.
There are two versions of the TTN_GETDISPINFO (formerly called TTN_NEEDTEXT ) message, one ANSI and one Unicode. Make sure that your code isn't hard-coded to assume Unicode, because on 9x the ANSI version of the message is used.
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
That is an interesting thought. But i'm using the plain CToolBar that is created automatically by vc7 when i created my project. And shouldn't that one work on win 98?
I've found out that my combobox problem only occrus when i have a ordinary combobox dropdown list, and i can write text in the edit-ctrl part of the combobox.
The program does not terminate when i exit a combobox dropdown list. And this is strange, since i'm using the same combobox class for both types. This is the worst problem of the two that i have, so any little tiny idea on what i can do to find out the problem is appreciated.
And i think that it is strange that it works without any problem in win 2000 and xp.
|
|
|
|
|
Maybe i have this problem on another place in the code. The following code is a part of the OnToolTipText function:
#ifndef _UNICODE
if (pNMHDR->code == TTN_NEEDTEXTA)
lstrcpyn(pTTTA->szText, strTipText, 80);
else
_mbstowcsz(pTTTW->szText, strTipText, 80);
#else
if (pNMHDR->code == TTN_NEEDTEXTA)
_wcstombsz(pTTTA->szText, strTipText, 80);
else
lstrcpyn(pTTTW->szText, strTipText, 80);
#endif
This should handle the difference between XP and Win98, right?
But it doesn't. My program works fine in XP, but terminates in Win98.
Does it matter that i develop in vc7 on XP? And then try to run the exe
on Win98? But i think that it should work anyway.
Please, someone, help!!
|
|
|
|
|
Hi - I'm on WinXP using .NET Visual C++.
I am trying to draw unicode characters (phonetic symbols, specifically) to a CWnd using GDI... I dont' think I have to change my app to entirely Unicode to do this (?), but don't know why this doesn't work:
CFont font;
font.CreateFont(20,
0, // width
0, // escapement
0, // orientation
25, // weight
FALSE, // italic
FALSE, // underline
0, // strikeout
0, // char set
0, // out precision
0, // clip precision
0, // quality
0, // pitch and family
"Arial Unicode MS");
int iNumPhonemes = _phonemeList.GetNumPhonemes();
CPoint drawPoint;
CString str(TEXT(""));
memDC.SelectObject(&font);
for(int i = 0; i < iNumPhonemes; i++)
{
str = TEXT("");
WCHAR ipaCode = (WCHAR)_phonemeList[i].ipaCode;
str += WCHAR(ipaCode);
memDC.TextOut(40, 40*i, TEXT(str));
}
... where _phonemeList.ipaCode is just an integer number, the unicode decimal value of the required symbol. It seems to ignore the Unicode part and just print the character corresponding to the bottom byte of the unicode character.
Any ideas?
TIA
alibob
|
|
|
|
|
From the docs:
"The TEXT macro identifies a string as Unicode when the UNICODE is defined during compilation. Otherwise, it identifies a string as an ANSI string."
And since
<code>
BOOL TextOut(
HDC hdc,
int nXStart,
int nYStart,
LPCTSTR lpString,
int cbString
);
</code>
means that
<br />
memDC.TextOut(40, 40*i, TEXT(str));<br />
is not calling TextOutW() unless you define UNICODE.
QED
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
I am using a Com Application in my project and was not able to use methods of the Com Server in a Thread function as I got a COM error always .
It would be helpful if I can get some reference or suggestions regarding this .
|
|
|
|
|
Did you initialize com using AfxOleInit() or ::CoInitialize(NULL); in the thread that you are using COM?
John
|
|
|
|
|
I can invoke COM server functions in my thread by doing this :
#define _WIN32_WINNT 0x0400 in my stdafx.h file.
That works ok.
Now the moment I add an Active X component in my Project (Dialog Application), I get the following in Debug :
Warning: OleInitialize returned scode = RPC_E_CHANGED_MODE ($80010106).
Warning: CreateDlgControls failed during dialog init.
and the App fails to run .
|
|
|
|
|
Boy! Are you in for a ride...
Do a google for some of the following words:
STA
MTA
Apartment
COM Threading Model
You will find tons of information, most of which you HAVE to read
(There is no short explanation to your problem, sorry)
"You can stand all night at a redlight anywhere in town, hailing Marys left and right but none of them slow down. I've seen the best of men go past. I don't wanna be the last..."
|
|
|
|
|
We are all aware that by default VC++ implementation of NEW does not throw an exception (as it should based on C++ standards).
MSDN has an article related to using set_new_handler() to make new throw std::bad_alloc when it fails instead of returning NULL.
My question is how is that handled in an MFC app? For instance lets say you have a method named Foo(), and Foo() might throw std::bad_alloc due to it calling new internally. If you called Foo() from an MFC class method you override, and did not have a try/catch, would MFC catch the bad_alloc?
In fact, what impact does it have at all on MFC if you change NEW to throw?
I'm also curious how other developers handle NEW... Do you leave it returning NULL by default? If so, won't that cause problems if you use STL and an STL method calls new and it throws?
|
|
|
|
|
MFC has its own override of operator new that throws a CMemoryException .
--Mike--
I'm bored... Episode I bored.
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Yep, and that is what happens when MFC calls new and it fails.
But what happens if you call STL or your own funtions from within an MFC function override and your new handler is called throwing bad_alloc?
It appears that MFC wont catch it, you will get an unhandled exception. If you try to recover from it, you might leak MFC resources.
PS: Did this change in VC .NET? Or does new still return NULL?
|
|
|
|
|
I've got a group box on my dialog that shows up as transparent. All controls have transparent UNchecked. Any ideas?
Well, actually, I just fixed it by selecting 'transparent' for the group box. What's the deal with that?
BW
"Gandalf. Yes. That is what they used to call me. Gandalf the Grey. *I* am Gandalf the White."
- Gandalf the White
|
|
|
|