 |
|
 |
Thx, I like it, it was usefull for me
|
|
|
|
 |
|
 |
replace the WM_NCPAINT handler with the following code:
LRESULT OnNcPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/)
{
RECT rect, client;
GetWindowRect(&rect);
GetClientRect(&client);
POINT pt = {0,0};
::MapWindowPoints(m_hWnd, NULL, &pt, 1);
::OffsetRect(&client, pt.x-rect.left, pt.y-rect.top);
CWindowDC dc(m_hWnd);
dc.ExcludeClipRect(&client);
HPEN hOldPen = dc.SelectPen(m_hPen);
rect.right -= rect.left;
rect.bottom -= rect.top;
rect.left = rect.top = 0;
dc.Rectangle(&rect);
dc.SelectPen(hOldPen);
return 0;
}
Please let me know if this can be written more beautiful.
...and if you believe in God, that's because of the Devil // MCMXC a.D.
|
|
|
|
 |
|
 |
Is there a CXPCombobox? Or xpEditbox?
|
|
|
|
 |
|
 |
About using DDX:
when using DDX_control(IDC_XXX, m_xxx)in DDX map instead of "m_xxx.SubclassWindow(GetDlgItem(IDC_XXX));",it does not work! Is there any tricks in WTL DDX?
Thanks!
|
|
|
|
 |
|
 |
yeah, repaint of edit box is not good. When you drag window atop of editbox and close it, the text inside editbox doesn't refresh.
Other thing is that the text inside buttons is not centered correct then there are underlined letters for example: "&Open". As I see it center thinking that text is 5 letters, but it is only four: Open.
It will be cool if you make radio buttons and check boxes in addition to your "header" lib.
Best Regards,
Vassil Keremidchiev
|
|
|
|
 |
|
 |
My request:
XP-style titlebar.
Any chances of this happening?
|
|
|
|
 |
|
 |
I'd like to create an Edit Box control in WTL,but I don't now how to do it.Thanks for your help.Further more,I create an Edit Box in ATL,but it can't display unicode correctly,I expect you show me the answer.Thank you.
|
|
|
|
 |
|
 |
AS in CComCompositeControl<>
I use it in Web Explorer Dialog,but SubclassWindow() no effect...... How can I do? Please help!
|
|
|
|
 |
|
 |
Check if you have added REFLECT_NOTIFICATIONS() to msg map.
Sorry for the late reply.
|
|
|
|
 |
|
 |
I use it in Web Explorer Dialog,but SubclassWindow() no effect...... How can I do? Please help!
|
|
|
|
 |
|
 |
I mean the colors. Or, put in other words, it doesnt respect system colors (or, theme for that matter). When you do NOT use the default XP blue theme, the control looks pretty misplaced.
int x=1, y=5;
x^=y^=x^=y; <a href="http://www.codeproject.com/tips/StupidXORTrick.asp" target="_blank">ClickHereForHelp();</a>
|
|
|
|
 |
|
 |
...in the edit control.
Otherwise nice owner drawn controls.
|
|
|
|
 |
|
 |
An explanation of what "painted in XP style" means would be helpful. Otherwise, good article.
|
|
|
|
 |
|
 |
Yes, I will surely add a bit more explanation when I update the article.
|
|
|
|
 |