Menu

ToolBar Missing after compilling with MSVC

2009-06-01
2012-11-13
  • Roger Filipe

    Roger Filipe - 2009-06-01

    Hi,
    i am new with notepad++
    i tried to compile the new version with mingw but it returned
    millions of errors , i fixed some and i gave up
    so i turned to MSVC 2008, everything compiled without errors
    i replaced the installed notepad++.exe with my compiled one
    everything seems to work fine except the toolbar
    toolbar is missing , i tryed configuration -> preferences
    and the toolbar hide option is not working ...

    is this a bug with msvc2008 compiler ??

    any help is appreciated

    thanks

     
    • M.Y.

      M.Y. - 2009-06-02

      I have the same problem when I compiled the code with Microsoft Visual C++ 2008 Express Edition.

       
    • Y N

      Y N - 2009-06-02

      I'm not sure exectly what the problem is but there is a workaround for this issue - force REBARBANDINFO struct size in cbSize field to 80 everywhere. Meaning:
      instead of:
      _rbBand.cbSize  = sizeof(REBARBANDINFO);
      write:
      _rbBand.cbSize  = 80;

      Good luck

       
    • Roger Filipe

      Roger Filipe - 2009-06-02

      hello !,

      i re-compiled with new change :
      _rbBand.cbSize = 80;

      the status bar appeared !!!
      but the hide option , in preferences , is not working anymore.

      any sugestion to fix ?

      thanks

       
    • Thell Fowler

      Thell Fowler - 2009-06-02

      I never noticed that before.  Thanks for reporting the issue.  Now the question is "when did that happen?"

       
    • Roger Filipe

      Roger Filipe - 2009-06-02

      well,
      i will explain what i did.
      in file ToolBar.cpp i changed:
      _rbBand.cbSize = sizeof(REBARBANDINFO);
      to:
      _rbBand.cbSize = 80;

      and re-compiled completely.

      result : now the toolbar appeared but the hide option
      in options -> preferences is not working anymore.

      in the official release the hide option works perfectly.

      why the official compiled notepad++.exe is working
      and the source code compiled with the MSVC 2008 is not working ?
      what's wrong with source code ?

      thanks

       
    • Roger Filipe

      Roger Filipe - 2009-06-02

      if i download the source code and do a fresh compile it never
      shows the Toolbar.

      i never got the toolbar working when compiled with MS visual Studio

      i also tried to compile with MS visual studio 2005 and the same
      problem happens .. no ToolBar

      Q. the question is "when did that happen?" 
      R. for me always ...

       
    • M.Y.

      M.Y. - 2009-06-03

      I'm more interested in which compiler Don used to compiler his code. Any tricks that he might used?

       
    • M.Y.

      M.Y. - 2009-06-03

      I'm more interested in which compiler Don used to compile his code. Any tricks that he might used?
      (p.s. Sorry for the typo in my previous message.)

       
    • Y N

      Y N - 2009-06-04

      I believe he uses VS6 where the size of REBARBANDINFO is 80 - it doesn't have all the fields that are defined in VS2008.

       
    • M.Y.

      M.Y. - 2009-06-05

      YN, thanks for the info.

       
    • Thell Fowler

      Thell Fowler - 2009-06-05

      Hey guys, could we get some testers for this patch which should allow for compiling without modification across different vc versions.

      https://sourceforge.net/tracker/?func=detail&aid=2801589&group_id=95717&atid=612384

      Tested to work on VS2008 Express ( vc9 ).

      Thanks,
      almostautomated

       
    • Roger Filipe

      Roger Filipe - 2009-06-05

      Hello Thell,

      i applied the patch and finally worked fine.

      i compiled with VS2008 Team System Profissional (vc9)

      unfortunately i dont have vs2005 here

      thank you for the patch

       
    • M.Y.

      M.Y. - 2009-06-08

      Thanks to Y N, Thell, and Don. I can now compile the code (v5.4.3) with Microsoft Visual C++ 2008 Express Edition. The toolbar works!