|
My list keeps growing.
|
|
|
|
|
You have a list?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Yes, she has [^].
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
|
|
|
|
|
...and I only got two of her 4 programming questions right
(I'll let you decide which)....not good
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
If you think I've missed anyone, please feel free to let me know; I don't visit all the forums.
|
|
|
|
|
A candidate [^].
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
|
|
|
|
|
He will be added tonight. Thanks!
|
|
|
|
|
Is there a API to set security attributes of file/folder(s) while creating them.
thanks in advance
|
|
|
|
|
Member 3068970 wrote: Is there a API to set security attributes of file/folder(s) while creating them.
Try SetFileAttributes()
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
Can i make a file/folder password protected as Microsoft Word do.
|
|
|
|
|
Member 3068970 wrote: Is there a API to set security attributes of file/folder(s)
[SetFileSecurity ^] replaced by [SetNamedSecurityInfo^].
Member 3068970 wrote: while creating them.
HANDLE CreateFile(
LPCTSTR lpFileName,
DWORD dwDesiredAccess,
DWORD dwShareMode,
LPSECURITY_ATTRIBUTES lpSecurityAttributes,
DWORD dwCreationDisposition,
DWORD dwFlagsAndAttributes,
HANDLE hTemplateFile
);
|
|
|
|
|
any example for its usage ... ?
|
|
|
|
|
Two links and a function were provided. How much more do you need?
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
For future.
|
|
|
|
|
I have lots of dialogs and activex controls in those dialogs in my application. I want to set sizes of those dialogs and controls on it according to current resolution. I use enumchildwindow function to get child window but i need to know which control is activex to set activex control font. How can i know which controls are activex, which controls are not? (at runtime) Thanks
modified on Wednesday, May 7, 2008 8:02 AM
|
|
|
|
|
mehmetned wrote: I have lots of dialogs and activex controls in those dialogs in my application
mehmetned wrote: I want to set sizes of those dialogs and controls on it according to current resolution
GetSystemMetrics()
mehmetned wrote: which controls are activex, which controls are not
ActiveX controls would be generally having .ocx extensions
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
|
This is what I am doing...
string str="MAX";
switch(str)
{
case "A":{ func1();}
case "B":{ func2();}
case "C":{ func3();}
}
following is the error I get..
error C2450: switch expression of type 'class std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >' is illegal
No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called
Please help me resolve this... THANKS.
|
|
|
|
|
You cannot switch on a string because the string is not an integral type. Integral means "simple" types such as int, long, short, char, ...
You can achieve the same behavior using if ... else if
if(str=="A") {
}
else if(str=="B") {
}
...
|
|
|
|
|
have you heard of the if keyword ?
a switch can work only with integers, not strings...
|
|
|
|
|
toxcct wrote: a switch can work only with integers,
Integral type, rather.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Codeproject.com: Visual C++ MVP
|
|
|
|
|
indeed, but i didn't want to complexify my answer, as the OP doesn't seem to know C++, so i doubt he actually knows that a char is a small int !!!
|
|
|
|
|
hi, you should use integer or char instead of string in switch.
like::
int a;
switch(a)
{
case 1:{fun1(); break;}
}
|
|
|
|
|
if your string is actually composed by a single character then the switch construct is viable, for instance:
string str="B";
switch( str[0])
{
case 'A':
{
}
break;
case 'B':
{
}
break;
case 'C':
{
}
break;
default:
{
}
break;
}
On the other hand, if you need to actually compare strings (i.e. more than 1 character involved) then you have to use a chain of if statements, for instance:
string str = "foo";
if ( str == "first option")
{
}
else if (str == "second option")
{
}
else if (str == "foo")
{
}
else
{
}
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
|
|
|
|
|
Hi all,
I want to get hard drive manufacturer name and slot information whether it is primary master-slave or secondary master-slave using VC++.
I am trying to get these details by using win32_diskdrive class(WMI classes). As there is one property of this class ie "manufacturer" that give the name of hard drive manufacturer. But when I execute my program it gives standard disk drive instead of giving seagate.
Is there any setting that i am missing? Is there any header file that i need to include?
I am using windows XP Professional and visual studio 2005.
Please provide me some guideline.
Thanks in advance.
|
|
|
|