Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries. Thanks for all your past and future contributions.
A tip to debug Draw() function of a control class
A custom contral generally overrides the CCoeControl::Draw() method to implement its own drawing stuff. However, when stepping into the code with the debugger, the result of each command is not displayed immediatly on screen because of the cache mechanism implemented by the window server.
Happily enough, you can get rid of this behaviour, and have each drawing function being rendered immediatly on screen. Add the following code in your AppUi::ConstructL():
This force each Graphic Context draw commands to show up immediately, rather than when the window server client buffer is next flushed.
This means you can step through the draw code and see the effect each line is having. However, you must ensure this line does not make it into released software as it has efficiency implications.