ExtCreateRegion Win9x Problem
-
I have run into an issue with ExtCreateRegion on windows 9X machines. I use getregiondata to get the data and then use ExtCreateRegion data to recreate the region. Everything works fine on 2000/XP and on 9x machines when the region is less than 64K but on the 9x machines when the region is larger than 64K it fails. The MS documentation says 64K is not longer a limitation on 9x but my tests seem to elude to a different answer. The code is pretty simple: int LastTestRgnSize = GetRegionData(TempRgn, 0, 0); // get the rgn size unsigned char* LastTestRgn = new unsigned char[LastTestRgnSize]; memset( LastTestRgn, 0x00, LastTestRgnSize ); int size = GetRegionData(TempRgn, LastTestRgnSize, (RGNDATA*)LastTestRgn); HRGN Rgn = ::ExtCreateRegion(NULL, RgnSize, (RGNDATA*)Temp); The ::ExtCreateRegion function will fail when the region size is above 64K on 9x but not on 2000/XP. Does anyone have a work-around for this or any ideas on how to correct the problem. Thanks in Advance :-) nemo
-
I have run into an issue with ExtCreateRegion on windows 9X machines. I use getregiondata to get the data and then use ExtCreateRegion data to recreate the region. Everything works fine on 2000/XP and on 9x machines when the region is less than 64K but on the 9x machines when the region is larger than 64K it fails. The MS documentation says 64K is not longer a limitation on 9x but my tests seem to elude to a different answer. The code is pretty simple: int LastTestRgnSize = GetRegionData(TempRgn, 0, 0); // get the rgn size unsigned char* LastTestRgn = new unsigned char[LastTestRgnSize]; memset( LastTestRgn, 0x00, LastTestRgnSize ); int size = GetRegionData(TempRgn, LastTestRgnSize, (RGNDATA*)LastTestRgn); HRGN Rgn = ::ExtCreateRegion(NULL, RgnSize, (RGNDATA*)Temp); The ::ExtCreateRegion function will fail when the region size is above 64K on 9x but not on 2000/XP. Does anyone have a work-around for this or any ideas on how to correct the problem. Thanks in Advance :-) nemo
nemo wrote: The MS documentation says 64K is not longer a limitation on 9x I'd like to see where it says that. Everything in User and GDI on 9x has 16-bit limitations because much of that code is 16-bit code for Win16 compatibility. [Eg, list boxes can't hold more than 32K items, 32K is the max value of a 16-bit signed int; 9x can't handle more than 16K window handles, 16K*4 bytes = 64K bytes, 4 bytes being
sizeof(HWND)
] --Mike-- Ericahist | CP SearchBar v2.0.2 | Homepage | 1ClickPicGrabber New v2.0! | RightClick-Encrypt If my rhyme was a drug, I'd sell it by the gram.