Re: Combo box edit control 'children'
- Posted by Ad Rienks <kwibus at DOLFIJN.NL> Oct 07, 1999
- 443 views
Wolf, I'm in a hurry right now, haven't got much time, but I think what you're looking for is called a 'DropDownList' in Win32Lib. If possible, I will have a look at your code tonight, or maybe David's got an answer, if he's not to ill. BTW, why do you use puts() and printf() next to each other, where a single printf() would work too? Bye, ^ | /-\<| On Thu, 7 Oct 1999 11:18:36 -0400, wolfgang fritz <wolfritz at KING.IGS.NET> wrote: >Could anyone tell me why this won't work? >I'm trying to get the handle of an edit control window in a combo box, >using the example in win32.hlp: >( Creating a Combo-box Toolbar ), which is in 'C". >I can't seem to get any valid "ChildWindowFromPoint" values. > >...Thanks for any help, Wolf > >--start code-- >include win32lib.ew >without warning >atom junk > >global constant Win = >create(Window,"edit-control",0,0,0,200,200,0), >--to find edit control child of combo. {C_LONG,C_POINTER},C_LONG), > >combo=create(Combo,"",Win,20,10,150,60,0), > >puts(1,"\nlinkFunc_id=") printf(1,"%d",{findchild}) >puts(1,"\nwin32lib_combo_id=") printf(1,"%d",{combo}) > >sequence txt >txt={"one","two","three"} > >--the 'points' structure >atom points > points = allocate(8) > poke4(points,1) > poke4(points+4,1) > >procedure onLoad_Win() >atom childhandle,winhandle > >--add some list items to both combo's >for j=combo to s_combo do >for k = 1 to 3 do >addItem( j, sprintf( "%s", {txt[k]})) >end for >end for > >--send CB_SETCURSEL message to first combo >junk=sendMessage(combo,CB_SETCURSEL,2,0) --( item #3,zero indexed! ) >puts(1,"\nlist_index=") printf(1,"%d",{junk}) > >winhandle=getHandle(combo) >puts(1,"\nwin_id_of_combo=") printf(1,"%d",{winhandle}) > >childhandle=c_func(findchild,{winhandle,points}) >puts(1,"\nwin_id_of_edit_control=") printf(1,"%d",{childhandle}) >end procedure > >onOpen[ Win ] = routine_id( "onLoad_Win" ) >WinMain( Win, Normal ) >--end code--