ListView_DeleteItem

Started by Anonymous, October 10, 2004, 08:35:32 PM

Previous topic - Next topic

Anonymous

Hello,

I would like it if you could add a wrapper to delete an entry from a listview.

Thanks!

John

Roger Garstang

I 2nd that one...also others like getting the length of text in controls...these could even be used within the other functions that get the length now instead of using MAX_PATH which is a big plus now that GET and SET commands for controls are consistant.

Also the other Registry data types would be great, or even a universal function that accepts a parameter for the data type and sets the size accordingly, etc.

TechSupport

Great ideas. I'll do my best to get them into FireFly.

TechSupport

Quote from: jptchiI would like it if you could add a wrapper to delete an entry from a listview.

Done. FF_ListView_DeleteItem will be in the next update.

TechSupport

Quote from: Roger GarstangI 2nd that one...also others like getting the length of text in controls...these could even be used within the other functions that get the length now instead of using MAX_PATH which is a big plus now that GET and SET commands for controls are consistant.
FF_Control_GetTextLength is now implemented and will be in the next update.

QuoteAlso the other Registry data types would be great, or even a universal function that accepts a parameter for the data type and sets the size accordingly, etc.
Roger, do you have any canned code already built for this kind of stuff that I could easily steal from you?  ;)

Roger Garstang

Which kind of stuff.  I posted a good Tooltip here and I think even at PB.  Make an FF_AddTooltip.

TechSupport

Hi Roger,

Sorry - I meant the Registry functions. I have your Tooltip code and I hope to get it into FireFly shortly.

Roger Garstang

Oh, not really.  I had a little function that just set %REG_DWORD much like you made only it ran in a For loop- 8 TO 12 to turn off PST files in all versions of Office back at a Helpdesk job I had.  It not only did that, but edited MAPISVC.INF and scanned the entire drive for pst files which it deleted.  All in 34K...but they decided to use a 3MB SMS push that took 15min to run and 3 weeks to deploy and test...that's business for ya.

All I'd really need is storing DWORD and both types of strings which could could be ran from the same function since the only difference is the type specifier saying the strings expand %'s.  Then I was thinking if the type has to be specified you might as well combine them all and just specify the data size in a CASE structure or something.


FUNCTION UpdateReg() AS LONG
LOCAL hKey AS LONG
LOCAL subKey AS STRING
LOCAL parameter AS STRING
LOCAL value AS DWORD
LOCAL Result AS LONG
LOCAL officeVersion AS DWORD

parameter= "DisablePst"
value= 1

FOR officeVersion= 8 TO 12
   subKey= $MAINKEY + "\" + FORMAT$(officeVersion) + ".0\Outlook"
   IF RegCreateKeyEx(%HKLM, BYVAL STRPTR(subKey),0, "", %REG_OPTION_NON_VOLATILE, %KEY_ALL_ACCESS, BYVAL %NULL, hKey, Result) <> %ERROR_SUCCESS THEN
       RegCloseKey hKey
       FUNCTION= 0
       EXIT FUNCTION
   END IF
   RegSetValueEx(hKey, BYVAL STRPTR(parameter), 0, %REG_DWORD, value, 4)
   RegCloseKey hKey
NEXT officeVersion
FUNCTION= 1
END FUNCTION