RE: Assigning resource id's

new topic     » topic index » view thread      » older message » newer message

Maybe I'm using the wrong terminology.

Here is the relevant code:

<CODE SNIPPET>
   -- Output Mle
   mleOut = CreateWindowEx(
               or_all({WS_EX_STATICEDGE}),
               "EDIT",
               NULL,
               or_all({WS_CHILD, WS_VISIBLE, WS_TABSTOP, WS_VSCROLL,
                    ES_LEFT, ES_MULTILINE}),
               0,0,0,0,
               MAIN,
               NULL,
               instance(),
               NULL)

function onSize_MAIN(object args)
 integer w,h
   w = lo_word(args[4])    h = hi_word(args[4])
   junk = MoveWindow(mleOut, 0, 0, w, h-23, 1)
   junk = MoveWindow(mleIn, 0, h-23, w, 23, 1)

   return 0
end function
constant onSize_MAIN_id = catch_event(WM_SIZE, 
routine_id("onSize_MAIN"))

<END OF CODE SNIPPET>


When MoveWindow(mleOut, etc) is called for the first time, mleOut hasn't 
been created yet, and instead, the desktop 'Start' button is resized.

I can get around it by using a different value instead of 200 for 
mleOut, or by skipping the first call to onSize_MAIN(), but it seems 
like I'm just doing something wrong.

Chris

euman at bellsouth.net wrote:
> zHello Chris,
> 
> You must use BEGIN ... END block that defines the resource. 
> are you setting your .rc up this way?
> 
> Euman
> 
> ----- Original Message ----- 
> From: "Chris Bensler" <bensler at mail.com>
> 
> > Is there a specific method to assigning resoure id's?
> > 
> > I have a window with an mle in it, and assigned an id of 200.
> > There is an onResize event that resizes the mle.
> > Apparently, the onResize event is triggered before the mle is created, 
> > and the event tries to resize that control anyways. It turns out that 
> > 200, is the desktop 'Start' button, and ends up being resized.
> > 
> > Is there a certain range of numbers that I'm supposed to use?
> > 
> > I'm not using win32lib.
> > 
> > Chris
> 
>

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu