|
Please help.
Thank you in advance.
Easy Profiler : a compile-time profiler for C++
www.potatosoftware.com
|
|
|
|
|
Can't you use web browser control [^]for rendering HTML in your MFC application?
If you're trying to have a core rendering engine, you can use Webkit [^] Open Source rendering engine.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Thank you for your reply.
In a word, I want to develop an application like Klipfolio dashboard where I have multiple HTML control areas in which content is updated via C++ which talks directly to JAVASCRIPT which in turn talks to HTML.
I solved the issue of C/C++ - Javasccript communication via this module : http://www.mozilla.org/js/spidermonkey/[^]
But still unable to do all the chain.
In case you do'nt want to download and test Klipfolio, this is screenshot I uploaded to my gallery. You can see how the application renders content as HTML and and is able to intercept its events and acts on it too from the host C++ application.
http://farm4.static.flickr.com/3356/3642864151_753cf0457c_o.png[^]
Can I acheive that with Webkit ?
Easy Profiler : a compile-time profiler for C++
www.potatosoftware.com
|
|
|
|
|
Our software has some fields where users enter email addresses. We don't actually send any email. A later process picks up those email addresses and sends out notices.
Bad email addresses with things such as spaces, quotes, or double '@' signs can cause serious problems for the system sending out the notices, so we are already validating for some of those things.
But we want to tighten up our validation of the email addresses as much as possible when they are entered. We're not going to go as far as trying to determine if they are valid addresses, but at least want to confirm that they are of valid 'format'.
We're not certain what all of the rules are, but someone here had the idea of tapping into Outlook. I was playing around with calling CMapiSession::Resolve() on the email addresses, and it appears that an address gets 'resolved' if it's of valid format, even if it's not in your Address Book, so exactly what we need. (Of course it will also resolve a name or id that's found in your address book, so need to either make sure there's also an '@' symbol, or replace the name with the email address for them).
But, here's the thing that I find slightly annoying. That little dialog that pops up asking the user to "allow access" to their Outlook. I would love to avoid that, and again, since we aren't actually sending an email, and don't even really need to access their Address Book, it seems like we should be able to avoid asking for access. We are only trying to make use of Outlook's validation of address format, not the part that actually tries to resolve whether it's in their address book.
Does anyone know if it's possible to separate out that functionality? Or find and swipe that chunk of code??? We'd like to make sure our format validation is consistent with Outlook's validation.
Other suggestions also welcome...
Thank you.
|
|
|
|
|
Ummm - leave MAPI - just use a regex[^]. Or this one[^] on CodeProject.
Or you could look at the definitive standard[^]?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
No, useless.
Simply use the api from MS Acc DLL to validate email address (1 line of code...)
|
|
|
|
|
kilt wrote: MS Acc
Care to elaborate what that is?
kilt wrote: 1 line of code
I'm sure the OP (that's not me) would love you to share that with him.
[edit] Looking at the messages you've posted, you do a hell of a lot of criticising of other peoples contributions - maybe you might like to contribute something to the site for a change?[/edit]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
modified on Saturday, June 20, 2009 8:11 PM
|
|
|
|
|
Hello
I am working on VS 2003 and getting compiler warnings saying that those 2 above mentioned functions are depreciated. I know VS 2008 they have sprintf_s and other more safer functions. But there's no way for me to upgrade to 2008.
So can anyone tell me how to get those compiler warnings go away, without setting the warning level to low priority.
That is, i would like to use a wrapper around the sprintf function which will do the type checking to make sure the buffer is of valid size.
Is there any function like that i can use VS2003?
Any help is welcome.
|
|
|
|
|
dipuks wrote: I am working on VS 2003 and getting compiler warnings saying that those 2 above mentioned functions are depreciated.
If the compiler is telling you they are deprecated, then is it also telling you what to use instead? I find it hard to believe that the compiler would know enough to complain, yet not provide any means by which to correct the problem.
In any case, you might have to use _CRT_SECURE_NO_WARNINGS .
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Hi,
you probably know the signature and functionality of the safe functions; why wouldn't you start using them: implement them yourself, it only takes a couple of lines of code to come up with something that satisfies the interface and is a lot safer than the old unsafe stuff.
Luc Pattyn [Forum Guidelines] [My Articles]
DISCLAIMER: this message may have been modified by others; it may no longer reflect what I intended, and may contain bad advice; use at your own risk and with extreme care.
|
|
|
|
|
Luc Pattyn wrote: it only takes a couple of lines of code to come up with something that satisfies the interface and is a lot safer than the old unsafe stuff.
Uhm........
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi Luc Pattyn ,
If Possible please try to help me regading the thread increase the DialogBox size during Runtime which was posted by me....
|
|
|
|
|
to disable particular warning without decreasing warning level
#pragma warning (disable:4996) // i hope, the warning number is true.
|
|
|
|
|
dipuks wrote: Is there any function like that i can use VS2003?
StringCchCopy()[^] is a safer alternative to sprintf . You will need to #include "strsafe.h" and link to strsafe.lib .
You might want to take a look at String functions[^]
dipuks wrote: I know VS 2008 they have sprintf_s and other more safer functions. But there's no way for me to upgrade to 2008.
You just need to download the latest SDK. Can't you?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Rajesh,
Is this function a replacement for sprintf, strcpy , strcat? I mean, is there similar replacement fuctions?
Also am not sure whether i will be able to download latest SDK, unless its free from Microsoft.
Do you think this will satisfy the compiler?
I know that if i use sprintf_s in place of sprintf, the compiler will be happy. But unfortunately my working environment is VS2003 and there is no way of updating to 2008.
Do you know of any wrapper for sprintf, which will do the similar kind of work that sprintf_s will do? So that i can make sure that i will sprintf only once.
|
|
|
|
|
Did you read my reply or not? I clearly mentioned that StringCchPrintf is a replacement for sprintf and it is a secure function. Please read it properly again. I also gave you a link to a set of string functions that are safe, which you should have a look at.
If you try to use any of those functions, you will know what it does.
SDK is free for download and the latest one is available here: http://www.microsoft.com/downloads/details.aspx?FamilyId=F26B1AA4-741A-433A-9BE5-FA919850BDBF&displaylang=en[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Hi
I built myapp. I can not get it started. I got HEAP invalid allocation problem.
How can I solve this problem?
Best regards,
|
|
|
|
|
Where does this allocation occur? Can you show us the offending line?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
The app tried to connect to firebird database. It stoped at "new".
|
|
|
|
|
transoft wrote: The app tried to connect to firebird database. It stoped at "new".
How can we help you if you give us info so sparingly?
You should report the line, as it is (and probably more relevant code), in order to get any help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Thank you very much for replying my question. I found out the problem.
It is wired. I add one file from firebird DLL project to my app project. Then everything works.
Best regards,
|
|
|
|
|
It's always better posting questions with code snippet for this kind of issues.
Proabably you're passing an Unintialized variable ( 0xCDCDCDCD the default value for an uninitialized variable assigned by C runtime library. ) Check whether you're passing proper size to allocate.
-Sarath.
"Great hopes make everything great possible" - Benjamin Franklin
|
|
|
|
|
Hi,
im using the below code to resize the Dialog during Runtime...ie im overriding DoModal()
function...
CTestDlgDlg is my application name....
INT_PTR CTestDlgDlg::DoModal()
{
CDialogTemplate dlt;
int nResult;
// load dialog template
//CTestDlg::IDD is the ID of my resoource...
if (!dlt.Load(MAKEINTRESOURCE(CTestDlg::IDD))) return -1;
// set your own font, for example "Arial", 10 pts.
dlt.SetFont(L"Arial", 12);
// get pointer to the modified dialog template
LPSTR pdata = (LPSTR)GlobalLock(dlt.m_hTemplate);
// let MFC know that you are using your own template
m_lpszTemplateName = NULL;
InitModalIndirect(pdata);
// display dialog box
nResult = CDialog::DoModal();
// unlock memory object
GlobalUnlock(dlt.m_hTemplate);
return nResult;
}
The issue every controlin the DialogBox is getting increased except checkbox,Radio button..please let me know can i increase the size of the checkbox,RadioButton in this case....
|
|
|
|
|
anybody please give reply...
|
|
|
|
|
I've suspected before, but this makes it certain - why do you feel the need for two CodeProject identities?
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|