      global define
c       include "WINDEF.INC"
c       include "WINNT.INC"
c       include "WINBASE.INC"
c       include "ERRNO.H"
	include "WINDOWS.INC"
      end
	
	integer function SEARCH
	implicit none
        integer g_hInstance		! application Instance handle
	integer g_hWndFrame		! handle of frame window
        common /mrwe/ g_hInstance, g_hWndFrame
        
	integer		hWndList
	character	cListName*9
	
	cListName = 'listbox'//char(0)
	print *, g_hWndFrame
	print *, g_hInstance
	
	hWndList = 0
        hWndList = CreateWindow(val(LOC(cListName)),val(0),
     &		val(WS_CHILD .or. WS_VISIBLE),
     &		val(CW_USEDEFAULT), val(CW_USEDEFAULT), 
     &		val(CW_USEDEFAULT), val(CW_USEDEFAULT), 
     &		val(g_hWndFrame),
     &		val(1), val(g_hInstance), 
     &		val(0))

	print *, hWndList
	
        if (hWndList == 0) return

c        call ShowWindow(val(hWndFrame), val(nCmdLine))
c	call UpdateWindow(val(g_hWndFrame))

c	call DestroyWindow( val(hWndList) )

	SEARCH = hWndList
		
	return
	end

