Alaska Software Inc. - why cant i fill 2x Ownerdraw Listbox together ?
Username: Password:
AuthorTopic: why cant i fill 2x Ownerdraw Listbox together ?
AUGE_OHRwhy cant i fill 2x Ownerdraw Listbox together ?
on Mon, 17 Oct 2011 02:46:09 +0200
hi,

i did use Pablos "working" Ownerdraw Sample and modify it this way :

#include "common.ch"
proc main(cAction)
DEFAULT cAction TO ""

IF EMPTY(cAction)
   for n := 1 to 10
      oLbx1:addItem( StrZero(n,3))
   next
ENDIF
IF EMPTY(cAction)
   for n := 1 to 10
      oLbx2:addItem( StrZero(n,3))
   next
ENDIF
 any Parameter
IF .NOT. EMPTY(cAction)
   FillIt(oLbx1,oLbx2)
ENDIF
...

PROCEDURE FillIt(oLbx1,oLbx2)
local n
n:=1
for n := 1 to 10
   oLbx1:addItem( StrZero(n,3))
next
n:=1
for n := 1 to 10
   oLbx2:addItem( StrZero(n,3))
next
return

please compile  link attach Source and run it with  without Parameter ( 
any key ... )

when try to use FillIt(oLbx1,oLbx2) 1st Listbox XBP_DRAW_OWNERADVANCED
look like 2nd Listbox using XBP_DRAW_OWNER

... it look like 1st Listbox "fall-back" to XBP_DRAW_OWNER ???

greetings by OHR
Jimmy 




TEST.PRG
Pablo BotellaRe: why can´t i fill 2x Ownerdraw Listbox together ?
on Mon, 17 Oct 2011 09:55:51 +0200
Hi,

calling the exe with 1 param shows the issue, but the funny thing is that adding 
@user32:SetWindowLongA( oLbx1:GetHWnd() , GWL_ID , 0x100 )
after oLxb1:Create() 
seems fix the trouble

Regards,
Pablo
AUGE_OHRRe: why cant i fill 2x Ownerdraw Listbox together ?
on Mon, 17 Oct 2011 19:54:56 +0200
hi,

> calling the exe with 1 param shows the issue, but the funny thing is that 
> adding
> @user32:SetWindowLongA( oLbx1:GetHWnd() , GWL_ID , 0x100 )
> after oLxb1:Create()
> seems fix the trouble

so "missing" Control ID have to do with this BUG ?!

greetings by OHR
Jimmy
AUGE_OHRRe: why cant i fill 2x Ownerdraw Listbox together ?
on Mon, 17 Oct 2011 20:07:30 +0200