A
Alhexx
Guest
I'm currently writing a raw hex viewer control for my archive decompressor project called CHexViewCtrl. Here's a small screenshot.
The CHexViewCtrl class is derived directly from CWnd.
I have added a CScrollBar to give the user the possibility to scroll through the file.
However, the default MFC CScrollBar class has a maximum Scroll range of 32,767. This usually does not matter, since the class is able to handle bigger ranges now.
But there's a problem:
When receiving the SB_THUMBTRACK or SB_THUMBPOSITION message, the OnVScroll method of my derived class passes the current position in a variable called nPos (UINT). However, these two messages only give valid positions when the scrolling position is less than 32K.
Does anyone have an idea how to get around this problem and make the scrollbar want to cooperate with me?
- Alhexx
EDIT: CHexViewCtrl is the name of the control, the name of the archive decompressor is Kaddy
The CHexViewCtrl class is derived directly from CWnd.
I have added a CScrollBar to give the user the possibility to scroll through the file.
However, the default MFC CScrollBar class has a maximum Scroll range of 32,767. This usually does not matter, since the class is able to handle bigger ranges now.
But there's a problem:
When receiving the SB_THUMBTRACK or SB_THUMBPOSITION message, the OnVScroll method of my derived class passes the current position in a variable called nPos (UINT). However, these two messages only give valid positions when the scrolling position is less than 32K.
Does anyone have an idea how to get around this problem and make the scrollbar want to cooperate with me?
- Alhexx
EDIT: CHexViewCtrl is the name of the control, the name of the archive decompressor is Kaddy