Hi,
     The attachemets is my fisrt pratice with win32asm. A small bug happened today ,and I cant resolve it now.I need you help ,any advice or suggestion will be very much appreciated.
      Bug Description:
           It is a half-done Oscilliscope like app, use to display a wave (now   a random wave generated by pesudo num )on client area;you drag the below blue circle's arm ( a frequency adjust knob) to adjust the wave shift speed---- 1:18 of knob's position/angle.
           The bug is : when close the app and open again .the previous speed NUM displayed on the status bar ,part 2,is not correct. The speed num only work correctly in the life of when this app runs.
     It's may fail at  reading and saving setting.ini file or iShiftPixels conversation.
     But I don't know where.
     ...
     Despite of  that ,it's a good GDI demo for those Newbies ,I think.Hope U could  download and try it.

    Thanks in advance.

       
   
               
Posted on 2005-11-15 08:37:16 by Luckrock
Hello,Luckrock

1. the moving curve is sparkling.
2. add the coordinates.
3. auto resize the region that display the curve.

regards.
Posted on 2005-11-16 07:01:05 by dcskm4200
Thanks for your useful advise:
   what you say:
1. the moving curve is sparkling.

    Good advice,I didn't think of it before,you remind me of it. it  because the curve is updated at EVERY WM_TIMER message ,and this timer I set 50ms,So this cause 20FPS speed of the wave display.And this may cause you feel the curve sparkling. I will adjust it soon;
2. add the coordinates

    Sure, this will be finally a neccessory element of it.
3. auto resize the region that display the curve.

    something I am not clear ,do you mean ZOOM  the curve along the Y co-ordinate?
           
    with my best regards
Posted on 2005-11-16 22:38:26 by Luckrock
.ELSEIF uMsg==WM_SIZE
mov    eax, lParam      ; Height/width of new window
mov    ebx, eax
and    ebx, 0000ffffh  ; ebx = LOWORD(lparam) = width
shr    eax, 16            ; eax = HIWORD(lparam) = height
...
invoke MoveWindow,hwndXXX, 2, 2, ebx, eax, TRUE
...
Posted on 2005-11-17 08:27:44 by dcskm4200
And where does those magic "2" constants come from?
Posted on 2005-11-17 08:33:46 by f0dder
hello,F0dder
if nothing exist on Left and top, it is constant. else it is variable.
regards
Posted on 2005-11-17 08:41:58 by dcskm4200
Why not 0? Why "2"? If it's used to specify some window border thickness, this is the wrong way to do it - think what will happen with a custom window manager (ie, XP themes, or things like blackbox or other custom shells/skinning engines).
Posted on 2005-11-17 08:50:00 by f0dder
Hi,Gentlemen
   It's my fault,and have been revised already last day.

   .elseif uMsg==WM_SIZE
        ;Get the client area window width and height
        LOWORD lParam
    m2m ClientAreaWidth,  eax  ; client area width
    HIWORD lParam
        m2m ClientAreaHeight, eax  ; client area height
       
        ;re-size status bar window
        invoke GetWindowRect,hStatus,ADDR rect                     
        mov eax, rect.bottom
        sub eax, rect.top                                           
        sub ClientAreaHeight, eax                                 
       
        invoke MoveWindow,hStatus,0,0,0,0,TRUE


     Addtionly, I turn to learn to and debug the "WINIO.LIB", please down "parallel debug tool" and "barre.rar" ,unzip and run it again.
     You could find the" Parallel debug tool" could read correctly the data that I set in ParPort.asm .
     
     This's the my first MASM pratice,and still many features un-implemented and many mistakes there.
     This weekend I will deal with these bugs.But I am an amateur and an newbie to masm.
      I hope you could  continue to care and help with it.
       
    With My best regards.
Posted on 2005-11-17 10:12:47 by Luckrock