|
|
|
|
Forum
Please
Log In
to post a new message or reply to an existing one. If you are not registered, please
register.
NOTE: Some forums may be read-only if you are not currently subscribed to
our technical support services.
Subject |
Author |
Date |
|
Kenan Hrustanovic
|
Mar 12, 2005 - 9:22 AM
|
Hello dear support team, I am trying to paint an owner rectangle with g_PaintManager that should look like an CExtButton on mouse hower mode in Office2003 style. I found the static method CExtPaintManager::stat_PaintDotNet3dRect() but it doesn’t work if I try something like that: CDC _dc; CRect _rect; m_myWindowToPaint.GetClientRect(&_rect); g_PaintManager->stat_PaintDotNet3dRect( _dc, _rect, RGB(x1,y1,z1), RGB(x2,y2,z2) ); Is there any simple solution to draw Office2003 like owner rectangles with g_PaintManager? PS: Here you can see an image in order to show what I mean. http://user.cs.tu-berlin.de/~kenhru/owner_draw_rect.jpg Thanks, Kenan.
|
|
Kenan Hrustanovic
|
Mar 12, 2005 - 9:31 AM
|
Please re-type the symbol ~ before ’kenhru’ in your browser address window Thanks
|
|
Technical Support
|
Mar 12, 2005 - 1:34 PM
|
First of all, the URL in your message displays some text page in German instead of a JPEG image. We guess you need to paint the button background. This can be done by invoking the g_PainManager->PaintPushButton() API. You will need to create and fill the CExtPaintManager::PAINTPUSHBUTTONDATA object. You can take a look how it is done in the Prof-UIS sources.
|
|
Kenan Hrustanovic
|
Mar 13, 2005 - 6:17 AM
|
Thanks! That works very fine! Here is the source code for people with same problem: CPaintDC dc(this); CRect _rcClient; CDC _dc; // The rect Area to paint out like CExtButton background myWindowToPaint.GetClientRect(_rcClient); CExtPaintManager::PAINTPUSHBUTTONDATA _ppbd( this, // CObject * pHelperSrc TRUE, // bHorz rcClient, // rectClient (LPCTSTR)"", // sText NULL, // pIcon TRUE, // bFlat TRUE, // bHover FALSE, // bPushed FALSE, // bIndeterminate TRUE, // bEnabled FALSE, // bDrawBorder FALSE, // bDrawFocusRect TRUE, // bDefaultPushButton 0, // nAlign NULL, // hFont FALSE, // bDropDown 0, // nHelperSysCmdID FALSE // bTransparent ); g_PaintManager->PaintPushButton(_dc, _ppbd);
|
|