|
Thanks for the hint.
This means I have to recompile all MFC dependent libraries with VS2008, and thereafter convert the project?
|
|
|
|
|
Please consider the following simply C++ program:
<br />
#include <iostream><br />
#include <cassert><br />
<br />
using namespace std;<br />
<br />
class A {<br />
public:<br />
int operator ++(int z)<br />
{<br />
cout << "++ called with " << z << endl;<br />
return 5;<br />
}<br />
int operator *( int z )<br />
{<br />
cout << "* called with " << z << endl;<br />
return 5;<br />
}<br />
int x;<br />
};<br />
<br />
int<br />
main()<br />
{<br />
A a;<br />
a.x = 25;<br />
a ++;<br />
a * 35 ;<br />
}<br />
<br />
In this case, the class A is defining two operators: ++ and *. For the operator *, I specify only one argument because I expect the first operand to be represented by the this pointer. This works as I would expect. Now for the operator ++. Since this is a unary operator, I would expect the function declaration not to have any arguments. However, it works with one argument. By the way, the expression, a ++ 5 does not compile.
Could somebody please tell me what I am missing?
Bob
|
|
|
|
|
|
The overload can't break the rule that the operator ++ is a unary operator!
|
|
|
|
|
Hope this is a simple question with a simple answer...
I am creating a modeless CPropertySheet object using CPropertySheet::Create( ).
What I want is:
1. Modeless
2. pParentWnd to be desktop (?) - so its focus NOT tied to the app which launched it.
3. its look to resemble the default look of a CDialog::doModal() instance
What do I supply for the DWORD dwStyle (and possibly dwExStyle) parameters for ::Create( )?
p.s.
I am still having problems with the FOCUS. What I need is for my popup, modeless property sheet to remain in the forefront (on top) of the window that launched it.
Tried UNsuccessfully with calling the constructor with CWnd::GetDesktopWindow() as well as the create function.
Thank you.
John John
modified on Thursday, November 13, 2008 4:43 PM
|
|
|
|
|
Hi !
I would to know how to generate a key with the ECDSA algorithm from openssl
or do I have to use the ECDH algorithm for that?
If I have to use ECDH, how do I generate a key ? ECDH is only to share a
secret key.
An other question: I am doing cryptography with EDCSA an/or ECDH I would
like to use less code lines from openssl as possible. What should I keep or
leave from the code.
Thanks! Hope you will understand my question.
|
|
|
|
|
|
I don't understand what you mean.
Thanks
|
|
|
|
|
Hi,
I have created a multi line edit control and assigned a member variable say m_strOutput...
when i do m_strOutput += _T("\n") expecting the next time string to be printed in next line , the string is not printed in next line but appended to previous string.... How to go to next line in edit control????
|
|
|
|
|
sribachana wrote: when i do m_strOutput += _T("\n")...
Have you tried \r\n instead?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
yes i tried that also but no result
|
|
|
|
|
Does the control have the ES_MULTILINE style?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
you should try to do this: m_strOutput+=_T("\r\n")
|
|
|
|
|
Maybe this is not the best forum to answer my question, but because plugins can be written in C++ I hope somebody who is making them will answer
Can somebody tell me if browser plugins for IE (activeX) or firefox can read (any) files on the HDD? (when they know exact path).
Somebody have told me that it is insecure to store sensitive data into "application data" folder because it can be accesses by web plugins.
Is it true? I'd guess they can access any files/folders with active user permissions.
Thank you
|
|
|
|
|
rrrado wrote: Can somebody tell me if browser plugins for IE (activeX) or firefox can read (any) files on the HDD?
Since the code is C++, why wouldn't they be able to? See here for BHO examples.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
That's what I've thought ... but I have no idea about firefox
|
|
|
|
|
Browser plugins can access files in the computer. Just take the case of online virus scanners, they are able to scan the entire HDD for viruses.
-Saurabh
|
|
|
|
|
Hi,
I'm creating a whole bunch of buttons during run-time. When anyone of these buttons is clicked it should go through the same function, but with different parameters. A small example to clarify;
for (x = 0; x < 10; x++)
{
TButton *b = new TButton(this);
b->Caption = "My button " + IntToStr(x);
b->Top = 100;
b->Left = 100 + 10 * x;
b->OnClick = myfunction(x);
b->Parent = this;
}
void __fastcall TForm1::myfunction(int x)
{
ShowMessage("Button " + IntToStr(x) + " clicked");
}
This, however, doesn't work. I get an "Not an allowed type" error when compiling. Apparantly I can't pass variables like this to myfunction.
I can only do something like this;
b->OnClick = myfunction;
void __fastcall TForm1::myfunction(TObject *Sender)
{
ShowMessage("Button ? clicked");
}
But how do I know which of the ten buttons is clicked now? How can I pass this information to the function?
thanx
Willem
|
|
|
|
|
See, for instance [^], I know it's Delphi, anyway it is conceptually the same issue.
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]
|
|
|
|
|
verry nice, didn't think of that one
but the problem with this is, that it will only work with a known button, one that's written in the code.
when creating new buttons it wil return just the "button" methode as the sender.
so you know that a button is pushed and not an (ai) editbox or that it was a counter. but wich button you still don know.
|
|
|
|
|
Looks like David Crow has given already the solution [^].
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]
|
|
|
|
|
CPallini wrote: I know it's Delphi...
Why would that be an issue?
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
Beacuse not all the guys around like Greece.
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]
|
|
|
|
|
I suspect there's a joke in there somewhere, but, alas, it escapes me.
"Love people and use things, not love things and use people." - Unknown
"The brick walls are there for a reason...to stop the people who don't want it badly enough." - Randy Pausch
|
|
|
|
|
I know is a silly one [^].
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]
|
|
|
|