Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

VC++ force redraw

  • 16-03-2002 4:11pm
    #1
    Registered Users, Registered Users 2 Posts: 310 ✭✭


    Lo,

    I creating a VC++ app using MFC. So I have among other classes, the doc class and the view class. My problem is this. When the application starts it draws my stuff (graphics I have defined in my doc class) on the client area. But I can't for the life of me figure out out to update the view after this process. When I change a certain part of the data that the grpahics use I can't seem to get the changes reflected in the screen. Obviously i need to call my view classes onDraw function but this takes a pointer to a CDC object. I don't know how to get a pointer to the view object from my doc object. I thought there was a function like Invalidate() or Update() that I can call from the doc object but they don't seem to work. This has to be easy to do. I know how to do it in ordinary VC++ (not using MFC). The only books I have are them useless * in 21 days book. MSDN is not very helpful either although I am still searching there. This has to be easy to do?? I was thinking about creating a member variable of type CDC in the Doc object and have the view object set this to the correct pointer to the device context when it draws the first time around but there has to be an easier way to do it. Any help appreciated.


Advertisement