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 » CProfStudioThinFrame and CExtWRB Collapse All
Subject Author Date
Pavel Pavlov Aug 2, 2005 - 7:01 PM

Hello!


In your samples there is the class CProfStudioThinFrame that works like CExtWRB - add thin line around control.


I have a dialog with CListBox control without borders around it (NOT WS_BORDER) and I wish to draw this thin line. The dialog have WS_CLIPCHILDREN style. I make it by two ways.


1. CProfStudioThinFrame


BOOL CMyDlg::OnInitDialog()
{


 CExtResizableDialog::OnInitDialog();


}

Pavel Pavlov Aug 2, 2005 - 7:09 PM

sorry, I’m continue message...


BOOL CMyDlg::OnInitDialog()
{
 CExtResizableDialog::OnInitDialog();



 CRect rc1;
 m_ctrlList.GetWindowRect(&rc1);
 ScreenToClient(&rc1);


 CProfStudioThinFrame * pWndThinFrame = new CProfStudioThinFrame;
 if( ! pWndThinFrame->
   CreateDynamicThinFrame( &m_ctrlMyList )
  )
 {
  ASSERT( FALSE );
  return FALSE;
 }


 GetDlgItem(IDC_MYLIST)->MoveWindow(&rc1);
   
 return TRUE;
}


2. CExtWRB


CExtWRB<CListBox> m_ctrlMyList;


 


In both ways something wrong. If I resize dialog sometimes thin line disappeared, scrollbars not displayed.


And yet more. If there is CExtColorButton at top listbox with thin line that after hide color menu from button the rect under menu on listbox is not updated.

Technical Support Aug 3, 2005 - 1:36 PM

We cannot confirm the problem described in your message. We have created a simple dialog-based project to check the source code snippet from your message and found the following:

  • the m_ctrlList window calls the GetWindowRect() method

  • the m_ctrlMyList window is used in the call of the CreateDynamicThinFrame() method

  • the GetDlgItem(IDC_MYLIST) window is used in the final call of the MoveWindow() method
The following problems can be inferred from the above mentioned facts:
  • m_ctrlList is not the same as m_ctrlMyList! So, we may guess you have some typos in your project
  • we do not know what is the GetDlgItem(IDC_MYLIST) window in your project

Pavel Pavlov Aug 4, 2005 - 11:51 PM

Hello!


It is my misprint that m_ctrlList is not the same as m_ctrlMyList. In my code they are same of cause.


IDC_MYLIST is control ID for m_ctrlMyList, control is standard ListBox.


----------------------------------------------


Some words about your library.


1. What is about spin, slider and progress? Standard spin is not good for your CExtEdit. And there is CExtBarSliderButton, but no CExtSlider... In Visual Studio .NET there is slider on Options!


2. In Visual Studio there are many combined two static controls: text and line - replacing group box behavior. Didn’t you implement in next release of library special class for this case?


3. And, of cause, handy stylish listbox...

Technical Support Aug 6, 2005 - 9:14 AM

Please download a sample application in which the CExtWRB and CProfStudioThinFrame classes work perfectly well with the list control in the dialog.

We have not yet implemented the spin control but we have a slider control similar to toolbar’s slider button.

The progress control does not depend on the parent window’s background. We think it looks well as is. Besides, there is lots of custom progress control on the Internet like the gradient progress control. If you give us some idea about it, then we may agree to code a custom progress control.

Please tell us what you mean by "stylish listbox"?

Pavel Pavlov Aug 7, 2005 - 6:48 PM

I mean following features for listbox:


Border like CExtWRB, highlighting and selecting according theme (not standard solid blue rectangle).


And theme colored CExtScrollBar with color of scroll buttons like in your CExtComboBox. In Office2003 and VS.NET Microsoft is not using the listbox almost, therefore you may create own style for listbox.

Technical Support Aug 8, 2005 - 6:58 AM

It’s simple. You described a simple owner-drawn list box which uses the Prof-UIS paint manager for retrieving colors (g_PaintManager->GetColor() instead of ::GetSysColor() Win32 API). For instance, the CExtMdiWindowsListDlg::OnDrawItem() method uses the paint manager for painting list box items in the MDI windows list dialog. This border around it can be implemented in the parent window such as the CProfStudioThinFrame window in the ProfStudio sample application.