Re: window question
- Posted by Dan Moyer <DANIELMOYER at prodigy.net> Mar 15, 2002
- 515 views
George, Maybe just fake a caption for a non-movable window with a colored emulated text label? There's some code below that someone posted or sent me that does that, maybe it was Derek? Looks like I could make Wstyles demo more useful if the style constants showed up as tooltips over the respective windows or something. Here's all the style constants I could find, doesn't look like any of them will make a window with a caption and no-move, but I could be wrong: WS_BORDER = #800000, WS_CAPTION = #C00000, WS_CHILD = #40000000, WS_CHILDWINDOW = #40000000, WS_CLIPCHILDREN = #2000000, WS_CLIPSIBLINGS = #4000000, WS_DISABLED = #8000000, WS_DLGFRAME = #400000, WS_GROUP = #20000, WS_HSCROLL = #100000, WS_ICONIC = #20000000, WS_MAXIMIZE = #1000000, WS_MAXIMIZEBOX = #10000, WS_MINIMIZE = #20000000, WS_MINIMIZEBOX = #20000, WS_OVERLAPPED = 0, WS_OVERLAPPEDWINDOW = #CF0000, WS_POPUP = #80000000, WS_POPUPWINDOW = #80880000, WS_SIZEBOX = #40000, WS_SYSMENU = #80000, WS_TABSTOP = #10000, WS_THICKFRAME = #40000, WS_TILED = 0, WS_TILEDWINDOW = #CF0000, WS_VISIBLE = #10000000, WS_VSCROLL = #200000, -- colored "label" code: include win32lib.ew without warning constant mainWin = create(Window, "Test Coloured Labels", 0, 0, 0, 400, 300, 0), labelArea = create(LText, "", mainWin, 5, 5, 200, 25, 0) procedure labelArea_Paint(integer left, integer top, integer width, integer height) -- Draw the background setPenColor(labelArea, Blue) drawRectangle(labelArea, 1, left, top, width, height) -- Draw a border setPenColor(labelArea, BrightCyan) drawRectangle(labelArea, 0, left, top, width, height) drawRectangle(labelArea, 0, left+1, top+1, width-1, height-1) -- Draw the text setPenPos(labelArea, 3, 3) wPuts(labelArea, "Hello, World!") end procedure onPaint[labelArea] = routine_id("labelArea_Paint") -- These need only to be done once, not every paint event. setFont(labelArea, "Courier New", 14, Normal) setTextColor(labelArea, BrightWhite) WinMain(mainWin, 0) -- end code Dan Moyer ----- Original Message ----- From: <gwalters at sc.rr.com> To: "EUforum" <EUforum at topica.com> Sent: Thursday, March 14, 2002 3:14 PM Subject: Re: window question > > MIke, the windows on the demo are close to what I want but not quite, Here's > what I would like....{WS_DLGFRAME,WS_CAPTION,WS_POPUP}. The caption would be > desirable but for the window to not be moved or resized > like{WS_DLGFRAME,WS_POPUP} does. When I add the WS_CAPTION, then the window > can be moved. Is there a solution to this? > > > george > > ----- Original Message ----- > From: "Mike" <vulcan at win.co.nz> > To: "EUforum" <EUforum at topica.com> > Sent: Thursday, March 14, 2002 3:06 PM > Subject: RE: window question > > > > Hi George, > > > > Win32lib has a demo program called Wstyles.exw which demonstrates what > > you want.. > > > > Mike > > > > gwalters at sc.rr.com wrote: > > > I would like to create a window inside another window and the 'child' > > > window > > > would be fixed so it can't be moved "nomove", or minimized or > > > maximized....Is this possible and if so how can I do it? > > > > > > thanks.. > > > > > > george > > > > > > > >