c++ - Scroll Bars Won't work in mfc application -


I have a visual class for my MFC app that is supposed to allow the easy scroll bar to inherit the CSrollView class Comes in. I can get scroll bars at a certain point, like when I zoom in on the stuff displayed in the scene, but when I try to scroll to the left, nothing happens, I have two hours This is done online research and I can not tell what I am doing wrong. Here are my manual () and onional update () methods in the View category:

  Zero CWaveEditView :: OnDraw (CDC * pDC) {CWaveEditDoc * pDoc = GetDocument (); ASSERT_VALID (pDoc); If (! PDC) return; // TODO: Add Draw code for native data here WaveFile * wave = & amp; PDoc-> Wave; If (wave-> HDR == tap) {return; } // Get the window dimensions. Kurt Rect; GetClientRect (Rect); // COLORREF COLORREG COLORREG = RGB (0, 255, 0) for color and wave set in color; CPN Pen 2 (PS_SOLID, 0, color); PDC- & gt; Selection Object (& amp; Pen 2); CBbrush brush 2 (color); PDC- & gt; Selection object (& amp; brush2); // If any selection is selected (select Start! = Selectionind) {PDC-> Rectangle (selection restart, 0, selectionind, rect.ite ()); } // wave pdc draw-> Move (0,0); Int x; (X = 0; x & lt; zoomAmount * wave- & gt; final sample / scaling; x ++) {// assume that the whole file will fit in the window, for every x value in the window // find us equivalent Sample float value in wave file = wav-> Get_sample ((int) (x * scaling / zoom amount)); // We also need to fit the sound in the Y axis goes from reset to the top of the window from Y axis 0. Sound goes from 32768 to 32767 / /. Int y = (int) ((wal + 32768) * (rect.Height () - 1) / (32767 + 32768)); PDC- & gt; Linto (X, Rect.Hight () - Y); } Maximize Maximize; TotalSize.cx = x; SetScrollSizes (MM_TEXT, totalSize); } Zero CWaveEditView :: OnInitialUpdate () {CScrollView :: OnInitialUpdate (); // Size the initial scroll size size; Kurt Rect; CWaveEditDoc * doc = GetDocument (); Wavefile * Ripple & amp; Doctor- & gt; Wave; GetClientRect (Rect); Scaling = wave-> Final sample / rect. With (); SizeTotal.cx = 700; SizeTotal.cy = 700; Setcroll size (MM_TEXT, size total); }  


Comments

Popular posts from this blog

ios - How do I use CFArrayRef in Swift? -

eclipse plugin - Run java code error: Workspace is closed -

c - Error on building source code in VC 6 -