|
oh. my god! that's so......
i can't image that i need draw 100 windows!
I'm a beginner of VC++...
|
|
|
|
|
I'm confused with booleans. If I have these kind of methods in my classes
bool withdraw(float amount,Account a);
bool transfer(float amount,Account s,Account c);
could I still use couts and cin in my void main
|
|
|
|
|
I'd say your confused. So much so that I don't undestand the question.
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
I mean can the following be done:
bool Bank::withdraw(float amount,Account a);
cout<<"\nEnter a positive amount for the withdrawal-$";
cin>>amount;
while(amount<=0)
{
cout<<"\ninvalid amount";
cout<<"\nEnter a positive amount for withdrawal-$";
cin>>amount;
}
If there was an int or float in the place of bool I would not be so lost.
|
|
|
|
|
bool is just another type of variable, nothing magical about it.
--Mike--
Just released - RightClick-Encrypt - Adds fast & easy file encryption to Explorer
Like the Google toolbar? Then check out UltraBar, with more features & customizable search engines!
My really out-of-date homepage
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Dee wrote:
could I still use couts and cin in my void main
This has no connection with having a function that returns a bool.
Nish
Regards,
Nish
Native CPian.
Born and brought up on CP.
With the CP blood in him.
|
|
|
|
|
How to create user in Active Dir on XP,2k
Please give sample code in VB+VC
...
Ibrar Ahmad
Softare Engr.
Comcept PVT LTD.
Islamabad
abrar_@yahoo.com
|
|
|
|
|
|
hi,
how can i get the height and width of a window?
|
|
|
|
|
Send a Message to that windows Hwnd
I'm a beginner of VC++...
|
|
|
|
|
Depends on whether you want the client are size or the actual windows size (including the titlebar, scroll bars, status bar, etc..)
Use either GetClientRect() or GetWindowRect().
--
Where are we going? And why am I in this handbasket?
|
|
|
|
|
Check GetWindowRect() .
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
hi
To get the height and width
You must
RECT rect;
::GetWindowRect(&rect);
then u will get the window dimensions to the rect structure variable
Then
long left,right,top,bottom,height,width;
left=rect.left;
right=rect.right;
top=rect.top;
bottom=rect.bottom;
height=bottom-top;
width=right-left;
try it...
The TRUE CP -ian
|
|
|
|
|
how to post a BMP file on a CommandButton??
Bitbmp Button!
I'm a beginner of VC++...
|
|
|
|
|
A very customizable button, with everything it takes can be found here
Best regards,
Alexandru Savescu
|
|
|
|
|
Use a derived class from CBitmapButton
The TRUE CP -ian
|
|
|
|
|
Derive a class from CBitmapButton
The TRUE CP -ian
|
|
|
|
|
who can give me a DES code... (C/C++)
|
|
|
|
|
i want to use installshield for vc++6.0 to make a single EXE file.
how can i do it? Installshield for vc++ can not build a single EXE file!
...
I like vb/vc..
|
|
|
|
|
tiaozi wrote:
Installshield for vc++ can not build a single EXE file!
Yes,I don't think it can.IF you want only one file there you have to use another installshield.I think there is one called "wise installer" that make only one file.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
thank you for your reply.
Installshield for VC++6 Can not build a single EXE file.
But Installshield Prefessional Version can do it!
|
|
|
|
|
hehe~~ i hava no money to buy Installshield professional version,
but i hava a copy of "wise install" and "setupbuilder"
|
|
|
|
|
From : Lightning, Lightniing@aol.com
Ah, don't use Install Sheild, there are TONS of other softwares out there that will make very good installers for you and they are FREEWARE and they let you have one single compressed .EXE named setup.exe as your result.
I use NSIS, (no affilliation) it's freeware. It has an uninstaller, can copy files, make registy changes, register your ocx DLL's for you and copy things to different directories. It'll even make a desktop shortcut icon. It's scriptable (easy!) and it doesn't suck. If you don't like it there are other third-party ones out there. Here's NSIS.
http://www.nullsoft.com/free/nsis/
Cheers!!
Lightning
|
|
|
|
|
I wanat to get security of file with GetFileSecurity() .I use the code below to do this.
HANDLE SAHeap = HeapCreate( HEAP_GENERATE_EXCEPTIONS , 0 ,0 );
PSECURITY_ATTRIBUTES pSD = NULL;
ACL_SIZE_INFORMATION ASizeInfo;
DWORD LenNeeded , iAce;
BOOL DaclF , AclDefF;
BYTE DAcl [256];
BYTE AType;
PACCESS_ALLOWED_ACE pAce;
PACL pAcl = (PACL) &DAcl;
POSITION pos = filelist->GetHeadPosition();
for(short i = 0 ; i < filelist->GetCount() ; i++ )
{
LPCTSTR s =(LPCTSTR)filelist->GetNext(pos).GetString();
GetFileSecurity( s, OWNER_SECURITY_INFORMATION | GROUP_SECURITY_INFORMATION
| DACL_SECURITY_INFORMATION , pSD , 0 , &LenNeeded );
pSD = (PSECURITY_ATTRIBUTES)HeapAlloc(SAHeap , HEAP_GENERATE_EXCEPTIONS , LenNeeded);
.
.
.
.
The problem arise in the last line.In some paths it works ok but in some paths unhandled error happend for last line(HeapAlloc() ).Any idea or any other way to alloc memory to pSD in other way?
The error is this:
Unhandled exception at 0x77f84472 in FileSecurity.exe: 0xC0000017: Not Enough Quota.
Mazy
"The more I search, the more my need
For you,
The more I bless, the more I bleed
For you."The Outlaw Torn-Metallica
|
|
|
|
|
Mazdak wrote:
Any idea for it any othe way to to alloc memory to pSD?
I don't think you need to create a separate heap. You can just use the normal C++ new operator/malloc.
|
|
|
|