Skip to main content
gamedev.net
🔒 Locked

ScrollView MFC

Started by vadim85 Oct 12, 2004 at 1:22 PM 2 replies 1.4k views
Original Post
vadim85
vadim85
I want to implement scrollbars for openGl scene That what I’m doing: IMPLEMENT_DYNCREATE(COglView, CScrollView) void COglView::OnInitialUpdate() { CScrollView::OnInitialUpdate(); CSize sizeTotal; CRect clientRec; GetClientRect(clientRec); sizeTotal = GetTotalSize(); sizeTotal.cx = (clientRec.Width())*m_GLManager.GetScaleFactor(); sizeTotal.cy = (clientRec.Height())*m_GLManager.GetScaleFactor(); SetScrollSizes(MM_TEXT, sizeTotal); } OnZoomin function: m_scalefactor += 0.1; OnDrawScene function glScalef(m_scalefactor,m_scalefactor,m_scalefactor); to “scroll” the scene I’m using glTranslatef(m_TranslateX,m_TranslateY,m_TranslateZ); Now my question how to find the relationship between position of the scroll bar and how I should increase/decrease m_TranslateX and m_TranslateY parameters ??? Please help me, it’s really urgent . Thank you. P.S some example could be very help
vadim85
vadim85
No body knows?? :(
I realy need it!!!

Thank you
vadim85
vadim85
It is not right place for my post???

Thank you?
iNsAn1tY
iNsAn1tY
I can help, but I'll have to look up some MFC stuff beforehand. Your problem doesn't look too hard to solve, but I don't use CScrollViews very often (in fact, I don't like using them full stop. They don't integrate with OpenGL very well at all). Plus, I'm going out in a while. Anyway, I'll post this evening or tomorrow...
My opinion is a recombination and regurgitation of the opinions of those around me. I bring nothing new to the table, and as such, can be safely ignored.[ Useful things - Firefox | GLee | Boost | DevIL ]

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.