Home > Software engineering >  Did anyone understand the chat program source code (VC MFC)?
Did anyone understand the chat program source code (VC MFC)?

Time:10-02

The MFC application is how to realize the function of personal Settings in the options users face?? Detailed points, trouble to inform, hope my side not achieve them, drop-down list is empty, a rookie, hope to understand people glad, online, etc.,

CodePudding user response:

Search "high imitation QQ MFC"

CodePudding user response:

Need the ListBox

CodePudding user response:

refer to the second floor xiaohuh421 response:
need custom painting ListBox
this is combox ah!

CodePudding user response:

reference yingjifeng6468 reply: 3/f
Quote: refer to the second floor xiaohuh421 response:

Need a custom painting ListBox
this is combox,

Sorry, wrong, it is the combobox

CodePudding user response:

reference 4 floor xiaohuh421 response:
Quote: reference yingjifeng6468 reply: 3/f

Quote: refer to the second floor xiaohuh421 response:

Need a custom painting ListBox
this is combox,

Sorry, wrong, that is, since the draw combobox
how to custom painting?????? I see someone else's source code have AdvCombox CPP and AdvCombox h, but open to, and without any handler,,,

CodePudding user response:

MingQQ v1.0 high copy version _ source code

CodePudding user response:

reference 4 floor xiaohuh421 response:
Quote: reference yingjifeng6468 reply: 3/f

Quote: refer to the second floor xiaohuh421 response:

Need a custom painting ListBox
this is combox,

Sorry, wrong, that is, since the draw combobox
eldest brother, combox drop-down list control how to display images ahhh?????? Solving, online, etc., is very urgent,

CodePudding user response:

https://msdn.microsoft.com/en-us/library/windows/desktop/hh298423 (v=versus 85). Aspx

CodePudding user response:

Baidu. Custom painting, after setting the ownerdraw attribute, custom painting the combobox
This case has a complete file to load and display
Although there is no comment, but should be able to read.
 
Void CComboBoder: : DrawItem (LPDRAWITEMSTRUCT LPDRAWITEMSTRUCT)
{
Int Index=lpDrawItemStruct - & gt; ItemID.
If (Index>=0)
{
BODERBMP boder={0};
If (getBoderInfo (boder, Index))
{
The CDC dc;
Dc. Attach (lpDrawItemStruct - & gt; HDC);
CRect rc=lpDrawItemStruct - & gt; RcItem;


COLORREF bkClr=RGB (255255255);
COLORREF txtClr=0;
If (lpDrawItemStruct - & gt; ItemState & amp; ODS_SELECTED)
{
TxtClr=bkClr;
BkClr=RGB (49106197);

}
Dc. FillSolidRect (& amp; Rc, bkClr);

CBitmap BMP.
If (FALSE==BMP. LoadBitmap (boder. SrcBmpId))
{
OutputDebugString (TEXT (" load erro "));
}
BITMAP bt={0};
BMP. GetBitmap (& amp; Bt);
CSize bmpSize;
Cx=bmpSize. Bt. BmWidth;
BmpSize. Cy=bt. BmHeight;
Int offsetY=(rc) Height () - bmpSize. Cy)/2;
If (offsetY<1)
{
OffsetY=1;
}
Cstrings Str.
Str. The Format (TEXT (" % d "), bmpSize. Cy);
//OutputDebugString (Str);
//GetLBText (Index, Str);
Rc. InflateRect (2, 1);
Dc. SetBkColor (bkClr);
Dc. SetTextColor (txtClr);
Dc. TextOut (rc) left, rc, top, Str);

The CDC memDC;
MemDC. CreateCompatibleDC (& amp; Dc);
CBitmap. * pOldBmp=(CBitmap *) memDC SelectObject (& amp; BMP);
Dc. BitBlt (rc) left + 10, rc. The top + offsetY, bmpSize. Cx, bmpSize. Cy, & amp; MemDC, 0, 0, SRCCOPY);
MemDC. SelectObject (pOldBmp);
MemDC. DeleteDC ();


Dc. Detach ();
}
}
}

CodePudding user response:

Imitation QQ program is seen,

CodePudding user response:

reference 1/f, zhao teacher reply:
search "high imitation QQ MFC"

And see the teacher,
  • Related