Hi, Mal!
> -----Original Message-----
> From: anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com [mailto:anthemion-
> devtools%40yahoogroups.com">devtools
yahoogroups.com] On Behalf Of wxwidgetninja
> Sent: Friday, September 21, 2007 6:31 AM
> To: anthemion-devtools%40yahoogroups.com">anthemion-devtools
yahoogroups.com
> Subject: [anthemion-devtools] Can someone throw me a bone? Working with
> wxPaintDC (and others) withing DB
>
> Hi all,
>
> Could someone help me with adding a wxPaintDC to a sizer within DB?
??? adding to a sizer?
>
> What is the easiest/fastest method of implementing a wxPaintDC (and if
> the methodology differs with other DC's then a little more explanation
> please) within DB (4,15) in order to reasonably quickly prototype their
> use witin a dialog?
wxPaintDC is mainly for OnPaint event handlers
>
> Basically I was toying with the idea of using a wxPaintDC as a sort of
> print preview within a dialog. there would be a listbox, containing a
> set of strings, and each string would be simply styled
> (font/size/justification) with optionally a colour (black for all but
> the string selected in the listbox which should be red).
1) Would not a wxClientDC be better suited?
2) Could you elaborate?
>
> I was hoping that this would be reasonably simple within DB.
>
> Thanks
> Mal
>
>
>
I'm a bit lost. DB doesn't instantiate wxDC's, so anything dealing with a
wxDC derived class would be hand coding and DB has not real help in this
respect.
I think what you're looking for (and I'm only spit balling it here) is a
combination, within an appropriate event handler, of wxMemoryDC and
wxClientDC. You use the wxMemoryDC as a "canvas" to do your drawing, then
use the wxClientDC to blit the wxMemoryDC to the client area.
I'd give you more help in this area (as much as I could, anyway!;) if one or
both of 2 things were true:
1) You have a .pjd illustrating what you want to do (an example, not
necessarily your project you're coding).
2) I were finished setting up my new system.
As always, I find discussing/trouble shooting a topic is more easily done if
all parties concerned are looking at the same thing, i.e., the same DB
project (.pjd). I have what might possibly be a couple of examples for you,
but right now I cannot access them readily since I'm trying to get my new
system set up. However, I do have wxWidget-2.8.5 and DB on my new system, so
and example from you would allow me to play around and see what it is you're
trying to do.
Although your description here is a bit "sketchy", I'll fire up DB and see
what I can see!;)
thx,
Dave S.
.