Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

Q about docking framework

2009-07-29
2013-05-28
  • Todor Totev
    Todor Totev
    2009-07-29

    In VS 2008, when I re-arrange dockable windows, in the cross there are 5 options - 4 of them position the window next to the anchoring one, but the middle option makes a new tab and the two windows share the same part of the screen. Will this be implemented in win32++?

     
    • David
      David
      2009-07-30

      Hi Todor,

      Win32++ already does this, it was a feature introduced in version 6.4 (and I assume you are using version 6.5).

      It is the "containers" within the docking architecture which have the tabs and therefore the containers which support the "container within container" docking with the appropriate visual cues as you describe.

      The non-container docking (referred to as simple docking) doesn't have tabs and doesn't support "container within container" docking, although they can dock a container in the normal (inner edge/outer edge) way.

      Or did I misunderstand the question?

      Dave

       
      • Todor Totev
        Todor Totev
        2009-07-30

        I've just tried the DockContainer sample but got the dreaded "Failed to insert rebar band, Invalid window handle" message. This is commit [879], built with VS 2008 running on Vista.
        Which example should I look at?

        Cheers,
        Todor

         
        • David
          David
          2009-07-31

          Hi Todor,

          Thanks for pointing this out.  I've just submitted a fix (commit version 880).

          There was an evil little bug in CRebar::GetSizeofRBBI. Previouly it failed to cater for the possibility of running an application on Vista without XP themes.

          Some other notes about the new version under development:
          * The features for the new release are now complete, but the code is largely untested.
          * There are significant incompatibilites with previous releases this time. Be sure to read the changes.txt file.
          * I've just changed the default color for Vista to grey. If you have artistic flair, and would like to come up with other default colors for Vista in the next version, I'd be happy to use them.
          * I've left the DockContainer sample without XP themes for the time being. That might prove handy for later testing. Its probably caused by a mistake in the VS2008 project file (haven't bothered to look yet).
          * The StaticLibrary sample contains old, out of date code at the moment.

          Cheers,
          Dave

           
          • Todor Totev
            Todor Totev
            2009-07-31

            Do you find this trick useful?

            SOME_RANDOM_WIN32_STRUCT srws = { sizeof(srws), 0, };

            It gets rid of the bugs like this one and zeroes the struct as many win32 calls require. I am not an experst C/C++ programmer but I don't find it difficult to read.

            The first thing I do after successfully building and running a Win32++ project is to write m_bUseThemes = false; so asking me about themes is pointless, I believe that a program that seamlessly blends with the OS look is the best program.

            I follow the project on the RSS feed and I update a dedicated workign copy, so I know about the incompatibilities. That's why I am waiting for the official release to merge into my sources. Hopefully it will be soon.

             
            • Todor Totev
              Todor Totev
              2009-07-31

              I've just checked the grey theme on Vista with Desctop Window Manager and (OS) Themes off and it looks bad. But again, I prefer the native look :)

               
            • David
              David
              2009-08-03

              Its a good trick, but I prefer:
              SOME_RANDOM_WIN32_STRUCT srws = { 0 };

              You might already know this, but sometimes sizeof(srws) produces an incorrect value. Hence the need for functions like  CRebar::GetSizeofRBBI and GetSizeofNonClientMetrics in Win32++.

              David

               
              • Todor Totev
                Todor Totev
                2009-08-03

                Indeed, Microsoft are well-known for supporting old and broken programs. But the price is one need to write quite silly code to create a program that compiles with the latest platform sdk and works on older Windows versions. Hence,  CRebar::GetSizeofRBBI and friends on the rescue!

                 
          • Todor Totev
            Todor Totev
            2009-07-31

            I don't know what do you mena by "The features for the new release are now complete, but the code is largely untested. ", but Explorer and DocViewForm samples do not compile with VS 2008.

             
    • David
      David
      2009-08-03

      Hi Todor,

      I've just updated the working code to fix the Explorer and DocViewForm samples (SVN version 881). I've also taken the time out to do some additional testing.

      You said:
      >>  I don't know what do you mena by "The features for the new release are now complete, but the code is largely untested. "

      What this means is that once I've locked the code down for a particular release, I run a battery of tests to check that Win32++ works as expected, including:
      * Every sample compiles and works as expected
      * The code compiles cleanly with each type and version of compiler I have.
      * The code works properly on each operating system I have access to.
      * Each feature of Win32++ works as expected.
      It takes several days to run the complete set of tests, so I only run the complete set for officially released versions, not for work in progress code.

      I was simply making the point that the code for the next version isn't actually locked down yet, and therefore the full battery of tests had not been performed. 

      By the way, the next official release of Win32++ should be ready by mid August.

      Regards,
      David

       
      • Todor Totev
        Todor Totev
        2009-08-03

        That's very interesting, how do you cope? Your text matrix is mind-crushing - about 10 compilers with more than 10 OSes. I suppose that automating the compilation is easy, and you can use virtual machines to test various OSes, but I am very curious to know how do you actually test? I can't imagine you manually fire every compiled program under every supported OS and go clicking everything clickable. Care to share your "special sauce"?

         
        • David
          David
          2009-08-03

          Hi Todor,

          You said:
          >> I can't imagine you manually fire every compiled program under every supported OS and go clicking everything clickable. Care to share your "special sauce"? 

          OK.  Since I've just tweaked some of my standard tests I've added them to the "Win32xx Tests" directory. There you will find scripts which compile the samples using VS2005, and VS2008,  and copy the executables to seperate directories, ready for testing using Virtual PC.

          Other tests are more manual at this stage, but each CodeBlocks project compiles the code using Borland 5.5, VS2003(Toolkit 2003) and MingGW (same compiler used by Dev-C++). That just leaves VS6, verifying Unicode, checking for unnecesary TRACE statements etc.

          Cheers,
          Dave