of_getmdiframe


pfcwnsrv.pbl   >   pfc_n_cst_menu   >   of_getmdiframe   

Full name pfc_n_cst_menu.of_getmdiframe
Access public
Extend of integer
Return value integer
Prototype public function integer of_getmdiframe(menu,ref window)

Name Datatype
No Data

Name Datatype
lb_foundframe boolean
lw_obj window

public function integer of_getmdiframe (menu am_source, ref window aw_frame);//////////////////////////////////////////////////////////////////////////////
//
//	Function:  		of_GetMDIFrame
//
//	Access:  		public
//
//	Arguments:		none
//	am_source		The menu for which to find the MDI frame
//	aw_frame			The frame window found (if any) passed by reference.
//						Returns a NULL value if the MDI frame window could not be
//						obtained.
//
//	Returns:  		Integer.
//						1 if it succeeds and -1 if an error occurs.
//
//	Description:  	Returns the MDI frame window (if any).
//
//////////////////////////////////////////////////////////////////////////////
//
//	Revision History
//
//	Version
//	5.0   Initial version
//
//////////////////////////////////////////////////////////////////////////////
//
//	Copyright © 1996-1997 Sybase, Inc. and its subsidiaries.  All rights reserved.
//	Any distribution of the PowerBuilder Foundation Classes (PFC)
//	source code by other than Sybase, Inc. and its subsidiaries is prohibited.
//
//////////////////////////////////////////////////////////////////////////////

window	lw_obj
boolean	lb_foundframe=False

//Check arguments
If Not IsValid(am_source) or IsNull(am_source) Then
	SetNull (aw_frame)
	Return -1
End If

//Get the window that owns the Menu object.
lw_obj = am_source.ParentWindow

//Search until no more windows or a MDI type window is found.
Do While IsValid (lw_obj)
	If lw_obj.windowtype = mdi! or lw_obj.windowtype = mdihelp! Then
		//Found a MDI Frame
		lb_foundframe = true
		Exit
	Else
		//Look in the window's parent (if any)
		lw_obj = lw_obj.ParentWindow()
	End if
Loop

If Not lb_foundframe Then
	//MDI Frame was not found
	SetNull (aw_frame)
	Return -1
End If

//MDI Frame was found
aw_frame = lw_obj
Return 1

end function

     
Name Owner
pfc_n_cst_winsrv_preference.of_restore pfc_n_cst_winsrv_preference
pfc_n_cst_winsrv_preference.of_restore pfc_n_cst_winsrv_preference
pfc_n_cst_menu.of_triggerevent pfc_n_cst_menu
pfc_n_cst_menu.of_sendmessage pfc_n_cst_menu
pfc_m_master.m_window.selected m_window

     
Name Owner
window.parentwindow window
systemfunctions.isnull systemfunctions
systemfunctions.isvalid systemfunctions
systemfunctions.setnull systemfunctions

     
Full name
No Data

     
Name Scope
No Data