Click here to Skip to main content
15,907,913 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CAsyncSockets Blocking/Non blockung Pin
ForNow16-Apr-15 10:38
ForNow16-Apr-15 10:38 
QuestionInitialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen15-Apr-15 14:59
Bram van Kampen15-Apr-15 14:59 
AnswerRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Richard MacCutchan15-Apr-15 21:37
mveRichard MacCutchan15-Apr-15 21:37 
GeneralRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen26-Apr-15 14:39
Bram van Kampen26-Apr-15 14:39 
AnswerRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
bling17-Apr-15 9:49
bling17-Apr-15 9:49 
GeneralRe: Initialisation of a Structure, Can anyone see the Obvious? Pin
Bram van Kampen26-Apr-15 14:31
Bram van Kampen26-Apr-15 14:31 
QuestionBuild errors ! Pin
Member 935023715-Apr-15 3:01
Member 935023715-Apr-15 3:01 
SuggestionRe: Build errors ! Pin
David Crow15-Apr-15 3:06
David Crow15-Apr-15 3:06 
GeneralRe: Build errors ! Pin
Member 935023715-Apr-15 3:16
Member 935023715-Apr-15 3:16 
GeneralRe: Build errors ! Pin
Richard Andrew x6415-Apr-15 5:48
professionalRichard Andrew x6415-Apr-15 5:48 
GeneralRe: Build errors ! Pin
Member 935023715-Apr-15 6:04
Member 935023715-Apr-15 6:04 
QuestionRe: Build errors ! Pin
David Crow15-Apr-15 6:54
David Crow15-Apr-15 6:54 
GeneralRe: Build errors ! Pin
David Crow15-Apr-15 6:51
David Crow15-Apr-15 6:51 
GeneralRe: Build errors ! Pin
Brisingr Aerowing15-Apr-15 11:22
professionalBrisingr Aerowing15-Apr-15 11:22 
SuggestionRe: Build errors ! Pin
Richard MacCutchan15-Apr-15 7:19
mveRichard MacCutchan15-Apr-15 7:19 
QuestionMFC: flickering issue with GDI+ Pin
Member 1128851411-Apr-15 20:27
Member 1128851411-Apr-15 20:27 
GeneralRe: MFC: flickering issue with GDI+ Pin
David Crow12-Apr-15 16:55
David Crow12-Apr-15 16:55 
GeneralRe: MFC: flickering issue with GDI+ Pin
Stephen Hewitt15-Apr-15 10:41
Stephen Hewitt15-Apr-15 10:41 
QuestionDrawing border to dialog using GDI+ Pin
Member 1128851411-Apr-15 19:30
Member 1128851411-Apr-15 19:30 
I modified my dialog to a polygon region dialog. Then i am trying to frame/draw the border.Using device context the CRgn::FrameRgn, i am bale to draw the border around the dialog. But i want to achieve this using Gdi+. I did as below, but the border is appearing only on left and top of the dialog. Can someone please help on this.
CPoint vertex[4];
BOOL CPolygonDlg::OnInitDialog()
{
    CDialogEx::OnInitDialog();

    ModifyStyle(WS_CAPTION,0);
    ModifyStyle(WS_BORDER,0);

     CRect rect(400,200,900,700);
     CRect wr = rect;
    AdjustWindowRect( wr, 0, FALSE );
    MoveWindow(wr); 

    GetClientRect( rect );
    CRect csr = rect;
    ClientToScreen( csr );

    vertex[0] = CPoint(rect.left,rect.top);
    vertex[1] = CPoint(rect.right,rect.top);
    vertex[2] = CPoint(rect.right,rect.bottom);
    vertex[3] = CPoint(rect.left,rect.bottom);

     m_rgnShape.CreatePolygonRgn( vertex, 4, ALTERNATE );
    m_rgnShape.OffsetRgn( CPoint( csr.TopLeft() - wr.TopLeft() ) );
    SetWindowRgn( (HRGN)m_rgnShape.Detach(), TRUE );
    m_rgnShape.CreatePolygonRgn( vertex, 4, ALTERNATE );

    return TRUE;  // return TRUE  unless you set the focus to a control
}

void CPolygonDlg::OnPaint()
{
Graphics graphics(dc.m_hDC);
    CRect rect;
    GetClientRect(rect);
GraphicsPath gp;
    Point point[4];
    point[0] = Point(rect.left,rect.top);
    point[1] = Point(rect.right,rect.top);
    point[2] = Point(rect.right,rect.bottom);
    point[3] = Point(rect.left,rect.bottom);
    gp.AddPolygon(point,4);
    Pen pen(Color(255, 255, 0, 0));
    graphics.DrawPath(&pen, &gp);
}

AnswerRe: Drawing border to dialog using GDI+ Pin
Richard MacCutchan11-Apr-15 21:24
mveRichard MacCutchan11-Apr-15 21:24 
GeneralRe: Drawing border to dialog using GDI+ Pin
Member 1128851412-Apr-15 9:19
Member 1128851412-Apr-15 9:19 
GeneralRe: Drawing border to dialog using GDI+ Pin
Richard MacCutchan12-Apr-15 21:35
mveRichard MacCutchan12-Apr-15 21:35 
QuestionEdit control: number validation Pin
lor7510-Apr-15 7:58
lor7510-Apr-15 7:58 
AnswerRe: Edit control: number validation Pin
jeron110-Apr-15 8:18
jeron110-Apr-15 8:18 
QuestionRe: Edit control: number validation Pin
David Crow10-Apr-15 10:58
David Crow10-Apr-15 10:58 

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.