How to Refresh the Start Menu
Keywords: start menu dllcall shortcut shortcutmake update startmenu
Question:
There must be some kind of SendMessage or *something* to tell the start menu to refresh. When we add a bunch of icons and stuff to the start menu, the functions do not always "take" right away.Is there some message we could send it ?
Answer:
Use the following code to refresh the Programs\WinBatch subfolder of the Start Menu:mydir = strcat(ShortCutDir("Start Menu"),"Programs\WinBatch") bb=BinaryAlloc(2048) BinaryPokeStr(bb,0,mydir) dllfile=strcat(dirwindows(1),"shell32.dll") DllCall(dllfile, void:"SHChangeNotify", long:4096, long:1, lpbinary:bb, lpbinary:bb) ;Message("Debug",BinaryPeekStr(bb,0,200)) BinaryFree(bb)
Article ID: W13329Filename: Refresh the Start Menu.txt