-
January 28th, 2003, 02:44 PM
#16
I am such an idiot. The reason I thought that OnInitMenuPopup() only gets called once was because I put a break point in there and since it didn't break I assumed.. well, silly me for not realizing that the reason it wasn't breaking was because the string "Files List" no longer exists after the first time (I over write it)! so with this minor modification, I now have a pop up menu that dynamically loads a list of files and refreshes.
pPopupMenu->GetMenuString(i, str, MF_BYPOSITION);
nID = pPopupMenu->GetMenuItemID( i);
if(str == "Files List" || nID == ID_EXTERNAL_LIST_1 )
I can make this even more simple by replacing the above 3 lines with the following 2 lines
nID = pPopupMenu->GetMenuItemID( i);
if(nID == ID_FILE_LIST || nID == ID_EXTERNAL_LIST_1 )
ID_FILE_LIST is the command ID of "Files List"
too cool. ;-)
Thanks!!!!!!!
Jim
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|