|
I forgot to mention that I use the MFC AplWizzard (Dialog based), your link led me to C# project which I don't have!
|
|
|
|
|
THAQCD wrote: ...your link led me to C# project which I don't have!
No it didn't. You might want to check again.
"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
|
|
|
|
|
I did verfy the Demo project (after extract files), it doesn't have the .dsw suffix for VC++ 6.0 but it has the .sln ... might be it for Visual Studio C++ & C# ?
|
|
|
|
|
Did you read the article and look at the code? It's clearly MFC, which is VC++.
"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
|
|
|
|
|
I verify them now (before I only download the project & hope can see codes more easily) & will try out!
Thanks to be patient with me!
|
|
|
|
|
you can creeate a modeless dialog with a timer, which will close the dialog
Press F1 for help or google it.
Greetings from Germany
|
|
|
|
|
I have Two 3d vectors and i want to compare the values of this two 3d vectors.plz help me and tell me how should i compare one 3d vector with other 3d vector.
Project Engineer
|
|
|
|
|
by 3d vector are you meaning a IJK vector ? or a vector of vector of vector ?
if the former, just do a simple function that takes the 2 vectors and compare the values (within a tolerance if you are using floats/doubles).
if the later, you need to loop each vector and compare each element.
in both cases there are probably fancy STL stuff to do it.
This signature was proudly tested on animals.
|
|
|
|
|
Something like this?
struct Vec3D
{
Vec3D(int x_, int y_, int z_) : x(x_), y(y_), z(z_) {}
int x, y, z;
};
bool operator==(Vec3D const& left, Vec3D const& right)
{
return left.x==right.x && left.y==right.y && left.z==right.z;
}
Then you can just do:
Vec3D v1, v2;
if (v1==v2) { }
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Given the "accuracy" of floating point values, you might want an "abs(x1 - x2) < epsilon" test, rather than "==".
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Waaaaay ahead of you - note the types I used for the vector co-ordinates
I'd rather tackle one problem at a time with the OP - comparison of structs/classes first, floating-point nastiness after that when he says 'but I'm using floating point numbers'.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi
The CString's GetBuffer() function can not be used with "const". Is there a workaround method to let it work?
Best regards,
|
|
|
|
|
Are you referring to the LPCTSTR operator?
"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
|
|
|
|
|
I am using it in a following function:
void Cmyclass::myfunction(ostream & outputStream) const
{
...
outputStream << static_cast <tchar *="">;(Identifier.GetBuffer());
...
}
Identifier is a CString variable.
Following is error message:
error C2663: 'ATL::CSimpleStringT<BaseType,t_bMFCDLL>::GetBuffer' : 2 overloads have no legal conversion for 'this' pointer
1> with
1> [
1> BaseType=char,
1> t_bMFCDLL=true
1> ]
|
|
|
|
|
transoft wrote: outputStream << static_cast ;(Identifier.GetBuffer());
Assuming Identifier is a CString object, this should suffice:
outputStream << Identifier;
"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
|
|
|
|
|
Sometime I am in hurry to fix something, this fix I should try myself. Thank you very much for your answer.
Best regards,
|
|
|
|
|
Usually GetBuffer is not needed when you need a const.
Moreover, you need explicit, written authorization by Mark Salsbery, before using GetBuffer ...
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 have a file on NTFS drive, when I try to shift + delete that file I get a message access denied. I also checked ACL for that file in which administrator have full control on that file. I also tried to modify security attributes of that file. But every thing is disabled on security tab. When I try to take ownership of file I got message “You only have permission to view the current owner of the file”. (In this case it is Administrators group). I have logged in as an Administrator (which is member of Administrators group) but still I am not able to delete it.
I insured that the file is not loaded in memory, nor it is locked by any other process (I insured it through procmon.exe).
I thought explorer.exe might not have sufficient privileges to deal with that file so I create application having SE_TAKE_OWNERSHIP, SE_BACKUP_NAME and SE_RESTORE_NAME privileges and now try to get access rights or taking ownership of that file but still not get succeed in it.
So please let me know how to delete that file programmatically.
Thanks in advance.
|
|
|
|
|
hb_harshad wrote: So please let me know how to delete that file programmatically.
Until you find out why the file cannot be deleted via Explorer and the OS, I wouldn't worry about code.
"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 DavidCrow,
Thanks for your reply.
I think it might be because of Security descriptor settings.
Can you please tell me in what cases Windows show message box "You only have permissions to view the current owner of file" when you try to change the owner of file. Also I am not able to add or delete any ACE. Is their any modification in local policy or group policy settings.
Thanks.
|
|
|
|
|
Hi All
I am getting fatal error in resource file.
Debug\RCa03488(576) : fatal error RC1120: out of memory, needed 2941934093 bytes
Plz help me
|
|
|
|
|
See [^].
and, please, switch ON Google...
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 Guys,
The problem with my application i want to set Properties for a message using Mapi(C++), and save the message the messae will be save in outlook. i am able to set BODY,SUBJECT, but iam not able to set email adress for it, so that mail property is not appearing when i opened in outlook and see TO Adress . can any body help me out .
Here is the sample code what i wrote.
SPropValue props[4] = {0} ;
props[0].ulPropTag = PR_BODY ;
props[0].Value.lpszW = _T("hai dolly") ;
props[1].ulPropTag = PR_SUBJECT ;
props[1].Value.lpszW = _T("how r u dolly");
props[2].ulPropTag = PR_SENDER_EMAIL_ADDRESS;//Problem here
props[2].Value.lpszW =_T("xyz@gmail.com") ;//problem here
props[3].ulPropTag = PR_MESSAGE_FLAGS ;
props[3].Value.ul = MSGFLAG_SUBMIT | MSGFLAG_READ ;
hr = pNewMessage->SetProps( 3, props, NULL ) ;
hr = pNewMessage->SaveChanges(0);
|
|
|
|
|
Pardhu_M wrote: see TO Adress
Pardhu_M wrote: props[2].ulPropTag = PR_SENDER_EMAIL_ADDRESS;//Problem here
props[2].Value.lpszW =_T("xyz@gmail.com") ;//problem here
Those two seem to contradict each other - you're setting the 'sender' e-mail address, but looking at the 'TO' address field?
Anyway - to tell a MAPI message who it's addressed to, you use IMessage::ModifyRecipients [^], IIRC.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
Hi,
May i know how can i add a value for an Xmlnode.. using msxml..when im trying to use
BSTR bstr2;
Node1->get_text(&bstr2);
Node->put_text(&bstr2);
im getting the below error
error C2664:
L::IXMLDOMNode::put_text' : cannot convert parameter 1 from 'BSTR * ' to 'BSTR'
|
|
|
|