1. RE: Win32lib (simple app) not working #2
- Posted by Dave Probert <zingo at purpletiger.com> Aug 18, 2003
- 494 views
euman at bellsouth.net wrote: > On 18 Aug 2003 at 19:53, Pete Lomax wrote: > > On Mon, 18 Aug 2003 13:50:22 -0400, euman at bellsouth.net wrote: > > >Well, I must agree Win32lib 59.1 is pretty useless. > > Ever the diplomat I can't actually agree here, I personally think that win32lib isn't useless (waaay too strong!), but just not complete enough. It's an ongoing development library - just needs people, like yourselves, to find and report errors. Possibly even find solutions and submitting them to Derek to put in the next update. With a version number like 0.59, it cannot be a full version - those usually get a number like 1.1 or whatever :) The difference, as far as I can see, between win32lib and the others I've looked at, is that it tries to remove the need to have lots of different calls to w32_func(), etc in someones application. Encapsulating commonly used features under a single procedure name, instead of having half-a-dozen variants. My suggestion - don't deride it, help it.
2. RE: Win32lib (simple app) not working #2
- Posted by euman at bellsouth.net Aug 18, 2003
- 467 views
On 18 Aug 2003 at 20:00, Dave Probert wrote: > > > euman at bellsouth.net wrote: > > On 18 Aug 2003 at 19:53, Pete Lomax wrote: > > > On Mon, 18 Aug 2003 13:50:22 -0400, euman at bellsouth.net wrote: > > > >Well, I must agree Win32lib 59.1 is pretty useless. > > > Ever the diplomat > > I can't actually agree here, I personally think that win32lib isn't > useless (waaay too strong!), but just not complete enough. > > It's an ongoing development library - just needs people, like > yourselves, to find and report errors. Possibly even find solutions and > submitting them to Derek to put in the next update. With a version > number like 0.59, it cannot be a full version - those usually get a > number like 1.1 or whatever :) > > The difference, as far as I can see, between win32lib and the others > I've looked at, is that it tries to remove the need to have lots of > different calls to w32_func(), etc in someones application. > Encapsulating commonly used features under a single procedure name, > instead of having half-a-dozen variants. > > My suggestion - don't deride it, help it. Thanks, Im fully aware of the still under construction clause. Ive been here since before David Cuny started talking about creating Win32lib and I have every faith that this library will eventually be what puts Euphoria on the map. But at this stage its pretty useless to me..... Euman
3. RE: Win32lib (simple app) not working #2
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Aug 19, 2003
- 527 views
From: euman at bellsouth.net [mailto:euman at bellsouth.net] > Well, I must agree Win32lib 59.1 is pretty useless. Really? With whom are you agreeing? Actually, it loooks like the problem you found has been there since v58.0. It's a fairly obscure and not very useful (to 99.9% of win32lib users) feature of the library. > This doesn't work either because setWinMsgHandler() > has a bug in it, ( "id" hasn't been declared) Yes, setWinMsgHandler() should start: global procedure setWinMsgHandler(object pId, object pMsg, integer pRoutine) integer lPosn integer id atom lMsg if not sequence(pId) then pId = {pId} end if Also, you can't trap WM_CREATE this way, because you're setting the handler after you've already created the window. You should trap w32HActivate. Really, there's no reason to trap WM_CREATE and WM_DESTROY this way, since they're not going to be speed critical like WM_PAINT. If you fix the win32lib bug above, and change your code to what I have below, it works fine: function MainWnd_Proc( integer pSource, atom hWnd, atom iMsg, atom wParam, atom lParam ) hdc = w32Func( xBeginPaint, { hWnd, ps } ) junk = w32Func( xBitBlt, {hdc, 0, 0, vxScreen, vyScreen, memdc, 0, 0, SRCCOPY} ) w32Proc( xEndPaint, { hWnd, ps } ) return {0} end function setWinMsgHandler(MainWin, {WM_PAINT}, routine_id("MainWnd_Proc")) procedure on_destroy( integer self, atom event, sequence params ) junk = w32Func( xReleaseDC, {0, hdc} ) end procedure setHandler( MainWin, w32HDestroy, routine_id("on_destroy")) procedure on_activate( integer self, atom event, sequence params ) atom hWnd hWnd = getHandle(self) hdc = w32Func( xGetDC, {hWnd} ) memdc = w32Func( xCreateCompatibleDC, {hdc} ) hbit = w32Func( xCreateCompatibleBitmap, { hdc, vxScreen, vyScreen } ) junk = w32Func( xSelectObject, {memdc, hbit} ) hbrush = w32Func( xGetStockObject, {WHITE_BRUSH}) junk = w32Func( xSelectObject, {memdc, hbrush} ) junk = w32Func( xPatBlt, {memdc, 0, 0, vxScreen, vyScreen, PATCOPY}) setScrollRange ( {MainWin, SB_HORZ}, 1, vxScreen ) setScrollRange ( {MainWin, SB_VERT}, 1, vyScreen ) setPenColor( MainWin, Green ) junk = w32Func(xRectangle, {memdc, 10, 10, 620, 460}) junk = w32Func( xReleaseDC, {hWnd, hdc} ) junk = w32Func( xInvalidateRect, {hWnd, NULL, 0} ) end procedure setHandler( MainWin, w32HActivate, routine_id("on_activate"))
4. RE: Win32lib (simple app) not working #2
- Posted by Matt Lewis <matthewwalkerlewis at yahoo.com> Aug 19, 2003
- 468 views
> From: euman at bellsouth.net [mailto:euman at bellsouth.net] > > On 18 Aug 2003 at 20:00, Dave Probert wrote: > > > My suggestion - don't deride it, help it. > > Thanks, Im fully aware of the still under construction clause. > Ive been here since before David Cuny started talking about > creating Win32lib and I have every faith that this library will > eventually be what puts Euphoria on the map. > > But at this stage its pretty useless to me..... Which will continue to be true if you continually (deliberately?) misunderstand what it's about. Matt Lewis