Click here to Skip to main content
15,896,537 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionEdit box problem......... Pin
ani_ikram9-Sep-08 17:32
ani_ikram9-Sep-08 17:32 
AnswerRe: Edit box problem......... Pin
Naveen9-Sep-08 17:48
Naveen9-Sep-08 17:48 
QuestionArrays and Enums in an extended control Pin
poppabaggins9-Sep-08 16:31
poppabaggins9-Sep-08 16:31 
AnswerRe: Arrays and Enums in an extended control Pin
Naveen9-Sep-08 16:44
Naveen9-Sep-08 16:44 
GeneralRe: Arrays and Enums in an extended control Pin
poppabaggins10-Sep-08 4:05
poppabaggins10-Sep-08 4:05 
Questionhow draw semi transparent object Pin
nattyting9-Sep-08 15:54
nattyting9-Sep-08 15:54 
AnswerRe: how draw semi transparent object Pin
SandipG 9-Sep-08 20:35
SandipG 9-Sep-08 20:35 
GeneralRe: how draw semi transparent object Pin
nattyting9-Sep-08 21:08
nattyting9-Sep-08 21:08 
void UIRectangle::Draw(CDC* ip_dc, bool i_selected)
{
double x1 = m_rectangle.GetTopLeft().GetX();
double y1 = m_rectangle.GetTopLeft().GetY();
double x2 = m_rectangle.GetBottomRight().GetX();
double y2 = m_rectangle.GetBottomRight().GetY();

m_alphablend.BlendOp = AC_SRC_OVER;
m_alphablend.BlendFlags = 0;
m_alphablend.SourceConstantAlpha = 0;
m_alphablend.AlphaFormat = 0;

if(i_selected)
{
CPen pen(PS_DASH, 1, RGB(m_color_line.GetRed(), m_color_line.GetGreen(), m_color_line.GetBlue()));
CPen* old_pen = ip_dc->SelectObject(&pen);

ip_dc->Rectangle(x1, y1, x2, y2);
ip_dc->SelectObject(old_pen);
}

else
{
CPen pen(PS_SOLID, 2, RGB(m_color_line.GetRed(), m_color_line.GetGreen(), m_color_line.GetBlue()));
CPen* old_pen = ip_dc->SelectObject(&pen);

CBrush brush(RGB(m_color_fill.GetRed(), m_color_fill.GetGreen(), m_color_fill.GetBlue()));
CBrush* old_brush = ip_dc->SelectObject(&brush);

//ip_dc->SelectStockObject(HOLLOW_BRUSH);

ip_dc->Rectangle(x1, y1, x2, y2);
ip_dc->SelectObject(old_pen);
ip_dc->SelectObject(old_brush);

//ip_dc->SetBkMode(TRANSPARENT);
}
}

___________________________________________________________________________________________________

this is my code. i just add those BLENDFUNCTION m_alphablend; inside. but it seem no work. anything else i need to add into it? thanksssss!
GeneralRe: how draw semi transparent object Pin
SandipG 9-Sep-08 21:18
SandipG 9-Sep-08 21:18 
GeneralRe: how draw semi transparent object Pin
nattyting9-Sep-08 21:35
nattyting9-Sep-08 21:35 
GeneralRe: how draw semi transparent object Pin
nattyting10-Sep-08 20:47
nattyting10-Sep-08 20:47 
GeneralRe: how draw semi transparent object Pin
SandipG 10-Sep-08 23:05
SandipG 10-Sep-08 23:05 
Questionhow to remove border of web browser object Pin
only_jack9-Sep-08 10:34
only_jack9-Sep-08 10:34 
AnswerRe: how to remove border of web browser object Pin
Naveen9-Sep-08 14:04
Naveen9-Sep-08 14:04 
GeneralRe: how to remove border of web browser object Pin
only_jack10-Sep-08 6:08
only_jack10-Sep-08 6:08 
QuestionWM_SETTEXT and Virtual Address Space [modified] Pin
sawerr9-Sep-08 10:26
sawerr9-Sep-08 10:26 
AnswerRe: WM_SETTEXT and Virtual Address Space Pin
Mark Salsbery9-Sep-08 12:13
Mark Salsbery9-Sep-08 12:13 
GeneralRe: WM_SETTEXT and Virtual Address Space Pin
sawerr9-Sep-08 12:27
sawerr9-Sep-08 12:27 
GeneralRe: WM_SETTEXT and Virtual Address Space Pin
Mark Salsbery9-Sep-08 12:48
Mark Salsbery9-Sep-08 12:48 
GeneralRe: WM_SETTEXT and Virtual Address Space Pin
sawerr9-Sep-08 13:00
sawerr9-Sep-08 13:00 
GeneralRe: WM_SETTEXT and Virtual Address Space Pin
Mark Salsbery9-Sep-08 13:32
Mark Salsbery9-Sep-08 13:32 
AnswerRe: WM_SETTEXT and Virtual Address Space Pin
Mark Salsbery9-Sep-08 12:56
Mark Salsbery9-Sep-08 12:56 
GeneralRe: WM_SETTEXT and Virtual Address Space Pin
sawerr9-Sep-08 13:07
sawerr9-Sep-08 13:07 
Questionhow to get registry subkey value using c++ Pin
adhilingam9-Sep-08 6:14
adhilingam9-Sep-08 6:14 
AnswerRe: how to get registry subkey value using c++ Pin
Perspx9-Sep-08 6:59
Perspx9-Sep-08 6:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.