Bekz.net - (14016 of 825951 - 2%) 

 Home | Tips & Tricks | General Info | Downloads | NG Archive | Links | Email | Search | Register | Users | Login

 


 

Tips & Tricks

 

Rating: 100% (1 votes registred)
Rate this item:

Back to list

How can I add a file to the windows documents menu?

NOTE: The file extension *must* be registered, if not the function
will fail. The file name must contain the full path.

#define SHARD_PATH 2
Function Test()
LOCAL cFile := "c:\f5\test\readme.txt"

ShAddToRecentDocs( SHARD_PATH, cFile )

Return nil

//-----------------------------------------------
Function SHAddToRecentDocs(uFlags,cFullPathFile )
local hDLL, uResult, cFarProc

hDLL := LoadLib32( "Shell32.dll" )

IF Abs( hDLL ) <= 32
   MsgAlert( "Error code: " + LTrim( Str( hDLL ) ) +;
             " loading " + "Shell32.dll" )
ELSE
   cFarProc = GetProc32( hDLL,"SHAddToRecentDocs", .T., 7, 7, 8)
   uResult  = CallDLL32( cFarProc,uFlags,cFullPathFile + Chr(0) )
   FreeLib32( hDLL )
ENDIF

RETURN uResult

 

 

 

 

© 2002 Bekz.net, Inc. All Rights Reserved.