|
mdsameerahsan wrote: I am using GetFileSize() to get the Hard Drive Size but this function is getting fail. Code is here:
What is the last error code? Add @err,hr to watch window. You could see the last error description. Your code seems fine. May be something wrong with your file handle. Anyway check the last error description.
mdsameerahsan wrote: And what is the use of High and Low DWORD. I try to get the information from MSDN but could not understand.
The GetFileSize() api returns the total file size as 8 bytes that's by using two DWORDS. The dwFileSizeHigh stands for the low order 4 bytes and dwFileSizeHigh stands for high order 4 bytes. For getting the real file size, you should read them together.
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
mdsameerahsan wrote: get the Hard Drive Size
To get this you should use GetDiskFreeSpaceEx() .
You see, wire telegraph is a kind of a very, very long cat. You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you send signals here, they receive them there. The only difference is that there is no cat.
Albert Einstein
|
|
|
|
|
mdsameerahsan wrote: I am using GetFileSize() to get the Hard Drive Size
How does getting the size of a file give you the hard drive size?
Or did you mean the size of the file on the harddrive?
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Come on, Mark. If you fill the HD completely up with files, and then add all their sizes up, that will tell you the HD's size.
You need to start thinking outside of the box else a "fish filet" will soon be on your resume.
"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 sincerely hope you're joking...
In which case I would laugh!
|
|
|
|
|
It helps to know the jokes that go on between some of the CP veterans.
"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
|
|
|
|
|
Oh yeah! I missed that part
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hello everyone,
I have searched for RTTI tutorials for 15 minutes, but find none. I want to see in depth how RTTI is implemented, for VC environment. All I found is either forum discussion without any definite result or any non-free web sites.
Could anyone suggest any free online tutorial for this topic please?
thanks in advance,
George
|
|
|
|
|
Why would there be tutorials on how something is implemented in Visual C?
How about researching it yourself and writing an article on it here to
share your knowledge with the rest of us?
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Hi Mark,
"Why would there be tutorials on how something is implemented in Visual C?" -- why not?
regards,
George
|
|
|
|
|
Are you searching something like this [^]?
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]
|
|
|
|
|
That's not fair Pallini. George was limited to searching under his bed while you searched the internet!
And please don't tell us you cheated and used Google! You are supposed to go site by site, page by page!
led mike
|
|
|
|
|
Hi led mike,
I am also using Google. But top pages are all paid forums or consulting groups.
regards,
George
|
|
|
|
|
I like it, thanks CPallini!
But formal Microsoft document would be better than reversing engineering ones.
regards,
George
|
|
|
|
|
George_George wrote: But formal Microsoft document would be better than reversing engineering ones.
Definitely. Anyway Microsoft, you know, gives sparingly implementation details...
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 sometimes notice some guys disclose something on their blog -- MSDN blog.
But for RTTI I find nothing.
regards,
George
|
|
|
|
|
George_George wrote: I have searched for RTTI tutorials for 15 minutes, but find none.
Wow 15 minutes! I suppose you want a medal?
I spent several hours over several days looking for one specific thing just this week.
led mike
|
|
|
|
|
led mike wrote: go site by site, page by page!
led mike wrote: I spent several hours over several days looking for one specific thing just this week.
I see a correlation.
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]
|
|
|
|
|
What are you looking for? Free laptop? For hours to find a free one, it worth.
regards,
George
|
|
|
|
|
Hi,
I have an MFC dialog that I have changed as follows:
- no title bar
- no system menu
- no border
- OnCtlColor produces a white background
The dialog is a notification dialog box that appears in the lower-right corner of the user's screen. I want to have a light blue border 1-3 pixels wide surrounding this window (on the interior edge is fine). How can I create this programatically? I don't use drawing/color functions much...
Thanks In Advance
|
|
|
|
|
Override OnPaint() and draw lines.
|
|
|
|
|
How about overriding OnNcPaint ?
This signature was proudly tested on animals.
|
|
|
|
|
Can u give me some link or code
|
|
|
|
|
Code snippet for drawing blue rectangle with 3 pixel width.
void CDialogDlg::OnPaint()
{
CPaintDC dc(this);
LOGPEN LogPen = { 0 };
LogPen.lopnColor = RGB( 0,0,255 );
LogPen.lopnStyle = PS_SOLID;
POINT ptWidth;
ptWidth.x = 3;
LogPen.lopnWidth = ptWidth;
CPen BluePen;
BluePen.CreatePenIndirect( &LogPen );
HPEN OldPen = (HPEN) dc.SelectObject( (HPEN)BluePen.GetSafeHandle());
RECT rect;
GetClientRect( &rect );
dc.Rectangle( &rect );
dc.SelectObject( OldPen );
}
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
But its not painting the border of mydialog in blue colour nor with3 pixels thickness.
I have an MFC dialog that I have changed as follows:
- no title bar
- no system menu
- no border
- OnCtlColor produces a white background
The dialog is a notification dialog box that appears in the lower-right corner of the user's screen. I want to have a light blue border 1-3 pixels wide surrounding this window (on the interior edge is fine). How can I create this programatically?
|
|
|
|