API Window and GDI question
Posted: Tue May 10, 2005 11:43 pm
				
				i taked a look to some api sources and i try to create a window using API only! Atm i have following source...
Hope there is no problem!? Whats the real Win32 API name of #PB_Window_BorderLess ? How can i draw a box and text with GDI (again API only) on this window?
			Code: Select all
Procedure WindowCallback(Window, Message, wParam, lParam) 
  Select Message 
      Case #WM_CLOSE 
        DestroyWindow_(Window) 
        Result  = 0 
      Case #WM_DESTROY 
        PostQuitMessage_(0) 
        Result  = 0 
      Default 
        Result  = DefWindowProc_(Window, Message, wParam, lParam) 
  EndSelect 
  ProcedureReturn Result 
EndProcedure 
#Style  =   #WS_EX_TOPMOST|#PB_Window_BorderLess
#StyleEx  = #WS_EX_TOOLWINDOW   
;--------------
WindowClass.s  = "Test" 
wc.WNDCLASSEX 
wc\cbSize  = SizeOf(WNDCLASSEX) 
wc\lpfnWndProc  = @WindowCallback() 
wc\hCursor  = LoadCursor_(0, #IDC_CROSS) 
wc\hbrBackground  = CreateSolidBrush_($0) 
wc\lpszClassName  = @WindowClass 
RegisterClassEx_(@wc) 
;--------------
lWindowWidth  = 400
lWindowHeight = 300
hWnd  = CreateWindowEx_(#StyleEx, WindowClass, "", #Style, 0, 0, lWindowWidth, lWindowHeight, 0, 0, 0, 0) 
UpdateWindow_(hWnd) 
ShowWindow_(hWnd,#SW_SHOWNORMAL) 
SetForegroundWindow_(hWnd)  
While GetMessage_(msg.MSG, 0, 0, 0 ) 
  TranslateMessage_(msg) 
  DispatchMessage_(msg) 
Wend