Xref: news-dnh.mv.net comp.os.ms-windows.programmer.misc:31965 comp.os.msdos.djgpp:3454 Path: news-dnh.mv.net!mv!barney.gvi.net!redstone.interpath.net!uunet!in2.uu.net!dgis.dtic.dla.mil!sc2c526a.ra.osd.mil!nova.sti.nasa.gov!lerc.nasa.gov!purdue!haven.umd.edu!news.ums.edu!news.umbc.edu!cs.umd.edu!not-for-mail From: dfs AT cs DOT umd DOT edu (Daniel F. Savarese) Newsgroups: comp.os.msdos.djgpp,comp.os.ms-windows.programmer.misc Subject: RSXWDK/Windows question Date: 21 Nov 1995 17:35:40 -0500 Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 31 Distribution: world Nntp-Posting-Host: snocap.cs.umd.edu To: djgpp AT sun DOT soe DOT clarkson DOT edu Dj-Gateway: from newsgroup comp.os.msdos.djgpp Hi Folks, I have a quick question for those who might know. Is there a limit to the maximum dimensions of a MS-Windows 3.1 bitmap? I am using EMX and RSXWDK (those of you on comp.os.msdos.djgpp know what I'm talking about, c.o.m.p.m probably don't, but it shouldn't matter) to port some X apps to Windows. One thing I am trying to do is use a Windows bitmap as framebuffer, the same way I use X Pixmaps. I do this more or less like this: hmem = CreateCompatibleDC(hdc); hbmp = CreateCompatibleBitmap(hdc, width, height); SelectObject(hmem, hbmp); To test the frame buffer I was writing a picture in a memory buffer into the bitmap using SetBitmapBits(hbmp, width*height, buff) and writing the bitmap to a window using BitBlt(hdc, 0, 0, width, height, hmem, 0, 0, SRCCOPY). Everything looks ok until I use a picture that exceeds a certain size (haven't figured it out just yet, but it's around 256x256). When I get to that point the bitmap doesn't get written to properly, and the bitmap is fragmented with duplicated parts. e.g. If the picture should be a square, the top half gets repeated somewhere near the middle and the bottom half is skewed to the side from where it should be, and also appears fclose to the bottom of the bitmap. I don't know if this is a symptom of there being a maximum limit on the dimensions of a Windows bitmap or if it has something to do with the Windows not traversing the memory allocated by EMX correctly (16 bit Windows expecting segments and such). If anyone thinks he/she can figure out what's up roughly by what I've described, I'd greatly appreciate it. grazie, daniel