Subject |
Author |
Date |
|
John Huang
|
Oct 7, 2005 - 3:16 AM
|
I download 2.43. and found that these functions are no use at all.
|
|
Technical Support
|
Oct 7, 2005 - 5:19 AM
|
Yes, in the CExtGridCell class these virtual methods are empty and there are no variables which store the colors. In other words CExtGridCell class does not hold text/background colors. It’s a kind of lightweight class used by other derived classes. We added the CExtGCC template that allows a CExtGridCell -derived class to hold these values. CExtGCC template is designed to decorate any CExtGridCell -derived class. It overrides these virtual methods and allows you to specify text and background colors. We also added the CExtGridCellEx class which implements a cell which is usually used as a base class for other cell objects with custom text and background colors and a custom hover cursor.
|
|
John Huang
|
Oct 7, 2005 - 9:22 AM
|
|
|
Eddie Judson
|
Oct 5, 2005 - 10:21 PM
|
Is it the default behaviour for the CExtDateTimeWnd when showing both a date and time that when you select a new date the time reverts to 12:00:00 am and if so is there a way to stop it doing that? Also if the CExtDateTimeWnd is showing both a date and time say 9/09/2005 2:00:00 pm when you change the 2 to a 3; pm changes to am can this be stopped also? Regards, Eddie
|
|
Technical Support
|
Oct 6, 2005 - 9:41 AM
|
Thank you for the bug report. We agree with you that when the user selects a date from the pop-up date picker, the time should not be changed. We already changed the default behavior. Please replace the CExtDateTimeWnd::OnDropDownCalendarSelChanged() method with this: LRESULT CExtDateTimeWnd::OnDropDownCalendarSelChanged( WPARAM wParam, LPARAM lParam )
{
ASSERT_VALID( this );
lParam;
const CExtDatePickerWnd::SELECTION_NOTIFICATION * pSN =
CExtDatePickerWnd::SELECTION_NOTIFICATION::FromWPARAM( wParam );
ASSERT( pSN != NULL );
if( pSN->m_bFinalSelectionChanging )
{
if( pSN->m_dtBegin.GetStatus() == COleDateTime::valid
&& GetStatus() == CExtDateTimeWnd::valid
)
SetDateTime(
pSN->m_dtBegin.GetYear(),
pSN->m_dtBegin.GetMonth(),
pSN->m_dtBegin.GetDay(),
m_dtDate.GetHour(),
m_dtDate.GetMinute(),
m_dtDate.GetSecond()
);
else
SetDateTime( pSN->m_dtBegin );
}
return 0L;
} As for the second problem, we confirm this bug. To fix it, please open the CExtDateTimeWnd::OnDigitPressed() method, find the case CExtDurationWnd::hour line and replace the corresponding code with this:
case CExtDurationWnd::hour:
{
bool b24Hours = OnQueryTimeFormat24Hours();
if( nValue < 0 || nValue > 23 )
nValue = nDigit;
pII->m_nValue = nValue;
if( !b24Hours )
{
if( nHour >= 12 && nValue < 12 )
nValue += 12;
if( pII->m_nValue > 12 )
pII->m_nValue -= 12;
}
ASSERT( pII->m_nValue >= 0
&& ( (pII->m_nValue <= 23 && b24Hours)
|| (pII->m_nValue <= 12 && !b24Hours) )
);
ASSERT( nValue >= 0 && nValue <= 23 );
nHour = nValue;
}
break; After that recompile the library. These fixes will also be available in the next library release.
|
|
Thomas Maurer
|
Oct 5, 2005 - 10:54 AM
|
Hello I am afraid this was asked and answered a thousand times but I couldn’t find it in the forums. How can I prevent a toolbar from floating? Thanks Thomas
|
|
Thomas Maurer
|
Dec 16, 2005 - 3:19 PM
|
While the answer from Tech Support was correct it did not fully apply to my situation. If you have more than one control bar tabbed into one "container control bar" and you want to restrict certain things on that then you will have to derive a class from CExtDynamicTabbedControlBar and apply certain restrictions there. However, if you want to set the initial size of this bar you will have to do it in one of the tabbed control bars. Attention: You will have to include a file from the source directory (which is very ugly in my opinion): ..\Src\ExtControlBarTabbedFeatures.h General comment: If you try to rely on the documentation you will end up asking Tech Support questions all the time. I have used many features (classes, methods) so far that were not in the Reference Manual. I learned a lot by studying the sources and stepping through their code with the debugger.
|
|
Dmitriy Dashevskiy
|
Oct 24, 2005 - 1:41 AM
|
This does not work well when dragging/dropping bar previously docked in tabbed container. Bar is removed from tab container on drag start but is not created on drop (if dropping in place where it should become floating). What should be changed to cover this case as well?
|
|
Thomas Maurer
|
Dec 16, 2005 - 3:10 PM
|
It’s a little bit late to answer that one but I do it for future generations ;-) You can prevent dragging by overriding _DraggingStart in your Control Bar and doing nothing in it.
|
|
Technical Support
|
Oct 24, 2005 - 12:43 PM
|
The solution we advised in the previous message relats to the toolbar/menu bar only. We have already resolved the "prevent floating", "prevent closing", "prevent resizing" issues in Prof-UIS 2.50. Please contact us by e-mail so we can provide you with instructions on how to download this update.
|
|
Technical Support
|
Oct 5, 2005 - 12:41 PM
|
You can create the following version of the Prof-UIS toolbar that never gets floating: class CYourToolBar : public CExtToolControlBar
{
public:
virtual void FloatControlBar(
CPoint ptFloat,
DWORD dwStyle = CBRS_ALIGN_TOP
)
{
ptFloat;
dwStyle;
}
}; If you use the CYourToolBar class instead of CExtToolControlBar , then you will be able to drag-and-drop your toolbars only onto the positions near the main frame window borders only.
|
|
Thomas Maurer
|
Oct 5, 2005 - 10:38 AM
|
Hello I have a CExtControlBar which can be auto hidden. Everything seems to work fine but one thing: When the bar is hidden and is reopened again it seems to go to the background. It can be seen flickering and will then be hidden. When one clicks to where the bar should be the bar comes up again. For test reasons I put a listbox into the bar. When the bar with the listbox reappears the listbox is transparent (with a focus rectangle where the first item should be). What goes wrong? BTW, when pinned everything is ok. Thanks Thomas
|
|
Marcus Gebler
|
Nov 3, 2005 - 4:06 PM
|
Hello Thomas I have the same problem, also in a MDI Application. But adding the WS_CLIPSIBLING style does not make any difference - the reopen bars are still in the background. How did you solve this problem? Thank you Marcus
|
|
Thomas Maurer
|
Dec 6, 2005 - 12:29 PM
|
Marcus I only saw your message now (Dec 6). If you still need help with that then contact me under thomas.maurer-replacethiswholestuffincludinghyphenswithyouknowwhichsign-ierax.ch Your name says you could be a German speaker and so am I (es geht also auch auf Deutsch) Thomas
|
|
Technical Support
|
Nov 4, 2005 - 7:51 AM
|
Dear Marcus, You should not encounter this problem in the MDI application because the MDI client window already clips siblings. Are you sure your application is MDI?
|
|
Technical Support
|
Oct 5, 2005 - 11:16 AM
|
We may guess you have an SDI application and the main view window does not have the WS_CLIPSIBLINGS style. Please take a look at the CChildView::PreCreateWindow() method and check whether it adds the WS_CLIPSIBLINGS style. Your method may look like: BOOL CSDIDOCVIEWView::PreCreateWindow( CREATESTRUCT & cs )
{
if( ! CView::PreCreateWindow(cs) )
return FALSE;
cs.style |= WS_CLIPSIBLINGS;
return TRUE;
} This problem does not occur in MDI applications because the MDI client container window has WS_CLIPSIBLINGS style turned on by default.
|
|
Thomas Maurer
|
Oct 6, 2005 - 1:09 AM
|
Thank you. That helped a lot. I am using MDI but the bar is in the mdi child not in the mdi frame but I was able to figure that out myself :-).
|
|
Technical Support
|
Oct 6, 2005 - 9:27 AM
|
Just think about an MDI child frame window as though it is the main frame window in an SDI application. So, our previous message in this thread fully relates to your question. The WS_CLIPSIBLINGS style should be applied to the view window in the MDI child frame window.
|
|
Massimo Germi
|
Oct 5, 2005 - 4:00 AM
|
Hi, I have a little question about access to CExtGridWnd derived class in a thread. My application is a MDI apps, the view is a derived class af CView. Inside a CMyView, I have a CMyGrid (derived from CExtGridWnd). I’m trying to load data into CMyGrid from a thread in the following manner: declaration of thread function static unsigned __stdcall my_function(LPVOID *lpVoid); unsigned __stdcall CMyView::my_function(LPVOID *lpVoid) { }
|
|
Technical Support
|
Oct 5, 2005 - 8:18 AM
|
The MFC library has thread state data for each running thread. These data contain maps of handles to MFC objects such as a map from HWND handles to CWnd pointers. This means you can use any CWnd -derived class only in the thread where it was created. You cannot use this class in another thread because you will face assertion problems. The assertions are triggered because the CWnd pointer is controlled by the internal MFC map of other thread. Here is what can be done. Define your WM_USER+??? messages and send them to the grid control from another thread. These messages should have pointers to non-MFC based data structures in message parameters. This is a valid way of interaction between a CWnd -based window and other thread. This approach is used in the CLogCtrl::WriteText() method of the MthOutput sample application. The CLogCtrl class implements a log output window which is based on the rich edit control. The CLogCtrl::WriteText() method invokes rich editor’s APIs if it is invoked from the same thread in which the log control was created. This method sends the WM_USR_WRITE_LOG_TEXT message that is defined as (WM_USER + 0x1234) to the rich editor’s thread if the method is invoked from another thread. The WM_USR_WRITE_LOG_TEXT message uses the CLogCtrl::_MthMessageDataFor_WM_USR_WRITE_LOG_TEXT data structure to pass all the needed information and invoke the CLogCtrl::WriteText() method in the rich editor’s native thread.
|
|
Massimo Germi
|
Oct 6, 2005 - 9:19 AM
|
OK, I have implemented this method and its seems to be good. TX
|
|
claude laflamme
|
Oct 4, 2005 - 3:04 PM
|
Hi, I use a subwindow that setup its own profile. In that window, I have some docked toolbars that work fines. But, if I try to move one of them to change its state to floating mode, I get an assertion on line 451 of the ExtToolControlBar.cpp. (v2.40) The assertion validate a command item pointer. I just don’t understand why it cannot find it if my toolbar becomes in floating mode. The problem happend on the OnPaint method of a CExtBarButton. All my toolbars implement a combo box or a slider. So, any idea?? Do I forgot the setup something in the command manager? Tanks
|
|
Technical Support
|
Oct 5, 2005 - 8:10 AM
|
Each command profile in the command manager has one or more HWND handles associated with this profile. Typically it is an HWND handle to the main frame window. The command profile searching algorithm for any window is based on iterating over HWND s both to this window and to all its parent windows until some handle is not found in some command profile in the command manager. The floating mini frame window with toolbars is a child of the main frame window in a simple frame-based MFÑ application. So, each toolbar window can walk through its parents and stop at the main frame window whose HWND is used in the command manager’s profile. In your case, the frame window is not a top level pop-up window. The floating mini frame window with toolbars has the parent window which contains your frame window somewhere inside. So, any toolbar in the floating state is unable to use the command manager. The solution to this problem is very simple: add HWND of the top level frame window to the same command profile which is initialized for your standalone frame window. Here is how your command profile initialization in the CYourFrame::OnCreate() method may look like: int CYourFrame::OnCreate( LPCREATESTRUCT lpCreateStruct )
{
if( CBaseOfYourFrame::OnCreate( lpCreateStruct ) == -1)
return -1;
CWinApp * pApp = ::AfxGetApp();
ASSERT( pApp != NULL );
ASSERT( pApp->m_pszRegistryKey != NULL );
ASSERT( pApp->m_pszRegistryKey[0] != _T(’\0’) );
ASSERT( pApp->m_pszProfileName != NULL );
ASSERT( pApp->m_pszProfileName[0] != _T(’\0’) );
ASSERT( pApp->m_pszProfileName != NULL );
g_CmdManager->ProfileSetup(
pApp->m_pszProfileName,
GetSafeHwnd()
);
g_CmdManager->ProfileSetup( // !!! IMPORTANT !!!
pApp->m_pszProfileName,
GetTopLevelParent()->GetSafeHwnd()
);
. . . Of course, you should remove both HWND handles from the command profile in the CYourFrame::DestroyWindow() method. The CExtCmdManager::ProfileWndRemove() allows you to deallocate the command profile and destroy all the icons and command descriptions when removing the last HWND handle from this profile. Invoke this method for both HWND handles and specify true in the bRemoveProfileIfLastHWND parameter. The solution described above is essential when you code an ActiveX component which looks like an independent frame window with dockable bars inside. The very same approach is used in the Prof-UIS Frame Features ActiveX control.
|
|
claude laflamme
|
Oct 5, 2005 - 1:21 PM
|
|
|
Suhai Gyorgy
|
Oct 5, 2005 - 2:08 AM
|
Unfortunately I don’t know the solution for the problem, but almost the same happens for me, too. But when I remove the customization from my project, it works again. So might be something about that. Even though, I eagerly wait for the answer, too. Chris
|
|
claude laflamme
|
Oct 5, 2005 - 1:31 PM
|
I doesn’t use the customization subsystem yet. Maybe you should check to register top level parent in your profiler like they suggested to me.
|
|
Suhai Gyorgy
|
Oct 4, 2005 - 3:48 AM
|
Hi! I’ve tried to do the steps described below to the LanguageSwitcher project. Make the following changes below in the profuislib project: 1. Open the Prof-UIS workspace and make the profuislib project active; 2. Open the Prof-UIS.h file and comment the following lines: // #if (!defined _AFXDLL || defined __STATPROFUIS_WITH_DLLMFC__)
// #define __EXT_MFC_NO_CUSTOMIZE
// #endif // (defined _AFXDLL || !defined __STATPROFUIS_WITH_DLLMFC__)
3. Add the following files to the project: ./Include/ExtCustomize.h ./Include/ExtIconEditDlg.h ./Src/ExtCustomize.cpp ./Src/ExtIconEditDlg.cpp 4. Select the required configuration and build the project.
Make some changes in your application: 1. Copy the ./profuisdll/profuisdll.rc file to the project’s directory. 2. Open profuisdll.rc in the text editor, find the VS_VERSION_INFO section and remove this entire section. 3. Copy the ./profuisdll/idd_ext_color_dlg.ico file to your project’s directory. 4. Copy the contents of the ./profuisdll/res directory to your ./res directory. 5. Add the #include "profuisdll.rc" line just after the comment "Add additional manually edited resources here..." in your application’s ./res/*.rc2 file. If you do not do this, the Prof-UIS assert at startup because it is trying to access resources that are not available. 6. Copy all constant definitions from the ./profuisdll/resource.h file to your resource.hresources I’ve also removed any resources that haven’t to do with English from profuisdll.rc as you recommended. And one more thing to add: in Prof-UIS.h there is one more #define by those lines, like this: // #if (!defined _AFXDLL || defined __STATPROFUIS_WITH_DLLMFC__)
// #define __EXT_MFC_NO_CUSTOMIZE
// #define __EXT_MFC_NO_DYNAMIC_BAR_SITE
// #endif // (defined _AFXDLL || !defined __STATPROFUIS_WITH_DLLMFC__)
I compile the project with the same project-properties as I did with profuislib project, and it compiles without any warning. Still, when I try to run the application I get an unhandled exception. Checking the stack in debug I can see that the problem starts in CMainFrame::OnCreate() at CExtCustomizeSite::MenuInfoLoadAccelTable(). Could you give me any explanation for that? Thank you: Chris
|
|
Technical Support
|
Oct 4, 2005 - 1:25 PM
|
As we mentioned before, we stick to the idea of the statically linked application as a light-weight application that do not use resources. If you need resources and your application features a complex interface, why you don’t use Prof-UIS dynamically? We can add this issue to our To-Do list to implement such configurations later (to make this a standard option) -- we are just pressed for time. But if you do plan, for some reason, to use resources in your statically linked app, then please tell us how much time we have to help you with this issue.
|
|
Suhai Gyorgy
|
Oct 5, 2005 - 1:38 AM
|
We need to use statically linked library because we don’t know in advance under what circumstances our application will be running. It has to be a stand-alone app. There might be a situation where your dll is already on the computer but it’s a different version which will make our app unable to run... But we really would like to use your features, the customization and the language-switching as well. By any chance will it be possible for us to build them in our app sometime this year or more like during this autumn? Thank you!
|
|
Technical Support
|
Oct 5, 2005 - 6:54 AM
|
To avoid the problem with a dll collision, just put the Prof-UIS dll into the same folder as your executable module is in so that your application will always be able to use this dll independently of other Prof-UIS dlls. Having this dll in the System directory is a bad idea. Besides, each Prof-UIS version has its own unique name, so the conflict is hardly possible.
As for the statically linked resources, we will come back to this issue when working on the next release (after the upcoming major release).
|
|
Stephan Finkler
|
Oct 4, 2005 - 2:04 AM
|
Hi,
how can I easily remove a Cmd in all dependencies like menus, toolbar, accelerators, command manager etc..? Customization is enabled.
Thanks for your help.
|
|
Technical Support
|
Oct 4, 2005 - 5:46 AM
|
This can be easily done with the Prof-UIS Automation Pack (ProfAuto), which provides a set of automation object wrappers for Prof-UIS components. If you remove a command from the ExtAutoCommandsCollection object, all the corresponding items (toolbar buttons, menu items, accelerators and command category entries in the customize dialogs) will be also removed. It’s a ready-to-use solution for customizable applications. You can use ProfAuto even without registering any COM server.
Prof-UIS comes with an ActiveScripts sample that demonstrates how ProfAuto can be used in an SDI application.
If you encounter any difficulties with this issue, please contact us again. PS If your application is not customizable, then you have to remove menu items, toolbar buttons, accelerators, and command manager items manually.
|
|
Chris Thomas
|
Oct 2, 2005 - 9:53 PM
|
Hello, how can we add and item or items, possibly a submenu, to the right click control bar context menu? Or even change it entirely?
Thanks!
|
|
Chris Thomas
|
Oct 2, 2005 - 9:54 PM
|
Just to be clearer, the menu that lists all the bars in the app, with checkboxes next to them. Thanks
|
|
Technical Support
|
Oct 3, 2005 - 9:50 AM
|
We have just modified the FAQ that answers you question. The pop-up menus in question are specified with the constants below: __PMED_DOCKBAR_CTX = 0, // dockbar context menu
__PMED_CONTROLBAR_CTX = 1, // any control bar context menu (client area)
__PMED_CONTROLBAR_NC_CTX = 2, // any control bar context menu (non-client area) If you encounter any difficulties, please contact us again.
|
|
Thomas Maurer
|
Sep 30, 2005 - 3:30 AM
|
I compiled and linked the library V2.43 with
#define __EXT_MFC_ENABLE_TEMPLATED_CHARS When I tried to compile my own application the following output was generated:
==== BEGIN OUTPUT ==== stdafx.cpp Prof-UIS multiple monitor support: built-in Automatically linking with Prof-UIS library: ProfUIS243yud.lib (Professional User Interface Suite) Prof-UIS native unicode character type support: adding automatic conversion from unsigned short to __wchar_t Prof-UIS real wchar_t type is: unsigned short Client project real wchar_t type is: native __wchar_t c:\Programme\Prof-UIS\Include\extbutton.h(286) : error C2664: ’int CWnd::GetWindowTextW(LPTSTR,int) const’ : cannot convert parameter 1 from ’CExtSafeSimpleStringT<BaseType>::PXSTR’ to ’LPTSTR’ with [ BaseType=__prof_uis_used_wchar_t ] Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast ==== END OUTPUT ==== Ok, I can live without _wchar_t being an internal type but I thought I might report this anyways. Thanks Thomas
|
|
Technical Support
|
Sep 30, 2005 - 6:25 AM
|
Thank you for the bug report. The problem will be fixed if you move the body of the CExtButton::OnQueryWindowText() method from the ExtButton.h file to the ExtButton.cpp file.
|
|
Suhai Gyorgy
|
Sep 30, 2005 - 3:24 AM
|
Dear Support, I would like to use customization in my application, but came to realize it’s not that easy if my app is statically linked with Prof-UIS. I made some reading here on the forum and found the answer in a message arriving in March, 2004 describing the same situation. You wrote this at that time: <start of message> At the moment you cannot directly use the Prof-UIS resource-dependent features in the applications statically linked with Prof-UIS. But there is a workaround. Please follow the next steps:
Make the following changes below in the profuislib project: 1. Open the Prof-UIS workspace and make the profuislib project active; 2. Open the Prof-UIS.h file and comment the following lines: // #if (!defined _AFXDLL || defined __STATPROFUIS_WITH_DLLMFC__)
// #define __EXT_MFC_NO_CUSTOMIZE
// #endif // (defined _AFXDLL || !defined __STATPROFUIS_WITH_DLLMFC__)
3. Add the following files to the project: ./Include/ExtCustomize.h ./Include/ExtIconEditDlg.h ./Src/ExtCustomize.cpp ./Src/ExtIconEditDlg.cpp 4. Select the required configuration and build the project.
Make some changes in your application: 1. Copy the ./profuisdll/profuisdll.rc file to the project’s directory. 2. Open profuisdll.rc in the text editor, find the VS_VERSION_INFO section and remove this entire section. 3. Copy the ./profuisdll/idd_ext_color_dlg.ico file to your project’s directory. 4. Copy the contents of the ./profuisdll/res directory to your ./res directory. 5. Add the #include "profuisdll.rc" line just after the comment "Add additional manually edited resources here..." in your application’s ./res/*.rc2 file. If you do not do this, the Prof-UIS assert at startup because it is trying to access resources that are not available. 6. Copy all constant definitions from the ./profuisdll/resource.h file to your resource.h <end of message> I followed the steps but when I tried to compile my application (your profuislib project compiled just fine), I got a fatal resource compilation error: "#endif expected." I have found a missing #endif in your profuisdll.rc app in the English U.S resources at the commented part (the pair of "#ifndef _MAC" just before Version), but that still didn’t help, I got the same error. My app compiled successfully before. Could you give me a reason for that? I wonder maybe version 2.40 works differently in this context than the one in March 2004. Thank you: Chris.
|
|
Technical Support
|
Sep 30, 2005 - 7:48 AM
|
Please ensure that you correctly removed the VS_VERSION_INFO section. Exactly the following lines need to be removed: /////////////////////////////////////////////////////////////////////////////
//
// Version
//
VS_VERSION_INFO VERSIONINFO
FILEVERSION 2,4,3,0
PRODUCTVERSION 2,4,3,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
#else
FILEFLAGS 0x0L
#endif
FILEOS 0x4L
FILETYPE 0x2L
FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "Comments", "This is part of the Professional User Interface Suite library (www.prof-uis.com)\0"
VALUE "CompanyName", "FOSS Software, Inc.\0"
VALUE "FileDescription", "Professional User Interface Suite DLL\0"
VALUE "FileVersion", "2, 4, 3, 0\0"
VALUE "InternalName", "Professional User Interface Suite DLL\0"
VALUE "LegalCopyright", "Copyright é 2001-2005 FOSS Software, Inc.\0"
VALUE "LegalTrademarks", "\0"
VALUE "OriginalFilename", "ProfUIS[VersionNumber][Modifiers].dll\0"
VALUE "PrivateBuild", "\0"
VALUE "ProductName", "Professional User Interface Suite\0"
VALUE "ProductVersion", "2, 4, 3, 0\0"
VALUE "SpecialBuild", "\0"
END
END
BLOCK "VarFileInfo"
BEGIN
VALUE "Translation", 0x409, 1200
END
END
|
|
Suhai Gyorgy
|
Sep 30, 2005 - 8:13 AM
|
Hi! I’ve just compiled profuislib project again and although it compiled successfully, I got the following warning:
...
ExtTabPageContainerWnd.cpp
\Program Files\FOSS Software Inc\Prof-UIS\Src\ExtTabPageContainerWnd.cpp(939) : warning C4541: ’dynamic_cast’ used on polymorphic type ’CExtTabWnd’ with /GR-; unpredictable behavior may result
...
Could this cause the problem? I’ve checked under project->profuislib Properties... all the command line arguments under C/C++, Librarian and Browse information, but haven’t seen /GR- option... I’m really clueless now.
Thank you: Chris.
|
|
Technical Support
|
Sep 30, 2005 - 10:11 AM
|
This issue was fixed in Prof-UIS 2.42. Please open the CExtTabPageContainerOneNoteWnd::PageInsert() method and replace the following lines: CExtTabOneNoteWnd * pWndTab =
dynamic_cast< CExtTabOneNoteWnd * >( m_pWndTab ); with CExtTabOneNoteWnd * pWndTab =
DYNAMIC_DOWNCAST( CExtTabOneNoteWnd, m_pWndTab );
|
|
Suhai Gyorgy
|
Sep 30, 2005 - 7:51 AM
|
I have removed all of those lines, and I’m guessing I need to remove the #ifndef _MAC line from the beginning of this section and #endif from the end of it. I forgot to add: I’m using VS 7.1. Thanks
|
|
Technical Support
|
Sep 30, 2005 - 10:14 AM
|
We found the problem. It seems there is some conflict between the compiler and Unicode symbols when the resource file is included externally. Please open the profuisdll.rc file and remove all the language resources but those having to do with English. After this all should work fine.
|
|
Suhai Gyorgy
|
Sep 30, 2005 - 12:45 PM
|
|
|
Darren Oliver
|
Sep 29, 2005 - 4:18 PM
|
All the sample code always saves the windows layout to the registry on exit - I would like to do it on command (e.g. button press). I know that the call to ProfileBarStateSave() does the save, but I cannot take it out of DestroyWindow() and put it in say - "OnSaveLayout()", which gets called from a button press. Specifically, the code snippet:
CWinApp * pApp = ::AfxGetApp();
ASSERT( pApp != NULL );
ASSERT( pApp->m_pszRegistryKey != NULL );
ASSERT( pApp->m_pszRegistryKey[0] != _T(’\0’) );
ASSERT( pApp->m_pszProfileName != NULL );
ASSERT( pApp->m_pszProfileName[0] != _T(’\0’) );
VERIFY(
CExtControlBar::ProfileBarStateSave(
this,
pApp->m_pszRegistryKey,
pApp->m_pszProfileName,
pApp->m_pszProfileName,
&m_dataFrameWP
);
Thanks ahead of time.
|
|
Technical Support
|
Sep 30, 2005 - 6:14 AM
|
Your code snippet looks correct. It must save the bar state to the registry and can be used in your OnSaveLayout() method. Please clarify the following: "... but I cannot take it out of DestroyWindow() and put it ...". Please let us know what exactly you cannot do?
|
|
Darren Oliver
|
Sep 30, 2005 - 7:28 AM
|
I cannot move the CExtControlBar::ProfileBarStateSave() call out of DestroyWindow() and use it in the OnSaveLayout() method. I end up with an exception in ProfileBarStateSave() at line "ASSERT( ::IsWindow(hWnd) );".
-------------------code snippet ------------------
void CMainFrame::OnSaveLayout() { CWinApp * pApp = ::AfxGetApp(); ASSERT( pApp != NULL ); ASSERT( pApp->m_pszRegistryKey != NULL ); ASSERT( pApp->m_pszRegistryKey[0] != _T(’\0’) ); ASSERT( pApp->m_pszProfileName != NULL ); ASSERT( pApp->m_pszProfileName[0] != _T(’\0’) );
VERIFY( CExtControlBar::ProfileBarStateSave( this, pApp->m_pszRegistryKey, pApp->m_pszProfileName, pApp->m_pszProfileName, &m_dataFrameWP ) ); }
|
|
Technical Support
|
Sep 30, 2005 - 7:59 AM
|
Your code should try to save the state of resizable bars only when the main frame window and all its bars are valid, existing windows. This means CWnd::m_hWnd properties of main frame window and all the bar windows should specify valid window handles. You cannot invoke the OnSaveLayout() method from the CMainFrame::PostNcDestroy() method. You cannot invoke it when CMainFrame is already destroyed. Please check these issues.
|
|
Michael Morrison
|
Sep 28, 2005 - 9:04 PM
|
Our MDI applications’ CChildFrame contains only CExtDynamicControlBar-derived classes as views into our data - there is nothing actually rendered into the child frame itself. How do I make the dynamic control bars take up all available space within the child frame and always dock/attach on all 4 sides? Also, the CChildFrame inherits from CMDIChildWnd and CExtDynamicBarSite, I call CExtControlBar::FrameEnableDocking(this), CExtControlBar::FrameInjectAutoHideAreas(this), and CExtDynamicBarSite::Install(this) in the CChildFrame::OnCreate method. I also added the OnCmdMsg code in that method as well. The docking and movement of the bars within the child frame work fine, and my [x] button will close the windows as well. However, I get an assert fail when I try to use the "\/" button:
CExtDynamicBarSite::eDetectedUiType_t eDUIT =
pDBS->GetDetectedUiType(); if( eDUIT == CExtDynamicBarSite::__EDUIT_UNSUPPORTED_ENVIRONMENT )
{
ASSERT( FALSE ); return false;
}
What does this mean?
Thanks.
|
|
Michael Morrison
|
Sep 30, 2005 - 3:04 PM
|
Well, I’m not sure what is going on. I belive I have done everything you have asked, and it still assert-fails. Creating the tab with the AFX_IDW_PANE_FIRST identifier makes it overlay the tool bars and the dynamic windows that are created within the child window. Even in this configuration, I am able to move things around such that I can click on the Options button and it still assert fails. I believe this is because the following code always returns my CView-derived class within my MDI app, rather than the tabWnd (line 22163 of extcontrolbar.cpp): #if (!defined __EXT_MFC_NO_TAB_PAGECONTAINER_CTRL)HWND hWndCenter =::GetDlgItem(pDockSite->m_hWnd,AFX_IDW_PANE_FIRST); This makes the subsequent DYNAMIC_DOWNCAST on line 22176 of extcontrolbar.cpp return NULL, and therefore eventually cause the assert-fail.
|
|
Technical Support
|
Oct 1, 2005 - 10:01 AM
|
There must be only one window with the AFX_IDW_PANE_FIRST identifier inside a CChildFrame window. Our guess there are two such windows in your child frame window: the first is the view window, the second is the tab page container window. So, you need to change the design of your child frame window. There are two solutions with regard to this: 1) Do not create a view window. You need to move all the functionality of the view window to some other place. For example, the view window can be moved into a resizable control bar. 2) (We recommend this). You can move your view window into a tab page container. Create a tab page container in your CChildFrame::OnCreate() method using the following code: CWnd * pYourAlreadyCreatedView =
GetDlgItem( AFX_IDW_PANE_FIRST );
ASSERT_VALID( pYourAlreadyCreatedView );
if( ! m_wndTabPageContainer.Create(
this,
CRect( 0, 0, 0, 0 ),
AFX_IDW_PANE_FIRST
)
)
{
TRACE0("Failed to create tab page container window\n");
return -1;
}
pYourAlreadyCreatedView->SetParent(
&m_wndTabPageContainer
);
VERIFY(
m_wndTabPageContainer.PageInsert(
pYourAlreadyCreatedView->m_hWnd,
_T("Tab item text")
)
);
|
|
Michael Morrison
|
Sep 30, 2005 - 9:19 AM
|
FYI, our application is similar in appearance to the MDI_InnerOuterBars example, where there is an outer and an inner docking site. But per your suggestions, I have switched everything to Dynamic control bars. Your example leaves room for the colored rectangles in the middle of the MDI child frame - we would like to do away with this, as there is nothing in this area in our application. The only views into the data appear inside the docking control bars, so we would like them to always attach on all 4 sides and leave no client area open. Perhaps I am misunderstanding your solution to the "Options" button problem. Our CChildFrame inherits from CMDIChildWnd and CExtDynamicBarSite. Are you saying it should also inherit from CExtTabPageContainerWnd, or that our Applications CView-derived class should inherit from CExtTabPageContainerWnd? Making the CView-derived class inherit from CExtTabPageContainerWnd does not appear easily done. I tried creating a CExtTabPageContainerWnd as a member of the CChildFrame class, and Create()ing it in the OnCreate method; I also tried adding the CExtTabPageContainerWnd as a member of the CView-derived class, but both produced the same assert failure. Can you modify the MDI_InnerOuterBars example to work with Dynamic control bars - that will probaby give me what I need. Thanks.
|
|
Technical Support
|
Oct 1, 2005 - 12:43 PM
|
Please send us an e-mail to support@prof-uis.com so we can provide you with instructions on how to download the updated source code.
|
|
Technical Support
|
Sep 30, 2005 - 12:08 PM
|
You have correctly defined the base classes for your CChildFrame class. Now, create a CExtTabPageContainerWnd window with the AFX_IDW_PANE_FIRST identifier in the CChildFrame::OnCreate() method. In fact, your CChildFrame class should be similar to the CMainFrame class of the SDI_DynamicBars sample application but derived from the CMDIChildWnd class. As for modifying the MDI_InnerOuterBars sample application: please give us one more day to code it for you.
|
|
Michael Morrison
|
Sep 29, 2005 - 2:43 PM
|
My view does not inherit from CExtTabPageContainerWnd - I was not aware this was necessary. I’ll try that. How about my first question about expanding the dynamic windows to take up all available client window space? Thanks.
|
|
Technical Support
|
Sep 30, 2005 - 12:05 PM
|
We answered both your questions. If you use a tab page container inside your MDI child window, then dynamic control bars will be able to become pages inside this tab page container.
|
|
Technical Support
|
Sep 29, 2005 - 11:21 AM
|
The __EDUIT_UNSUPPORTED_ENVIRONMENT value is defined in the CExtControlBar::eDetectedUiType_t enumeration: enum eDetectedUiType_t
{
__EDUIT_UNSUPPORTED_ENVIRONMENT = 0, // UI is not compatible with dynamic bar site
__EDUIT_MDI_ORDINARY = 1, // simple MDI
__EDUIT_MDI_WITH_TABS = 2, // MDI with tabs
__EDUIT_SDI_TAB_PAGE_CONTAINER = 3, // SDI with tab page container
. . .
}; // enum eDetectedUiType_t This enumeration defines the types of environments supported by the dynamic bars. If you use dynamic bars in the main frame window of the SDI application or in the MDI child frame window, then the view window inside this frame should be the CExtTabPageContainerWnd class or derived from it. We guess this is not true for your MDI child frame window. Please check this issue.
|
|
Thomas Zaenker
|
Sep 27, 2005 - 10:28 AM
|
Dear support team, I have a problem with data exchange feature of CDialog and derived classes. If I first add a value connection to let’s say a checkbox and then a control connection with CExtCheckBox to the same control then my initial value (bool) is cleared (always false). If I swap the lines so that first the control and then the value DDX appears everything works fine. Is there a reason for this behavior? Best regards. Axel
|
|
Technical Support
|
Sep 27, 2005 - 11:35 AM
|
Thank you for the bug report. Please add the following line at the end of the CExtButton::PreSubclassWindow() method: m_nCheck = GetCheck(); After that all should work fine. This bug fix will be also available in the next release.
|
|
Simon DESEE
|
Sep 26, 2005 - 2:57 AM
|
Dear sir, I need to insert a CExtToolControlBar on a CExtResizableDialog without menu. I use the ProfStudio sample (CProfStudioClassView) code to insert my CExtToolControlBar. But no command handlers work. No buttons are enabled. Can you help me to know where the problem come from ? Thanks
|
|
Technical Support
|
Sep 26, 2005 - 9:48 AM
|
As you know, each menu/toolbar item (which is a user-interface object) needs to know whether it is enabled or disabled to display itself properly. If the framework does not find an ON_UPDATE_COMMAND_UI entry during command routing, it automatically enables the user-interface object if there is an ON_COMMAND entry somewhere for the same command ID. Otherwise, it disables the user-interface object. So to ensure your button is enabled, provide an update or command handler for the command ID. If it does not help, please send us some test project so that we can find out what’s wrong.
|
|
Mel Sampat
|
Sep 25, 2005 - 8:02 PM
|
Is there an easy way to turn off the gradient shading in the background of CExtResizableDialog? I would like to keep the standard Windows XP background color on the dialog, but still use the resizing capabilities of CExtResizableDialog. Thanks!
|
|
Technical Support
|
Sep 26, 2005 - 2:51 AM
|
Just create a CExtResizableDialog -derived class and override the WindowProc() virtual method in it: LRESULT CYourDialog::WindowProc(
UINT message, WPARAM wParam, lParam )
{
if( message == WM_PAINT || message == WM_ERASEBKGND )
return CDialog::WindowProc( message, wParam, lParam );
else
return CExtResizableDialog::WindowProc( message, wParam, lParam );
}
|
|
Massimo Germi
|
Sep 23, 2005 - 9:30 AM
|
I’m trying to compile new version of profuisdll but I have some errors: In "build view" I see ExtCmdManager.cpp C:\Develop\Microsoft Visual Studio\VC98\INCLUDE\transact.h(226) : error C2059: syntax error : ’constant’ C:\Develop\Microsoft Visual Studio\VC98\INCLUDE\transact.h(271) : error C2143: syntax error : missing ’;’ before ’}’ C:\Develop\Microsoft Visual Studio\VC98\INCLUDE\oledb.h(17149) : error C2143: syntax error : missing ’;’ before ’}’ C:\Develop\Microsoft Visual Studio\VC98\INCLUDE\oledb.h(17149) : error C2143: syntax error : missing ’;’ before ’}’ C:\Develop\Microsoft Visual Studio\VC98\INCLUDE\oledb.h(17149) : error C2143: syntax error : missing ’;’ before ’}’ I’m using VC6 + latest platform sdk What’s wrong? Thanks for the answer
|
|
Technical Support
|
Sep 23, 2005 - 10:11 AM
|
We would like to show you a sample from real life. We installed both Visual Studio 6.0 and Visual Studio .NET 2003 to our drive C:. Some of the exported functions of the Win32 API and Platform SDK are declared differently in older and newer SDK specifications. For example, the VarCmp() API, which is part of OLE automation, is defined in the "C:\Program Files\Microsoft Visual Studio\VC98\Include\oleauto.h" file of Visual Studio 6.0 as follows: STDAPI VarCmp(LPVARIANT pvarLeft, LPVARIANT pvarRight, LCID lcid); This API is defined in the "C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\PlatformSDK\Include\OleAuto.h" file of Visual Studio .NET 2003 (and any latest Platform SDK) as follows: STDAPI VarCmp(LPVARIANT pvarLeft, LPVARIANT pvarRight, LCID lcid, ULONG dwFlags); This example explains the source of the compilation problems. We strongly recommend you not use the latest Platform SDK with Visual Studio 6.0. It is oriented to latter versions of Visual Studio.
|
|
Massimo Germi
|
Sep 23, 2005 - 10:37 AM
|
I use VC6 (sp6) + latest PSDK from many month and I never had problems, I’ve also compiled profuisdll 2.42. If you see the following row you will see the include files are not in the PSDK directory but in std VC directory ExtCmdManager.cpp C:\Develop\Microsoft Visual Studio\VC98\INCLUDE\transact.h(226) : error C2059: syntax error : ’constant’ C:\Develop\Microsoft Visual Studio\VC98\INCLUDE\transact.h(271) : error C2143: syntax error : missing ’;’ before ’}’
I’ve configured VC order include directory, to process include PSDK directory as last, and std VC include directory as first.
|
|
Technical Support
|
Sep 24, 2005 - 11:06 AM
|
What do you think about connecting to your machine remotely and trying to fix the problem dealt with this particular situation? If you do not mind, just drop us an e-mail so that we can tell you how to set up a web conference.
|
|
Massimo Germi
|
Sep 26, 2005 - 3:49 AM
|
I don’t kwon how, but now I’ve fixed the problem. I made the following step: 1) I’ve reinstalled version 2.40, compiled ok; 2) I ’ve updated to 2.43, compiling error; 3) I’ve compared the differencies between ExtCmdManager.h (2.40 -> 2.43) and I have commented all new lines with #define __EXT_MFC_LANG_ID_(NEW LANGUAGES). 2.43 compiled ok; 4) I’ve uncommented the same lines; compiled ok; 5) I ’ve deinstalled all and I’ve installed WinXP pro ITA (sp2), VC6 ENG(sp6), latest PSDK, 2.43, compiling error; 6) I reexecutethe step 3 again, now working fine; I don’t knok why ... tx
|
|
Technical Support
|
Sep 26, 2005 - 11:34 AM
|
This situation can only be clarified by connecting to your desktop remotely. Otherwise, we have no chance to help you if some ambiguity left.
|
|
Tor Erik Ottinsen
|
Sep 23, 2005 - 7:45 AM
|
Is it possible to change the color of the grid lines in a grid ?
|
|
Technical Support
|
Sep 24, 2005 - 12:33 PM
|
Create a CExtGridWnd -derived class and override the OnGbwQueryCellGridLines() virtual method. Your method should simply return false . This removes default grid lines from the grid window. You also need to override the OnGbwPaintCell() virtual method in which you need to invoke the parent’s method and then draw your custom grid lines using the rcCell parameter as cell margins.
|
|
Tor Erik Ottinsen
|
Sep 23, 2005 - 6:33 AM
|
Is it possible to get a border around CExtEdit/CExtComboBox so they look more or less the same as the windows XP common controls?
|
|
Technical Support
|
Sep 24, 2005 - 12:26 PM
|
Why don’t use the standard classes CEdit and CComboBox to get the standard look?
In case of the edit controls, we can offer you the CExtFlatEdit class, which provides the edit control with a thin border drawn with the current color of the paint manager. You can find how to use this class in the ProfUIS-Controls sample.
Unfortunately such a feature has not been implemented for the combo boxes. We can add this task to our TODO list. Please let us know whether this feature is important for you.
|
|
Torsten Ihben
|
Sep 23, 2005 - 1:16 AM
|
Hi!
I have a problem concerning the PropertyGrid of version 2.43 from 15.9. - with an older version 2.43 the same code worked fine.
I have a set of general parameters. When these parameters are changed I iterate through the complete property tree and set some values to read-only, others are set to read-write, depending on the new value of the general parameters. After the style of these values has been set I call PropertyStoreSyncronize to refresh the grid. This works fine, except that the cell containing the general parameter I just changed is not updated. The value of this parameter is stored, so when I close the grid and build it again from scratch with the current values everything is displayed correctly.
Is there an alternative to PropertyStoreSyncronize to refresh the grid? An option would be an update of a single property value and its corresponding grid cell. Or is this behavior a bug in this release of Prof-UIS? Perhaps it’s even solved in a newer version...
Regards, Torsten Ihben
|
|
Technical Support
|
Sep 24, 2005 - 11:48 AM
|
To help you with regard to this particular problem, we need to reproduce it in one way or another. Could you send us a simple project that demonstrates the problem or a modified version of the PropertyGrid or SimpleProperties samples?
|