I compiled and ran your program. Works (sortof) on my computer

Every second or so it adds a new menu item with a number on it. Isn't that what you want ? If you want to just update an existing menu item instead of adding a new one (which makes more sense to me) than call SetMenuItemInfo() instead of AppendMenu() inside that timer event handler function.