Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
M

MaTrIX2k2

@MaTrIX2k2
About
Posts
46
Topics
31
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Problems with a check box
    M MaTrIX2k2

    this is my code: IMPLEMENT_DYNAMIC(CAUICheckBox, CButton) CAUICheckBox::CAUICheckBox() { m_bCheckBtn=FALSE; m_bPressBtn=FALSE; m_bOldTemp=FALSE; m_clrHigh=globalData.clrHilite; m_clrCheck=RGB(0,0,0);//RGB(0,170,170); m_bSelected=FALSE; m_Checked = FALSE; } CAUICheckBox::~CAUICheckBox() { } BEGIN_MESSAGE_MAP(CAUICheckBox, CButton) ON_WM_LBUTTONDOWN() ON_WM_LBUTTONUP() ON_WM_ERASEBKGND() ON_WM_MOUSEMOVE() ON_WM_MOUSEOUT() ON_WM_KEYDOWN() ON_MESSAGE(BM_SETCHECK, OnSetCheck) ON_MESSAGE(BM_GETCHECK, OnGetCheck) END_MESSAGE_MAP() // CAUICheckBox message handlers BOOL CAUICheckBox::OnEraseBkgnd(CDC *pDC) { return TRUE; } LRESULT CAUICheckBox::OnGetCheck(WPARAM wParam, LPARAM lParam) { return m_Checked; } // End of OnGetCheck void CAUICheckBox::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) { CDC *pDC=CDC::FromHandle(lpDrawItemStruct->hDC); CRect m_rcClient=lpDrawItemStruct->rcItem; UINT m_State=lpDrawItemStruct->itemState; CBrush cb; CRect m_rcTemp=m_rcClient; CPoint pt; CSize m_Csize; CString m_szCaption; COLORREF m_Over=RGB(255,193,111); CPen cpOver(PS_SOLID,1,RGB(255,193,111)); int iMode=pDC->SetBkMode(TRANSPARENT); int iExtile=GetButtonStyle(); //obtenemos orientación del texto CRect m_rcText=m_rcClient; GetWindowText(m_szCaption); if(m_szCaption.GetLength() > 1) m_Csize= pDC->GetTextExtent(m_szCaption); //de acuerdo a la alineación del texto prepare la ubicación //del texto para Drawtex y DrawState if (m_rcClient.Height() > 13) { int Dif=m_rcClient.Height()-13; Dif/=2; m_rcTemp.top=Dif; m_rcTemp.bottom=m_rcTemp.top+13; } if (iExtile & BS_LEFTTEXT) { m_rcTemp.left= m_rcTemp.right-13; pt=CPoint(m_rcTemp.left,m_rcTemp.top+1); } else { m_rcTemp.right= m_rcTemp.left+13; pt=CPoint(m_rcTemp.right+2,m_rcTemp.top+1); m_rcText.left=m_rcTemp.right+1; } //draw frame of checkbox pDC->FillSolidRect(m_rcTemp,globalData.clrWindow); pDC->Draw3dRect(m_rcTemp,globalData.clrBtnDkShadow,globalData.clrBtnHilite);//clrBtnLight); m_rcTemp.DeflateRect(1,1); pDC->Draw3dRect(m_rcTemp,globalData.clrBtnShadow,globalData.clrBtnFace); //DrawOrange(pDC,m_rcTemp); m_rcTemp.DeflateRect(1,1); if (lpDrawItemStruct->itemState & ODS_DISABLED) pDC->DrawState(pt, m_Csize, m_szCaption, DSS_DISABLED, TRUE, 0, (HBRUSH)NULL); else { pDC->DrawText(m_szCaption,m_rcText,DT_SINGLELINE|DT_LEFT|DT_VCENTER); if(lpDrawItemStruct->itemState & ODS_SELECTED||m_Checked) {

    C / C++ / MFC question

  • Problems with a check box
    M MaTrIX2k2

    I've made my own check box and put it into my dialog, everything is fine, but when i call the DDX_Check, this return no value, i've used a BOOL option to set as true or false, when is checked or unchecked, but nothing happens, nothing is registered, my check box is a CButton derived class, what's wrong?

    C / C++ / MFC question

  • How to replace the ScrollBar on a List & Combo Box
    M MaTrIX2k2

    I've thought that too, but if i do, i'll have to map the mouse and key events by my own, i only want to replace the classic scroolbar by one of my own, withou mapping the events, is there another way?:confused:

    C / C++ / MFC tutorial

  • How to replace the ScrollBar on a List & Combo Box
    M MaTrIX2k2

    I want to replace it by one of my own ;P

    C / C++ / MFC tutorial

  • How to access protected member of CDockBar
    M MaTrIX2k2

    but i can't believe that, the GetDockedControlBar is supposed to be protected member and not private, so how can i acces this?

    C / C++ / MFC question tutorial

  • How to access protected member of CDockBar
    M MaTrIX2k2

    new error "syntax error : CDockBarEx", now this error appear, i'm confused???

    C / C++ / MFC question tutorial

  • How to access protected member of CDockBar
    M MaTrIX2k2

    I've derived a class from CDockBar, it's called CDockBarEx but i still having the same problem, why is this?

    C / C++ / MFC question tutorial

  • How to access protected member of CDockBar
    M MaTrIX2k2

    I need to get the GetDockedControlBar option of CDockBar, but it says that is a protected member, how can i access to this?

    C / C++ / MFC question tutorial

  • CDockContext
    M MaTrIX2k2

    If i'm using the CDockContext, how can i take a picture of the bar that's using this, i want to know this to try to make a code similar so the one in OXP.

    C / C++ / MFC question

  • Showing content of wnd while moving
    M MaTrIX2k2

    Is there anyway to make an window that shows the content while moving(dragging), the toolbars don't have this also if i disable that option on the main window setting i won't see the content, so i want to make something to this, could anybody help me?:)

    C / C++ / MFC help question

  • Is ther anyway to disable the menu animations for menus
    M MaTrIX2k2

    Only for my selected menus, not all.

    C / C++ / MFC

  • n i disableHow can i disable the shadows for the menus...
    M MaTrIX2k2

    How can i disable the shadows for my CMenu derived class without disabling the shadows for the main menus under Windows XP?

    C / C++ / MFC question

  • AnimateWindow(), problem
    M MaTrIX2k2

    My Window is a CMiniFrameWnd, and i added this, so i don't get anything to be shown, what's wrong?

    C / C++ / MFC help question

  • AnimateWindow(), problem
    M MaTrIX2k2

    When i use the AnimateWindow my window is animated, but i don't see any control, my OnPaint() is not called, why?

    C / C++ / MFC help question

  • Get Icons from ToolBars
    M MaTrIX2k2

    Not To the toolbar, i only want to get the icons from the toolbar to draw it to my menu, a bitmapped fakemenu.

    C / C++ / MFC tutorial

  • Get Icons from ToolBars
    M MaTrIX2k2

    I've made a menu using a Window, but i need to know how to get the icons from the toolbars. :confused:

    C / C++ / MFC tutorial

  • Can't use the CMenu options in the OnPaint under VC++ 7
    M MaTrIX2k2

    I'm trying to get the strings of my CMenu, but it returns an error, why is this? :confused:

    C / C++ / MFC c++ help question

  • ReleaseDC is not working
    M MaTrIX2k2

    is not working either :confused:

    C / C++ / MFC

  • ReleaseDC is not working
    M MaTrIX2k2

    I'm making a window that acts as a menu, see: this is my command: ShowMenu(BOOL bFromKey, int x, int y,CWnd* pParent, HMENU hMenu) and i have a CMenu named m_pMenu i convert the hMenu into a CMenu: m_pMenu->m_hMenu = hMenu; this is ok, now i create my window using the CreateEx command, after my window is created i call another class called DrawMenuItem, this one get the size of all the menuitems stored in the m_pMenu, after get the size of the items, i assing the size to the window using the MoveWindow, after this the window is showed using the ShowWindow, then i call the ReleaseDC to make m_pMenu free for use for every class, but here's the problem when the menu is showed it call the OnPaint, in this i paint the background and i draw the menu text for the menuitems, but the m_pMenu is empty in this, why if it's supposed to be the m_pMenu of the ShowMenu command?

    C / C++ / MFC

  • ReleaseDC is not working
    M MaTrIX2k2

    why ReleaseDC is not saving my information.

    C / C++ / MFC
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups