I'm having trouble understanding how to handle update events. I'm going to walk through what I've tried and what happened, maybe someone can fill in where I've gone wrong or what I'm missing.
For reference this is what the window looks like to start, a simple window with a list with two items, a button, a roundrect around the button, a rect, and some text:
First - if you dont handle updateEvt and your window is drawn over and then comes back - everything that was drawn over will be missing
Ok, so lets handle the updateEvt
Ok, a bit better - the button and list are there, but the text in the list is chopped off, the rect around the button is gone, the DrawString "here" is gone, and my bar next to the button is gone.
The books and docs seem to stop here - not giving me pointers on HOW to update the rest. Any guidance appreciated!
For reference this is what the window looks like to start, a simple window with a list with two items, a button, a roundrect around the button, a rect, and some text:
First - if you dont handle updateEvt and your window is drawn over and then comes back - everything that was drawn over will be missing
Ok, so lets handle the updateEvt
C:
case updateEvt:
BeginUpdate((WindowPtr)e->message);
DrawControls((WIndowPtr)e->message);
EndUpdate((WindowPtr)e->message);
Ok, a bit better - the button and list are there, but the text in the list is chopped off, the rect around the button is gone, the DrawString "here" is gone, and my bar next to the button is gone.
The books and docs seem to stop here - not giving me pointers on HOW to update the rest. Any guidance appreciated!