Click here to Skip to main content
16,008,175 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow can i scroll mi Msflexgrid Pin
saravana0011-Nov-07 3:24
saravana0011-Nov-07 3:24 
AnswerRe: How can i scroll mi Msflexgrid Pin
chandu0041-Nov-07 3:31
chandu0041-Nov-07 3:31 
GeneralRe: How can i scroll mi Msflexgrid Pin
saravana0011-Nov-07 3:39
saravana0011-Nov-07 3:39 
GeneralRe: How can i scroll mi Msflexgrid Pin
chandu0041-Nov-07 3:46
chandu0041-Nov-07 3:46 
GeneralRe: How can i scroll mi Msflexgrid Pin
saravana0011-Nov-07 3:55
saravana0011-Nov-07 3:55 
GeneralRe: How can i scroll mi Msflexgrid Pin
chandu0041-Nov-07 4:01
chandu0041-Nov-07 4:01 
GeneralRe: How can i scroll mi Msflexgrid Pin
alan931-Nov-07 5:23
alan931-Nov-07 5:23 
GeneralHere is the solution Pin
chandu0045-Nov-07 1:58
chandu0045-Nov-07 1:58 
hai,
i worked on your problem and arrived to this solution.
here is the 5 lined logic to scroll the flex grid using the mouse wheel.
1.add the PreTranslateMessage event to your dialog.
2.in the pretranslate message, add the following code.
<br />
if(pMsg->hwnd==m_g.m_hwnd)//m_g is your grid variable.<br />
{<br />
if(pMsg->message==WM_MOUSEWHEEL && pMsg->wParam==4287102976)<br />
m_g.SetTopRow(m_g.GetTopRow()+1);<br />
else if(pMsg->message==WM_MOUSEWHEEL && pMsg->wParam==7864320 && m_g.GetTopRow()>1)<br />
m_g.SetTopRow(m_g.GetTopRow()-1);<br />
}

3.in the above logic, the values indicated in bold depends on the size of your grid on your dialog.
4.so, you have to find them out in debug mode. if you donot know how to find them out, then i can help you.
5.any more doubts also then you are welcome.

--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.

Questionhelp Pin
philiptabraham1-Nov-07 2:54
philiptabraham1-Nov-07 2:54 
QuestionRe: help Pin
David Crow1-Nov-07 2:59
David Crow1-Nov-07 2:59 
AnswerRe: help Pin
philiptabraham1-Nov-07 3:09
philiptabraham1-Nov-07 3:09 
GeneralRe: help Pin
David Crow1-Nov-07 3:12
David Crow1-Nov-07 3:12 
GeneralRe: help Pin
philiptabraham1-Nov-07 3:24
philiptabraham1-Nov-07 3:24 
GeneralRe: help Pin
chandu0041-Nov-07 3:27
chandu0041-Nov-07 3:27 
GeneralRe: help Pin
David Crow1-Nov-07 3:32
David Crow1-Nov-07 3:32 
GeneralRe: help Pin
philiptabraham1-Nov-07 3:37
philiptabraham1-Nov-07 3:37 
QuestionRe: help Pin
David Crow1-Nov-07 3:50
David Crow1-Nov-07 3:50 
QuestionRe: help Pin
chandu0041-Nov-07 3:15
chandu0041-Nov-07 3:15 
AnswerRe: help Pin
philiptabraham1-Nov-07 3:32
philiptabraham1-Nov-07 3:32 
AnswerRe: help Pin
philiptabraham1-Nov-07 3:34
philiptabraham1-Nov-07 3:34 
GeneralRe: help Pin
chandu0041-Nov-07 3:41
chandu0041-Nov-07 3:41 
GeneralRe: help Pin
philiptabraham1-Nov-07 3:55
philiptabraham1-Nov-07 3:55 
GeneralRe: help Pin
chandu0041-Nov-07 3:58
chandu0041-Nov-07 3:58 
Questionhow to add an backrground image in a form? Pin
panthal1-Nov-07 2:51
panthal1-Nov-07 2:51 
AnswerRe: how to add an backrground image in dialog? Pin
chandu0041-Nov-07 2:54
chandu0041-Nov-07 2:54 

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.