#$KContents:

Auto Resource Workshop
Auto Implib
WinGrep
BCWFIND functions

#$KBCWFIND.DLL Functions:

GetBCWProjectItem
GetBCWProjectItems
GetBCWProjectName
GetBCWProjectWindow
GetBCWWindow
GotoBCWFileAndLineNumber

#$KGetBCWProjectItem

Declaration:
BOOL PASCAL FAR _export GetBCWProjectItem(HWND hWndBCWProject, int index, LPSTR name, LPSTR location);

Parameters:
hWndBCWProject
	Handle to the BCW project window. The handle is usually the one returned by GetBCWProjectWindow.
	
index
	Index to the project item. The value is zero-based.
	
name
	Buffer for storing the name of the project item. The buffer is usually filled with name+extension, but sometimes BCWFIND is able to compute the full path name. In this case the full path name (drive+directory+name+extension) is stored in name and location is empty. Because name can be filled with the full path name the buffer should be at least 144 characters long.
	
location
	Buffer for returning the location of the project item. If BCWFIND is not able to compute the full path name of the item location is usually filled with ".", but it can also be filled with "subdir", "..", "..\.." "e:..\subdir" or the like. The buffer should be at least 144 chacters long.

Returns
GetBCWProjectItem return succes or not. If GetBCWProjectItem thinks everything went OK it returns TRUE otherwise FALSE.

See also: GetBCWProjectWindow

#$KGetBCWProjectItems

Declaration:
int  PASCAL FAR _export GetBCWProjectItems(HWND hWndBCWProject);

Parameters:
hWndBCWProject
	Handle to the BCW project window. The handle is usually the one returned by GetBCWProjectWindow.

Returns
GetBCWProjectItems returns the number of items in the project(window). Note: this value is usually 1 more than there actually are because the project window contains an extra empty item allowing the user to move down an empty item.

See also: GetBCWProjectWindow, GetBCWProjectItem

#$KGetBCWProjectName

Declaration:
BOOL PASCAL FAR _export GetBCWProjectName(LPSTR buf);

Parameters:
buf
	Buffer to receive the full path name of the project file. This buffer should be at least 144 characters long.

Returns
GetBCWProjectName returns wether or not it was able to compute the full name of the project file. On success it return TRUE. on failure it returns FALSE. Possible failures: BCW not running, no project loaded or no file is being edited.

See also: GetBCWProjectWindow

#$KGetBCWProjectWindow

Declaration:
HWND PASCAL FAR _export GetBCWProjectWindow(void);

Returns
GetBCWProjectWindow returns the handle to the BCW project window or NULL on error.

See also: GetBCWProjectName

#$KGetBCWWindow

Declaration:
HWND PASCAL FAR _export GetBCWWindow(void);

Returns
GetBCWWindow returns the handle to the BCW window or NULL on error. There are only two possible errors: BCW is not loaded or it is not BCW 3.1

See also: GetBCWProjectWindow

#$KGotoBCWFileAndLineNumber

Declaration:
BOOL PASCAL FAR _export GotoBCWFileAndLineNumber(LPSTR FileName,int LineNumber);

Parameters:
FileName
	Name of the wanted file.
	
LineNumber
	The number of the line.

NOTE:
Currently GotoBCWFileAndLineNumber does not goto the file and line number. The reason is that I could not get it right. First i could not get BCW to invoke any of its dialog boxes (File|Open or Search|Goto line number) and finally when I succeeded Window broke down. Oh well...

If the file requested is not opened the file name is inserted into the Clipboard otherwise the line number is inserted into the Clipboard. In this way the user can easily open the file or go to the line.

I would be very pleased if someone told me how to fool BCW into thinking that the user want to open a certain file and/or goto a line number.