-
May 30th, 2003, 08:32 PM
#1
Context Menu
I have created a CFormView which displays some graphics and using a timer, the graphics will be constanly updated.
As i need to have a context menu, I have used the CMenu::TrackPopupMenu() function to display the menu that i have created. However i have a problem with this. When the menu is displayed by calling the TrackPopupMenu() function, the graphics in the CFormView does not get refreshed. When the menu is closed, the CFormView will be updated again but when the menu is being displayed the graphics will not be updated.
It seems that the menu is being displayed very much like a domodal dialog box......Is there a solution to this problem???
-
May 30th, 2003, 09:01 PM
#2
One solution is a UI thread.
Kuphryn
-
May 31st, 2003, 07:50 AM
#3
Originally posted by kuphryn
One solution is a UI thread.
Kuphryn
Wat is a UI thread??
-
May 31st, 2003, 08:16 AM
#4
CM
Hello Lim,
I just want to know if you found a solution for that.
thx.
-
May 31st, 2003, 08:50 AM
#5
Re: CM
Originally posted by adiior
Hello Lim,
I just want to know if you found a solution for that.
thx.
Not i still have no idea how to solve it. Someone suggested that using the TPM_NONOTIFY and TPM_RETURNCMD flags will force the menu to act modally but i don't think these 2 flags existed and i never set these 2 flags anyway
-
May 31st, 2003, 09:07 PM
#6
SetTimer uses WM_TIMER so you're not going to be able to
process these while the context menu is up, really don't think
there is a way to modify the behavior.
Instead of using SetTimer, maybe you could try the multimedia
timers instead, they don't rely on messaging. Just check the
msdn for any of these functions, they'll bring you to the timer
section. It'll be a quick change to the code to see if this will do
it for you.
timeSetEvent
'TimeProc'
timeBeginPeriod
timeEndPeriod
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
|