- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
When using DlgSetSub to draw on a Owner Draw button, I use:
DlgSetSub(XDlg, ID_OnDraw, XWnd_OnDraw, DLG_DRAWITEM)
but it have take effect once I use a DlgModal(XDlg), but I want to
this drawing can be realised without DlgModal(XDlg) following behind, how can I do this?
Or we can ask how to draw on a Owner Draw button repeatedly once a dialog is initialized?
DlgSetSub(XDlg, ID_OnDraw, XWnd_OnDraw, DLG_DRAWITEM)
but it have take effect once I use a DlgModal(XDlg), but I want to
this drawing can be realised without DlgModal(XDlg) following behind, how can I do this?
Or we can ask how to draw on a Owner Draw button repeatedly once a dialog is initialized?
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't quite follow you. Why would you draw on something which isn't displayed? The drawing callback is invoked whenever the button needs to be (re)displayed, and it will never take place if the dialog is not shown.
Do you need some sort of animation? In this case, you have to ensure that the button gets continuously redrawn by doing an InvalidateRect or XUpdateWindow, but calling it from an external routine, such as a WM_TIMER callback. In the DLG_DRAWITEM callback, just make sure to draw accordingly, based on some sort of (global) time variable. See the old XFLOGM sample for an example.
Do you need some sort of animation? In this case, you have to ensure that the button gets continuously redrawn by doing an InvalidateRect or XUpdateWindow, but calling it from an external routine, such as a WM_TIMER callback. In the DLG_DRAWITEM callback, just make sure to draw accordingly, based on some sort of (global) time variable. See the old XFLOGM sample for an example.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
basically done with XFLOGM, Thank you very much!

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page