ShowShiftDifferenceFilterDlg Example for Visual Basic

Private Sub ShiftDifference_Click()
	Dim RasterImgEfxDlg As New LEADRasterDlgImgEfx_U
	Dim RasterKrnDlg As New LEADRasterDlgKrn_U
	Dim nRet As Integer

	RasterKrnDlg.InitDlg 0
	RasterImgEfxDlg.SpatialFilterType = FLT_SHIFTDIFF_HORZ
	RasterImgEfxDlg.UIFlags = SHIFTDIFFERENCEFILTER_SHOW_PREVIEW Or _
								SHIFTDIFFERENCEFILTER_SHOW_TOOL_ZOOMLEVEL

	RasterImgEfxDlg.Bitmap = LEAD1.Bitmap
	nRet = RasterImgEfxDlg.ShowShiftDifferenceFilterDlg(hWnd)
	If (nRet = 0 And RasterImgEfxDlg.DialogStatus = DLG_OK) Then
		LEAD1.SpatialFilter RasterImgEfxDlg.SpatialFilterType
	End If
	RasterKrnDlg.FreeDlg
End Sub