Re: [Dev-C++] conversion from void *(and is neither void nor pointer)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Carlos d. M. <cg...@wo...> - 2002-07-06 11:01:50
|
Thanks, it works in some sites, but now I have found a place where it is a 0
in LoadImage, and it still says that, the parameter expected is an UINT, I do
everything but no way!
Here is the line:
_class.hIcon = reinterpret_cast<HICON> (
::LoadImage (_class.hInstance,
MAKEINTRESOURCE (resId),
IMAGE_ICON,
::GetSystemMetrics (SM_CXICON),
::GetSystemMetrics (SM_CYICON),
0));
I changed the first with _class.hIcon = ::LoadIcon(_class.hInstance,
MAKEINTRESOURCE(resId)); and it says the same error. The same if I put 1-1
instead of 0, or if I declare a UINT var = 0; and write var. I use the
LR_DEFAULTSIZE flag and still says that.
Here is the code of the full function where the two lines still have error
are:
void WinClass::SetResIcons (int resId)
{
UINT zero = 0;
_class.hIcon = reinterpret_cast<HICON> (
::LoadImage (
_class.hInstance,
MAKEINTRESOURCE (resId),
IMAGE_ICON,
::GetSystemMetrics (SM_CXICON),
::GetSystemMetrics (SM_CYICON),
0));
// Small icon can be loaded from the same resource
_class.hIconSm = reinterpret_cast<HICON> (
::LoadImage (
_class.hInstance,
MAKEINTRESOURCE (resId),
IMAGE_ICON,
::GetSystemMetrics (SM_CXSMICON),
::GetSystemMetrics (SM_CYSMICON),
0));
}
Borland 5.5 compiles fine, but I prefer Dev, it's more comfortable IDE than
those I found for Borland, with difference.
P.S.: Some times the error has lines where the error is unreadable characters.
|