Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » Possible bug in StatusBar with buttons Collapse All
Subject Author Date
Joachim Hartmann Nov 17, 2005 - 12:17 AM

I recently upgraded my free ProfUIS from 2.40 to 2.50


My application uses CExtStatusControlBar with a couple of CExtButton buttons.


1)


When I compile my application with the new version of Prof UIS and run the application, the buttons on the statusbar get a BOLD face font. When I click on a button the BOLD face font changes to a normal font. It’s a one time occurence.


When I reverted back to version 2.4 the problem was gone (normal font on the buttons)


2)


The same issue is present with the example application ProfUIS_Controls-n.exe, building with 2.50 the right most button in the statusbar gets a bold font, building with 2.40 the right most button gets a normal font.


Could you check if your sample exe’s built with 2.4 vs 2.5 show the same "feature".


I used VisualStudio 2003 to compile all samples and my application.

Technical Support Nov 17, 2005 - 9:57 AM

Thank you for the comments. Yes, we confirm this behavior. The cause is the status bar push button automatically becomes the default push button, which we draw using the bold font. You can workaround this problem by using this code in the CExtStatusBarButton class:

 class CExtStatusBarButton : public CExtButton
 {
 protected:
  virtual LRESULT WindowProc(    
   UINT uMsg,
   WPARAM wParam,
   LPARAM lParam
   )
  {
   if(  uMsg == BM_SETSTYLE 
    && wParam == BS_DEFPUSHBUTTON
    )
    return 0L;
   return CExtButton::WindowProc(uMsg, wParam, lParam);
  }
  virtual void PostNcDestroy()
  {
   delete this;
  }
 };