I am not understanding the numbers you are showing me. For example:
Chesnokov Yuriy wrote:
257 * 3 = 771, 771 / sizeof(DWORD) = 192.75
Why are you dividing 771 by sizeof(DWORD)? This does not make any sense to me. Each pixel is represented by 3 bytes or sizeof(RGBTRIPLE). The padding will be at the end of the memory allocated. Like this:
You should be able to calculate the original bitmap width by checking that stride modulo RGBTRIPLE is equal to zero. For finding the best width where width is equal to stride you can multiply width by RGBTRIPLE and check that it is equal to the alignment. Something like this:
I have a problem and i really dont know how this happens.
I have a property page window with say 4 property pages.(sheet1,sheet2,sheet3sheet4) and obviously they all have common "Ok""Apply" and "Cancel" button. Each of the sheets have their own classes say Csheet1,Csheet2,Csheet3,Csheet4 with each of them having their own function definations for "Ok" "Apply" and "Cancel" (like Csheet1:: onOK(), Csheet2:: onOK(), Csheet4:: onOK(),, etc).
But if im in sheet4 and press Ok or Apply why the hell it goes to Csheet1:: onOK() and then to Csheet4:: onOK(),, though im averse to this action. please help me...!!
i just want the functions of class correponding to the sheets to be invoked.
say if im in sheet1 and press "ok" or "Apply" then Csheet1:: onOK() or Csheet1:: onApply() resp. should be opened..!!1
Yes any page you go and click ok, it will first go to the Csheet1::onOK() and then to their class defined Csheetx::onOK() funtion.
"Also from the above, are you saying that they all share the same buttons ? if that is so then that is the problem !"
RE: Generally its the property of the property page which looks like sharing the same "OK" "Apply" and "Cancel" button,, for example,, open your Internet option (in internet explorer) the bottom 3 buttons look like common.
Where does the ACL of any file or directory is stored ?
say if we created an acl for a file in windows operating system
and moved that file to another operating system like mac
does that previously created ACL still holds to that file ??
I have a MFC SDI project(use multiple byte) created in VC++ 2003. Now I convert it to VC+2008.
I add the SetTitle("aaa.bbb") in OpenFile function, but the title does not change.
I create a new MFC SDI project and SetTitle("aaa.bbb") in openFile function, and then the title change to be "aaa.bbb".
Are you using a 'multibytechar' set or 'unicode' in the converted code.This problem mainly arises due to the inappropiate settings.In Visual Studio go to project->properties->Configuration properties->General-> Character Set and set the value accordingly.
If the function succeeds, the returnvalueis nonzero.
If the function fails, the returnvalueis0 (zero). To get extended error information, call GetLastError.
If the returnvalueis nonzero and the number of bytes read is0 (zero),
the file pointer is beyond the current end of the file at the time of
the read operation. However, if the file is opened with FILE_FLAG_OVERLAPPED
and lpOverlapped is not NULL, the returnvalueis0 (zero) and GetLastError
returns ERROR_HANDLE_EOF when the file pointer goes beyond the current end
What is the value of aa when the function returns? Try calling GetLastError() to get more information.