WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Dialog Editor version 6.X
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Dialog with No Title bar


; Remove title bar from main program window

#DefineFunction MyDialogCallbackProc(MyDialog_Handle,MyDialog_Message,MyDialog_ID,rsvd1,rsvd2)
   MSG_INIT=0                ; The one-time initilization
   MSG_TIMER=1               ; Timer event
   MSG_BUTTONPUSHED=2        ; Pushbutton or Picturebutton
   switch MyDialog_Message
      case 0 ;MSG_INIT
		  SWP_FRAMECHANGED	=	32
		  HWND_TOP	=	0
		  SWP_NOMOVE	=	2
		  SWP_NOSIZE	=	1
  
		   ;Hide Title Bar
			WS_CAPTION=12582912  ;12582912 Hex 00C00000  (Search MSDN for Q111011 for more parameter values)
			GWL_STYLE=-16
			User32=StrCat(DirWindows(1),"USER32.DLL")
			OldStyle=DllCall(User32, long:"GetWindowLongA", long:MyDialog_Handle, long:GWL_STYLE)
			NewStyle=OldStyle & ~WS_CAPTION
			DllCall(User32, long:"SetWindowLongA", long:MyDialog_Handle, long:GWL_STYLE, long:NewStyle)
			DllCall(user32, long:"SetWindowPos", long:MyDialog_Handle, long:HWND_TOP, long:0, long:0, long:0, long:0, long:SWP_FRAMECHANGED|SWP_NOMOVE|SWP_NOSIZE)
			DialogProcOptions(MyDialog_Handle,MSG_BUTTONPUSHED,@TRUE)
			break
      return(-1)

     case MSG_BUTTONPUSHED  ;ID 001
        return(-1)      ;  Do default processing

   endswitch       ; MyDialog_Message
   return(-1)      ;  Do default processing
#EndFunction       ;End of Dialog Callback MyDialogCallbackProc


MyDialogFormat=`WWWDLGED,6.1`

MyDialogCaption=`Test`
MyDialogX=041
MyDialogY=056
MyDialogWidth=265
MyDialogHeight=129
MyDialogNumControls=002
MyDialogProcedure=`MyDialogCallbackProc`
MyDialogFont=`DEFAULT`
MyDialogTextColor=`DEFAULT`
MyDialogBackground=`DEFAULT,DEFAULT`
MyDialogConfig=0

MyDialog001=`103,090,033,011,PUSHBUTTON,DEFAULT,"OK",1,1,32,DEFAULT,DEFAULT,DEFAULT`
MyDialog002=`062,058,129,011,STATICTEXT,DEFAULT,"Text goes here",DEFAULT,3,DEFAULT,"MS Serif|9421|70|18","0|0|0",DEFAULT`

ButtonPushed=Dialog("MyDialog")

Exit



Article ID:   W15906
File Created: 2004:03:30:15:41:40
Last Updated: 2004:03:30:15:41:40