블로그 이미지
안녕1999

카테고리

전체 (3067)
자바스크립트 (20)
안드로이드 (14)
WebGL (4)
변비 (17)
정치,경제 (35)
C언어,ARM (162)
컴퓨터(PC, Note Book, 윈.. (41)
전자회로, PCB (27)
유머,안웃긴,GIF,동영상 (118)
국부론60 (71)
모듈(PCB) (3)
건강 (2)
FreeCAD (25)
PADS (43)
퇴직,퇴사,구직,취업 활동 (3)
C# (86)
엑셀 (8)
워드 (0)
LabView (6)
레고 (30)
FPGA (0)
Total
Today
Yesterday

달력

« » 2024.5
1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31

공지사항

최근에 올라온 글

'CScrollBar'에 해당되는 글 1건

  1. 2016.09.02 GetScrollBarCtrl Win32?

CScrollView에서 GetScrollBarCtrl 을 호출해 봤지만, NULL리턴


CScrollBar *pCScrollBar;

pCScrollBar=((CScrollView*)m_pCScrollView)->GetScrollBarCtrl(SB_HORZ);


win32 API용 GetScrollBarCtrl 함수는 없는듯.(윈도우 자체 내장된 스크롤바는 윈도우가 아닌듯)


CScrollBar* CView::GetScrollBarCtrl(int nBar) const
{
    ASSERT(nBar == SB_HORZ || nBar == SB_VERT);
    if (GetStyle() & ((nBar == SB_HORZ) ? WS_HSCROLL : WS_VSCROLL))
    {
        // it has a regular windows style scrollbar (no control)
        return NULL;
    }
    
    CWnd* pParent = GetParentSplitter(this, TRUE);
    if (pParent == NULL)
        return NULL;            // no splitter
    
    UINT nID = _AfxGetDlgCtrlID(m_hWnd);
    if (nID < AFX_IDW_PANE_FIRST || nID > AFX_IDW_PANE_LAST)
        return NULL;            // not a standard pane ID
    
    // appropriate PANE id - look for sibling (splitter, or just frame)
    UINT nIDScroll;
    if (nBar == SB_HORZ)
        nIDScroll = AFX_IDW_HSCROLL_FIRST + (nID - AFX_IDW_PANE_FIRST) % 16;
    else
        nIDScroll = AFX_IDW_VSCROLL_FIRST + (nID - AFX_IDW_PANE_FIRST) / 16;
    
    // return shared scroll bars that are immediate children of splitter
    return (CScrollBar*)pParent->GetDlgItem(nIDScroll); 

} 


Posted by 안녕1999
, |

최근에 달린 댓글

글 보관함