Subject |
Author |
Date |
|
Luis Alberto Pereira
|
Nov 8, 2004 - 6:19 AM
|
Hi all,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> <o:p> </o:p> Is it possible I get the button ellipse event handle of a determinated cell grid when this grid is a simple variable member of a MDI class, like CExtGridWnd m_grid;, or I need derivate it like: mygrid : public CextGridWnd and so override the event ?<o:p></o:p> <o:p> </o:p> Thanks,<o:p></o:p>
|
|
Technical Support
|
Nov 8, 2004 - 9:38 AM
|
To catch the button press event, you need to use your own CExtGridCell -derived class and override the OnButtonPressed virtual method. The cell button press event cannot be caught in some other way. How to define a custom cell type is described in the Prof-UIS Grid Brief Overview article.
|
|
Gevork Odabashyan
|
Nov 2, 2004 - 7:52 AM
|
Hello... Can I change the color of the control bar’s drag focus rectangle? Our users are disconviniened by this situation when dragging takes place over the MDI client area. Thank You, Ruslan
|
|
Technical Support
|
Nov 2, 2004 - 10:33 AM
|
Thank you for the interesting question. At the moment Prof-UIS does not provide the option of repainting the docking outline for the resizable bar being drag-and-dropped. We can implement this feature within a few days and provide you with a source code update.
Please note: Prof-UIS 2.26 implements the docking algorithm like in Visual Studio 2005 and there is no docking outlines at all.
Please let us know whether you need this feature.
|
|
Gevork Odabashyan
|
Nov 3, 2004 - 5:41 AM
|
We are very interested in this feature. Thanks for support, Ruslan
|
|
Technical Support
|
Nov 4, 2004 - 2:23 AM
|
We implemented this feature. Please take a look at this screenshot. Is it what you need? If so, we will send you an update.
|
|
Gevork Odabashyan
|
Nov 20, 2004 - 4:19 AM
|
Great thanks for quick and effective support! Your update works fine and looks good! Ruslan
|
|
Gevork Odabashyan
|
Nov 4, 2004 - 6:43 AM
|
Yes, it looks good. But please, change black/yellow color pair to black/white color pair.
|
|
Gevork Odabashyan
|
Nov 2, 2004 - 7:45 AM
|
Hello... How to display the string "Click Ctrl key to prevent docking" in status bar during control bar repositioning (Like Visual Studio 6.0)? Thank You, Ruslan
|
|
Technical Support
|
Nov 2, 2004 - 10:43 AM
|
The Click Ctrl key to prevent docking string is displayed automatically in the status bar’s pane whose identifier property is equal to zero. Prof-UIS automatically provides your apps with this feature. If you cannot see this string, then something goes wrong the status bar is initialized in your application.
If you need to set this text manually, then you may use the following method of the CExtControlBar class:static void stat_SetMessageString(
CWnd * pWnd,
UINT nCmdID = AFX_IDS_IDLEMESSAGE
); The pWnd parameter is your CFrameWnd -derived class, or any frame’s control bar, or any other window inside the frame. This method will automatically find the status bar and set the message loaded from the string table resource. The AFX_IDS_IDLEMESSAGE resource identifier corresponds to the standard "Ready string. The IDS_EXTSTATUS_PERVENT_DOCKING resource identifier corresponds to the Prof-UIS’s Click Ctrl key to prevent docking string.
|
|
Gevork Odabashyan
|
Nov 3, 2004 - 5:49 AM
|
I’m sorry, but any of Your samples doesn’t display this string. Does the status bar is initialized wrong in Your samples? Or what I need to do to properly initialize the staus bar? Thank You, Ruslan.
|
|
Technical Support
|
Nov 3, 2004 - 10:54 AM
|
You are absolutely right. The most samples do not display this string because they are linked to Prof-UIS statically. The "Hold Ctrl ..." string is loaded from the IDS_EXTSTATUS_PERVENT_DOCKING resource (Prof-UIS DLL resources). The IDS_EXTSTATUS_PERVENT_DOCKING constant is used as a WPARAM parameter of the MFC’s internal WM_SETMESSAGESTRING string that is handled by CFrameWnd to load an appropriate string and put it into the status bar’s pane whose identifier is equal to zero. So, we have no chance to use this string in apps statically linked to Prof-UIS. But you may copy this string into your app’s resources to let your frame window load this message successfully when any Prof-UIS control bar starts to be drag-and-dropped.
|
|
Gevork Odabashyan
|
Nov 4, 2004 - 6:21 AM
|
Thanks a lot. The problem was in static linkage, not in status bar’s pane identifier.
|
|
Dmitry Dulepov
|
Nov 3, 2004 - 8:15 AM
|
Quote: "The Click Ctrl key to prevent docking string is displayed automatically in the status bar’s pane whose identifier property is equal to zero"
|
|
Gevork Odabashyan
|
Nov 2, 2004 - 7:08 AM
|
Hello... In the help topic "How to insert menu items at runtime?" You say that "CExtPopupMenuWnd::g_nMsgPrepareMenu registered message... is generated each time any popup menu appears on the screen". But in my humble opinion this message is generated only for top-level popup menus. It is not generated for submenus. How can I insert items in submenu at runtime? Thank You, Ruslan.
|
|
Technical Support
|
Nov 2, 2004 - 10:03 AM
|
You are absolutely right. The CExtPopupMenuWnd::g_nMsgPrepareMenu registered windows message is sent for the entire menu tree. This mean you need to implement some recursive function that will be called from the message handler. It should traverse the menu tree and modify any menu item on any sublevel if needed. The "... any popup menu appears ..." phrase implies the entire popup menu tree.
LRESULT CMainFrame::OnExtMenuPrepare(
WPARAM wParam,
LPARAM lParam
)
{
lParam;
CExtPopupMenuWnd::MsgPrepareMenuData_t * pData =
reinterpret_cast
< CExtPopupMenuWnd::MsgPrepareMenuData_t * >
( wParam );
ASSERT( pData != NULL );
CExtPopupMenuWnd * pPopup =
pData->m_pPopup;
ASSERT( pPopup != NULL );
if( _DoMyMenuPrepare( pPopup ) )
pData->m_bMenuChanged = true;
}
LRESULT CMainFrame::_DoMyMenuPrepare(
CExtPopupMenuWnd * pPopup
)
{
// method returns true if pPopup items were changed
int nCount = pPopup->ItemGetCount();
for( int i = 0; i < nCount; i++ )
{
MENUITEMDATA & _mii = ItemGetInfo( ItemGetCount()-1 );
if( _mii.IsSeparator() )
continue;
if( _mii.IsPopup() )
{
CMainFrame::_DoMyMenuPrepare(
_mii.GetPopup()
);
continue;
}
// HERE IS:
// please insert your initialization code for the pPopup
// sublevel’s commands
}
}
|
|
Gevork Odabashyan
|
Nov 3, 2004 - 5:35 AM
|
Ambiguity disapeared. Thank You!
|
|
Bradley Bell
|
Oct 23, 2004 - 6:21 PM
|
Help. I’m getting an assert when I try and create a dialog based on CExtResizableDialog... CDialog does not exhibit this behavior. For example CMyDialog cDlg; cDlg.DoModal(); From dlgcore.cpp line 436 (using v2.26 - vc++ 7.1)
430: BOOL CDialog::InitModalIndirect(LPCDLGTEMPLATE lpDialogTemplate, CWnd* pParentWnd, void* lpDialogInit)
432: { 433: // must be called on an empty constructed CDialog
434: ASSERT(m_lpszTemplateName == NULL);
435: ASSERT(m_lpDialogTemplate == NULL);
436: ASSERT(lpDialogTemplate != NULL); 438: if (m_pParentWnd == NULL)
439: m_pParentWnd = pParentWnd;
441: m_lpDialogTemplate = lpDialogTemplate;
442: m_lpDialogInit = lpDialogInit; 444: return TRUE; // always ok (DoModal actually brings up dialog)
}
Thanks for any help, - Bradley
|
|
Technical Support
|
Oct 25, 2004 - 11:00 AM
|
We sent you an update that should resolve the problem by e-mail. We plan to publish this update within a few days.
|
|
Dmitry Dulepov
|
Oct 25, 2004 - 2:55 PM
|
Same for me. Dialog template is NULL... Would be nice if you publish the fix sooner.
|
|
Saroj Acharya
|
Oct 19, 2004 - 9:29 AM
|
Hi, I had my application running in V2.251(with the patch loaded) and I downloaded the latest version V2.26 yesterday and tried to compile it. It compiles OK but it gives ASSERT when I try to run the application. The problem is in occMgr.cpp file line # 460. Looks like it was trying to create a window for dialog box. Earlier with V2.251, I had some problem closing down my MDI Child windows and was hoping the bug fix in V2.26 would resolve this issue but it got worse. Will email you the entire code if needed. I am pushed against the wall with the deadline... Your prompt help is highly appreciated. Saroj
|
|
Technical Support
|
Oct 20, 2004 - 3:07 AM
|
Dear Saroj,
We cannot reproduce the problem you are reporting. Please send us your (test) project so that we can help you resolve the issue as soon as possible.
|
|
Saroj Acharya
|
Oct 20, 2004 - 9:01 AM
|
Hi, Thanks again for such a prompt response. I will definitely send you the source code but I am afraid that you might not be able to instantiate the Matrox ActiveMIL OCX in the project. That is where it fails. Matrox ActiveMIL has got strict protection system and it will not run without a developer hardware or runtime hard dangol. Let me explain you the problem that I am having. 1. I have a dialog box with one of their ActiveX control called ActiveMIL Display control. This control is used to grab a live video from the camera and disply on it. When I try to load the dialog in ONCreate() routine of Mainframe.cpp, it gives a ASSERT on the line marked in Red and Bold below. The code is as below:
#ifdef ACTIVEMIL_IN_PROJECT
if(!m_wndImageCapture.Create( _T("Image Capture Window"),
this,
ID_VIEW_CAPTURE_WINDOW
) )
{
TRACE0("Failed to create Image Capture Window...\n");
return -1; // fail to create
}
if(!m_dlgForImageCapture.Create( IDD_IMAGE_CAPTURE_DIALOG, &m_wndImageCapture) )
{
TRACE0("Failed to create Image Capture Window...\n");
return -1; // fail to create
}
m_dlgForImageCapture.ShowSizeGrip( FALSE );
m_dlgForImageCapture.SetOwnerAppSystemAndDigitizer(pApplication, pSystem, pDigitizer, blnOFFLineVersion);
// Set this window not to be visible in the right-click pop-up menu
m_wndImageCapture.m_bAppearInDockSiteControlBarPopupMenu = FALSE;
#endif
2. On my MDI Child window, I create the same OCX control and use it to disply the images captured. However, I create the control using the following lines of code and attach it with the View(this code is executed inside the DrawVW.cpp:
pApplication = ((CMainFrame*) AfxGetMainWnd())->GetApplication();<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p>
pDisplay = pApplication->CreateObject(_T("MIL.Display"), FALSE);<o:p></o:p>
if (pDisplay->DisplayType == dispDualScreen ||<o:p></o:p>
pDisplay->DisplayType == dispNonWindowed ||<o:p></o:p>
pDisplay->DisplayType == dispVideoEncoderNonWindowed)<o:p></o:p>
{<o:p></o:p>
SetMessage("This example does not run in dual screen mode.");<o:p></o:p>
return(FALSE);<o:p></o:p>
}<o:p></o:p>
// Set the owner system and the image of the display<o:p></o:p>
pDisplay->OwnerSystem = OwnerSystem;<o:p></o:p>
pDisplay->Image = Image;<o:p></o:p>
pDisplay->DisplayType = dispUserWindow;<o:p></o:p>
pDisplay->UserWindow = (long)m_hWnd;<o:p></o:p>
pDisplay->OverlayLUT->NumberOfBands = 3;<o:p></o:p>
// Allocate the display<o:p></o:p>
pDisplay->Allocate();
The code was working OK with earlier version of Prof_UI (V2.251) but when I try to close the MDI Child window, it used to give ASSERT and would never close. I thought it was a bug in the Prof_UI code because double-clicking on the upper-left box of an application used to give ASSERT. Life is not easy...isn’t it ? Any thoughts is highly appreciated. I will contact your technical support for further discussion and email you the sample project. Sorry for writing the entire story here. I thought some forum member would also benefit from the problem I am having. Saroj
|
|
Technical Support
|
Oct 20, 2004 - 11:40 AM
|
Dear Saroj,
There is only one requirement for using ActiveX controls in MFC projects: AfxEnableControlContainer() should be called when the applications starts(usually in the InitInstance method of any CWinApp -derived class). Windowed ActiveX controls are based on the HWND objects. So, perceive them just as ordinary windows with some API compliant to the COM/ActiveX standard. Please try to use some another ActiveX control in your project (instead of Matrox ActiveMIL). For instance, you may use the calendar control from Microsoft. Please let us know the result of this try or sent us the source code.
|
|
Saroj Acharya
|
Oct 20, 2004 - 2:33 PM
|
Hi, I sent you the entire project in my earlier email. Looks like I cannot show any of my dialog boxes (Normal dialog boxes without any OCX on it) with V2.26. Could you please compile the code and see if you can disply any of the dialog boxes by selecting Configuration->Grid Configuration from the menu. I do have AfxEnableControlContainer() in my application and it gets called in InitInstance() function. Follwoing is the snipset of this function:
BOOL CDrawApp::InitInstance() { SetRegistryKey( _T("NepsysInc") ); // Initialize OLE libraries if (!AfxOleInit()) { AfxMessageBox(IDP_OLE_INIT_FAILED); return FALSE; } AfxEnableControlContainer(); // Standard initialization // If you are not using these features and wish to reduce the size // of your final executable, you should remove from the following // the specific initialization routines you do not need.
#if _MFC_VER < 0x700#ifdef _AFXDLL Enable3dControls(); // Call this when using MFC in a shared DLL #else Enable3dControlsStatic(); // Call this when linking to MFC statically #endif #endif LoadStdProfileSettings(); // Load standard INI file options (including MRU) // Register the application’s document templates. Document templates // serve as the connection between documents, frame windows and views.
......
Looking forward to your response. Saroj
|
|
Dmitry Dulepov
|
Oct 20, 2004 - 5:17 AM
|
I may confirm that MDI works ok with all 2.25.x an 2.26 versions that I have. My app uses a lot of different kind of windows (including: MDI, page container, toolbars, menus, etc) and it all works.
May be MDI window is closed by a method other than MDIDestroy?..
|
|
Saroj Acharya
|
Oct 21, 2004 - 4:36 PM
|
Hi Dmitry, I did some more debugging and found that when the MDI window is destroyed by clicking X on the upper-left corner, it actually calls MDIDestroy() function. However, Only the frame window is destroyed during this process but not the View. I had break-points at the destructor of Frame Window and the View. Only the destructor of the Framewindow is called when MDIDestroy() function is called. I created a similar MFC application (with No Prof_UI) and it in fact goes to both of the destructor and it works well. Any idea why this is happening. Appreciate your help. Saroj
|
|
Technical Support
|
Oct 22, 2004 - 5:22 AM
|
Dear Saroj,
We cannot confirm this bug. The MDIDOCVIEW sample application has the CChildFrame and CMDIDOCVIEWView classes with destructors. The destructors are always called correctly if you close the MDI child frame window with Ctrl+F4 keys, by clicking on the "X"-button or by double-clicking the system icon in the normal or minimized state, by clicking the "X"-button in the menu bar in the maximized state. We believe the problem hides somewhere in your app. Of course, you may send us any source code that demonstrates this problem.
|
|
Dmitry Dulepov
|
Oct 22, 2004 - 1:53 AM
|
Do you have OnDestroy handler for the MDI frame? Do you call parent class OnDestroy in it? If not, client will not be destroyed.
|
|
Saroj Acharya
|
Oct 22, 2004 - 11:49 AM
|
Hi Dimitry and Tech Support, I do not have OnDestroy(0 function in the MDIFrame window but do I OnDestroy() function in my View window (which is derived from CScrollView). In fact my application is based on your DrawCLI sample application and additional code. The underlying structure for the application should be same. When the View is closed, OnDestroy() function of the View is called and it calls the CScroillView::OnDestroy() function....No suprises there !! As I said in my earlier post, I have a raw MFC MDI test application that basically does the same thing (except that the UI is very very ugly) and it gets closed normally. Both Frame destructor and View destructor are called. Only time I hae problem is when I used Prof_UI and Matrox ActiveMIL controls inside the MDIChild client area (See next para for further info) . Matrox control has an option to disply the image on the floating window instead of in the client area of the view. I did change my code to do that and it works OK. The destructor of the View is called and window gets removed from the view. For obvious reason, I cannot let the window float. It should be displayed on the client area of the MDIChild. The following lines of code does the magic of using the view window for displaying the image on the clwint area instead of floating window:
pDisplay->DisplayType = dispUserWindow;
HWND hWndChild;
hWndChild = m_hWnd;
pDisplay->UserWindow = ( long)m_hWnd;Follwoing is the description from their manual about these settings. I hope it will help you find a source of the problem: 1. Display -> UserWindow<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p> <o:p></o:p> Synopsis<o:p></o:p> Returns or sets the user window used by the Display control for displaying the image. <o:p></o:p> [Visual Basic]<o:p></o:p> Syntax <o:p></o:p> object.UserWindow [= Long]<o:p></o:p> [Visual C++]<o:p></o:p> Syntax <o:p></o:p> object->UserWindow [= long]<o:p></o:p> Type description<o:p></o:p> A long value that specifies the hWnd of the control or form into which you want to display images. <o:p></o:p> Remark<o:p></o:p> 2. Display ->DisplayType <o:p></o:p> Synopsis<o:p></o:p> Returns or sets the type of display. <o:p></o:p> [Visual Basic]<o:p></o:p> Syntax <o:p></o:p> object.DisplayType [= DispDisplayTypeConstants]<o:p></o:p> [Visual C++]<o:p></o:p> Syntax <o:p></o:p> object->DisplayType [= enum DispDisplayTypeConstants]<o:p></o:p> Type description<o:p></o:p> A DispDisplayTypeConstants expression that specifies the type of display. <o:p></o:p> <TABLE style="mso-cellspacing: 1.5pt" cellPadding=0 border=0> <THEAD> <TR style="HEIGHT: 17.25pt"> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 17.25pt; BACKGROUND-COLOR: transparent">
Value<o:p></o:p> </TD> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 17.25pt; BACKGROUND-COLOR: transparent"> Meaning<o:p></o:p> </TD></TR></THEAD> <TBODY> <TR> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> dispDefaultWindow <o:p></o:p> </TD> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> Displays in the control’s own window. <o:p></o:p> </TD></TR> <TR> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> dispUserWindow <o:p></o:p> </TD> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> Displays in a user-specified window. <o:p></o:p> </TD></TR> <TR style="HEIGHT: 16.65pt"> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 16.65pt; BACKGROUND-COLOR: transparent"> dispExternalWindow <o:p></o:p> </TD> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; HEIGHT: 16.65pt; BACKGROUND-COLOR: transparent"> Displays in an external window created by ActiveMIL. <o:p></o:p> </TD></TR> <TR> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> dispAuxiliary <o:p></o:p> </TD> <TD style="BORDER-RIGHT: #d4d0c8; PADDING-RIGHT: 0.75pt; BORDER-TOP: #d4d0c8; PADDING-LEFT: 0.75pt; PADDING-BOTTOM: 0.75pt; BORDER-LEFT: #d4d0c8; PADDING-TOP: 0.75pt; BORDER-BOTTOM: #d4d0c8; BACKGROUND-COLOR: transparent"> Displays the image without a surrounding window. <o:p></o:p> </TD></TR></TBODY></TABLE> <o:p></o:p> Remarks<o:p></o:p> <o:p></o:p> <o:p></o:p> <o:p></o:p> <o:p></o:p> <o:p></o:p> <o:p></o:p>
|
|
Dmitry Dulepov
|
Oct 25, 2004 - 1:14 AM
|
Child window may prevent parent from destroying. Probably you should destroy the control first and the OnDestroy handler of the view and then (important: *after* control is destroyed!) call CScrollView::OnDestroy
|
|
Saroj Acharya
|
Oct 25, 2004 - 12:54 PM
|
Hi Dmitry, I tried deleting the object resources before calling the function CScrollView::OnDestroy() but it did not help. Please remember that the Control is using the Client Area window of the View for displaying the picture. That’s why there is no extra window to be destroyed. Furthermore, I found that when this control is created and client window is used to display the picture, OnNcDestroy() function was not being called and CView was never removed from the list iof views where as the frame window was already deleted. I could successfully close the window by calling OnNcDestroy() function from my OnDestroy() function. Sadly, enough, it created another problem....When I close my MDI frame window, it gives ASSERT on the following line of the file wincore.cpp line # 1002:
ASSERT(pMap->LookupPermanent(hWndOrig) == NULL); This must be because the MDIFrame thinks that the window that was forced delete is still in it’s list of windows to be closed and deleted. I came to this conclusion because if I do not open any MDI Child windows, the frame window closes smoothly. Can you suggest a better way to force close the MDI Chuild window ? Finally, I still believe that there is some problem with Prof_UI code for my application. If the same scenario is created using raw MFC, I do not get any error. I hope you will be able to track down the problem and get it fixed soon. Please let me know if I could be of any help. I will be glad to provide you more information. I could even send you the MIL CD-ROM and a hardware dangol for your development along with my source code if you think that could make your side of debugging easier. Thanks a lot for your help...I am going to try somethuing more and will let you know if I make any progress. Regards, saroj
|
|
Technical Support
|
Oct 26, 2004 - 1:00 AM
|
Dear Saroj,
Could you send us this ActiveX object only. It should work even without required hardware. We wonder what’s wrong with it.
|
|
Saroj Acharya
|
Oct 29, 2004 - 11:50 AM
|
Hi Tech Support, Your sample test application was running good. I modified and added my code into it and it still works OK. However, my application was compiled in UNICODE where as the sample app was in multi byte. When I switched the compilation to UNICODE for the sample application, I saw the same problem. Looks like there is some issue with UNICODE library. For now, I am going to use MBCS settings and proceed with my development and I would like to switch to UNICODE one day for multi language support. Please let me know if any of this make any sense. I cannot thank you enough for the superb support. saroj
|
|
Technical Support
|
Nov 1, 2004 - 3:35 AM
|
Dear Saroj,
The project we sent you uses the MBCS character system. To convert it into Unicode, just remove the _MBCS symbol and add the _UNICODE symbol in the preprocessor settings for all project’s configurations. Please also put the wWinMainCRTStartup text into the "Entry-point symbol" field of the linker settings for all build configurations.
|
|
Saroj Acharya
|
Nov 1, 2004 - 10:19 AM
|
Hi Tech support, I already compiled your test application both in UNICODE and MBCS version. The problem is there only in UNICODE version where as it works OK in MBCS version. That is what I was trying to point out in my earlier post. I might not be very clear in the post. PLease let me know if it makes any sense... Looking forward to your comment. Saroj
|
|
Technical Support
|
Nov 2, 2004 - 3:43 AM
|
Dear Saroj,
The problem may be caused by improper use of TCHAR -related preprocessor macroses in your project settings. You app should work both with Unicode and with MBCS. Could you send us your latest project version based on our sample template project?
|
|
Art Poley
|
Sep 30, 2004 - 11:01 AM
|
I’ve noticed this behavior in my application and your sample apps. If I double click in the upper lefthand corner of an application to terminate it, I get the following exception: Debug Assertion Failed! Program: ...\MyApp\MyApp Debug.exe File: C:\...\Prof-UIS Source\Src\ExtPopupMenuWnd.cpp Line: 8841 What can I do to avoid this exception? Thanks, *** Art Poley ***
|
|
Technical Support
|
Oct 1, 2004 - 5:01 AM
|
Dear Art,
We have already fixed this bug and can provide you with the source code update via email.
|
|
Saroj Acharya
|
Oct 11, 2004 - 9:19 AM
|
Hi Tech support, Can I also receive the fix for this bug. I currently have V2.251 and I still have this problem with my app. Please send me the code at sacharya03@yahoo.com. Thanks, Saroj
|
|
Technical Support
|
Oct 12, 2004 - 1:35 AM
|
Dear Saroj,
The new version, which includes MS VS 2005 GUI theme, docking markers, automation support and more, will be released very soon. We sent you a link to our ftp site for the registered users by e-mail.
|
|
Saroj Acharya
|
Oct 18, 2004 - 3:18 PM
|
Thanks. I downloaded the V2.26 and had problem installing it this morning but seems you fixed the problem in the afternoon. Will let you know if I have further difficulty in getting it working. It is generating the library files now... Saroj
|
|
Art Poley
|
Sep 27, 2004 - 9:39 AM
|
I have an MDI application that contains a Dockable CExtTabPageContainerFlatWnd with three different tree controls. I then have several Doc/Views available for manipulation of graphic objects. The Mouse wheel event, ON_WM_MOUSEWHEEL, is used within my views to provide a mechanism for the user to zoom in/out. What I’m noticing is whenever I manipulate/change focus to my treeview and then back to my CView the mousewheel event is no longer being delivered. Each tree control is being created with the following: if( !this->Create( WS_CHILD|WS_VISIBLE|WS_VSCROLL|WS_HSCROLL|WS_TABSTOP |TVS_HASBUTTONS|TVS_HASLINES|TVS_LINESATROOT |TVS_INFOTIP|TVS_DISABLEDRAGDROP |TVS_SHOWSELALWAYS|TVS_TRACKSELECT, CRect(0,0,0,0), m_pTabsContainer, UINT(IDC_STATIC) ) ) Any thoughts as to why? Thanks in advance, *** Art Poley ***
|
|
Technical Support
|
Sep 28, 2004 - 7:02 AM
|
Dear Art,
We recommend you to use the MFC’s message pretranslating mechanism to implement the user-friendly mouse wheel handling. The main frame’s PreTranslateMessage method may look like:
BOOL CMainFrame::PreTranslateMessage( MSG * pMSG )
{
if( pMSG->message == WM_MOUSEWHEEL )
{
if( m_wndTree1.PreTranslateMessage( pMSG ) )
return TRUE;
if( m_wndTree2.PreTranslateMessage( pMSG ) )
return TRUE;
if( m_wndTree3.PreTranslateMessage( pMSG ) )
return TRUE;
. . .
CView * pView = GetActiveView();
if( pView != NULL )
if( pView->PreTranslateMessage( pMSG ) )
return TRUE;
}
return CBaseClassOfYourMainFrame::PreTranslateMessage( pMSG );
} This method in the view class or tree control-derived class may look like: BOOL CYourControlOrView::PreTranslateMessage( MSG * pMSG )
{
if( pMSG->message == WM_MOUSEWHEEL )
{
if( CExtToolControlBar::g_bMenuTracking )
return FALSE;
if( CExtPopupMenuWnd::IsMenuTracking() )
return FALSE;
if( GetSafeHwnd() == NULL )
return FALSE;
if( ! IsWindowVisible() )
return FALSE;
if( ! IsWindowEnabled() )
return FALSE;
CPoint ptCursor = pMsg->lParam;
HWND hWndFromPoint = ::WindowFromPoint( ptCursor );
if( hWndFromPoint != m_hWnd )
return FALSE;
CScrollBar * pScrollBarWnd = GetScrollBarCtrl( SB_VERT );
if( pScrollBarWnd->GetSafeHwnd() != NULL )
{
if( ! pScrollBarWnd->IsWindowEnabled() )
return FALSE;
}
else
{
DWORD dwWndStyle = CWnd::GetStyle();
if( ( dwWndStyle & WS_VSCROLL ) == 0 )
return FALSE;
}
int uWheelScrollLines = (int)
g_PaintManager.GetMouseWheelScrollLines();
int nToScroll =
::MulDiv( -zDelta, uWheelScrollLines, WHEEL_DELTA );
if( nToScroll > 0 )
{
for( ; nToScroll > 0; nToScroll -- )
SendMessage(
WM_VSCROLL, SB_LINEDOWN, LPARAM(pScrollBarWnd->GetSafeHwnd()) );
}
else if( nToScroll < 0 )
{
for( nToScroll =
- nToScroll; nToScroll > 0; nToScroll -- )
SendMessage(
WM_VSCROLL, SB_LINEUP, LPARAM(pScrollBarWnd->GetSafeHwnd()) );
}
}
return CBaseClassOfYourControlOrView::PreTranslateMessage
( pMSG );
} This code will let you scroll the controls covered by the mouse pointer absolutely independently of the focused window state. This is the best way to handle the mouse wheel. The same mouse wheel behavior is implemented in the MS Office applications. Of course, you may improve the scrolling code and implement the horizontal scrolling when the CTRL key is pressed or when no vertical scrolling is available. It is also possible to implement the page up/down scrolling when some key is hold down.
|
|
Art Poley
|
Sep 16, 2004 - 10:05 AM
|
We frequently move several CExtToolControlBar bars around in our application. With our debug version, we frequently hit the following ASSERT statement within the Prof-UIS libraries: void CExtDockOuterBar::_AffixmentBringToTop( CExtControlBar * pBar ): <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p> </o:p> Line 5081: ASSERT( nWeight2 != nWeightX ); <o:p> </o:p> <o:p>Why is this occurring?</o:p> <o:p></o:p> <o:p>Thanks in advance,</o:p> <o:p></o:p> <o:p>*** Art ***</o:p>
|
|
Technical Support
|
Sep 17, 2004 - 8:15 AM
|
To find out why this assertion happens, we need to play around with an application that has the same control bars like in your program because the size of each bar and a set of buttons is important to reproduce this assertion. Could you send us such a project? We need only CYourApp, CMainFrame and resources. All other dependencies we will remove manually.
|
|
Gevork Odabashyan
|
Sep 10, 2004 - 7:34 AM
|
Hello... The two methods CMainFrame have been shown in your samples : OnBarCheck and OnUpdateControlBarMenu. The current samples version has implementation like this: void CMainFrame::OnUpdateControlBarMenu(CCmdUI* pCmdUI) { // CFrameWnd::OnUpdateControlBarMenu( pCmdUI ); CExtControlBar::DoFrameBarCheckUpdate( this, pCmdUI, false ); } BOOL CMainFrame::OnBarCheck(UINT nID) { // return CFrameWnd::OnBarCheck( nID ); return CExtControlBar::DoFrameBarCheckCmd( this, nID, false ); } As far as I understand this, there are two variants of the implementation for this methods. CExtControlBar-based implementation complies the VS.NET-like control bars. First, as mentioned in Your help, in this case "no check marks and are only used to activate resizable control bars". But tooltips for this control bars are still "Show / hide xxx-bar". Can You correct this little mismatch? The second is menu question from my email to Your support. My dynamic control bars are are fixed-size control bars, derived from CExtPanelControlBar. I don’t want to use registered icons for them. All I want is checked/unchecked icons such as "status bar" command have. What I need to do for that? Ruslan.
|
|
Technical Support
|
Sep 13, 2004 - 11:52 AM
|
Indeed if the auto-hide feature (with respect to the resizable control bars) is used in your app, then appropriate commands always display these bars and their visibility cannot be controlled. We will fix this in the next Prof-UIS release. If this problem is critical for you right now, we will provide you with the update in a few days.
As for the second question, if you allocate the command identifiers for your dynamic control bars in the command manager and do not assign icons to these commands, only check-marks will be displayed, which is exactly what you need. Please provide us with more details on how you implemented dynamic panel bars in your app or let us take a look at your source code.
|
|
Gevork Odabashyan
|
Sep 14, 2004 - 4:35 AM
|
Ok, tell me please when the menthoned release will be chiped? Here are some parts of source code about second problem: Suppose that class CMainFrame : public CMDIFrameWnd { ... typedef map <LONG, CExtPanelControlBar*> CDealControlBars; CDealControlBars m_mapCP2DealDockedWnds; ... }; This method creates dynamic control bars and corresponding commands from registry’s data:
void CMainFrame::LoadNonMDIDealWndsState(const CString& strLogin) { if (!strLogin.IsEmpty()) { try { CMemFile file; CTTApp* pApp = static_cast<CTTApp*>(AfxGetApp()); CString strRegKeyPath = ... if (CExtCmdManager::FileObjFromRegistry(file, strRegKeyPath)) { CArchive ar(&file, CArchive::load); int nCount = 0; ar >> nCount; LONG nCPID = 0; UINT nChildID = 0; CString strDealWnd((LPCSTR)IDS_DEAL_WINDOW); for (int i = 0; i < nCount; ++i) { ar >> nCPID; ar >> nChildID; CString caption; CExtPanelControlBar* pControlBar = new CExtPanelControlBar; pControlBar->m_bAutoDelete = TRUE; if( !pControlBar->Create( caption, this, nChildID, WS_CHILD |CBRS_LEFT|CBRS_GRIPPER|CBRS_TOOLTIPS |CBRS_FLYBY|CBRS_SIZE_DYNAMIC |CBRS_HIDE_INPLACE|CBRS_FLOAT_MULTI ) ) { CString strFormat(_T("CMainFrame::LoadNonMDIDealWndsState: Failed to create deal control bar, CPID is %d")); CString strMsg; strMsg.Format(strFormat, nCPID); ReportInternalError(strMsg); continue; } bool bSuccess = false; CDealView* pView = (CDealView*)RUNTIME_CLASS(CDealView)->CreateObject(); if (pView) { CCreateContext context; context.m_pCurrentFrame = NULL; context.m_pCurrentDoc = NULL; context.m_pNewViewClass = NULL; context.m_pNewDocTemplate = NULL; context.m_pLastView = NULL; if (pView->Create(NULL, NULL, WS_CHILD | WS_VISIBLE, m_rcDealView, pControlBar, AFX_IDW_PANE_FIRST, &context)) { pView->ModifyStyleEx(0, WS_EX_CLIENTEDGE, SWP_FRAMECHANGED | SWP_DRAWFRAME); m_mapCP2DealWindow.insert(make_pair(nCPID, pView)); pView->SetCPID(nCPID); pView->Dock(); bSuccess = true; } } if (bSuccess) { CExtCmdItem cmdBar; cmdBar.m_nCmdID = nChildID; cmdBar.m_sMenuText = _T(" - ") + strDealWnd; g_CmdManager->CmdSetup( __PROF_UIS_PROJECT_CMD_PROFILE_NAME, cmdBar, true, NULL); m_mapCP2DealDockedWnds.insert(make_pair(nCPID, pControlBar)); pControlBar->EnableDocking(CBRS_ALIGN_ANY); m_ctrlBarChildIDGenerator.ExcludeValue(nChildID); } else { pControlBar->DestroyWindow(); } } } } catch(...) { } } } And this method modifies "View" submenu of the main menu:
LRESULT CMainFrame::OnExtMenuPrepare(WPARAM wParam, LPARAM lParam) { CExtPopupMenuWnd::MsgPrepareMenuData_t* pData = reinterpret_cast<CExtPopupMenuWnd::MsgPrepareMenuData_t*>(wParam); ASSERT (pData != NULL); CExtPopupMenuWnd* pPopup = pData->m_pPopup; ASSERT (pPopup != NULL); INT nReplacePos = pPopup->ItemFindPosForCmdID(ID_LIST_OF_ALL_BARS); if (nReplacePos >= 0) { VERIFY(pPopup->ItemRemove(nReplacePos)); if (!m_mapCP2DealDockedWnds.empty()) { if (pPopup->ItemInsert((UINT)CExtPopupMenuWnd::TYPE_SEPARATOR)) { for (CDealControlBars::iterator bar_it = m_mapCP2DealDockedWnds.begin(); bar_it != m_mapCP2DealDockedWnds.end(); ++bar_it) { pPopup->ItemInsert(bar_it->second->GetDlgCtrlID())) } } } } return TRUE; } What I need to correct? Or You need more source code?
|
|
Technical Support
|
Sep 15, 2004 - 7:13 AM
|
The source code you published here does not contain enough details on how dynamic panel bars are created. Several important things are missing. For example, what is m_ctrlBarChildIDGenerator and how does it work? Could you send us your source code? You may send only CYourApp , CMainFrame , CYourChildFrame , CYourView , CYourDoc classes and the project file. We will remove dependencies from the remained source code manually. This will let us help you much faster.
|
|
Gevork Odabashyan
|
Oct 1, 2004 - 5:47 AM
|
Hello... I wrote the simple test application to illustrate my problem. In context of my problem it is identical to our real application, exept UI persistance. But I suppose UI persistance is meaningless in this case. This is a MDI application with CFormView-based views. I want them to be dockable. I use fixed-sized control bars for this. So tell me please, what’s wrong with check/uncheck icons of dynamic control bars? I sent the test application on your email. Thank You, Ruslan.
|
|
Art Poley
|
Sep 9, 2004 - 11:15 AM
|
Hello... I need to be able to dynamically generate menus for a dropdown button within a CExtToolControlBar. Previously, I would simply do the following: ON_NOTIFY(TBN_DROPDOWN, IDR_VIEWTOOLBAR, OnDropDown) m_wndToolBar.GetToolBarCtrl().SetExtendedStyle( TBSTYLE_EX_DRAWDDARROWS ); TBBUTTONINFO tbi; tbi.dwMask= TBIF_STYLE; tbi.cbSize= sizeof(TBBUTTONINFO); m_wndToolBar.GetToolBarCtrl().GetButtonInfo(ID_VIEW_SETCURRENTVIEW, &tbi); tbi.fsStyle |= TBSTYLE_DROPDOWN; m_wndToolBar.GetToolBarCtrl().SetButtonInfo(ID_VIEW_SETCURRENTVIEW, &tbi); void CMainFrame::OnDropDown(NMHDR* pNotifyStruct, LRESULT* pResult) { // Create & track my menu here... } With Prof-UIS, I can get a menu associated with a button via: CMenu _menu; VERIFY( _menu.LoadMenu(IDR_VIEWMENU) ); int nBtnIdx = m_wndViewToolBar.CommandToIndex(ID_VIEW_SETCURRENTVIEW); m_wndViewToolBar.SetButtonMenu( nBtnIdx, _menu.Detach() ); CExtBarButton* pButton = m_wndViewToolBar.GetButton(nBtnIdx); pButton->SetNoRotateVerticalLayout(); pButton->SetSeparatedDropDown(); What I need is to be able to dynamically create a menu for the button whenever a dropdown occurs for that button. How do I do this in Prof-UIS? Thanks in advance, *** Art Poley ***
|
|
Technical Support
|
Sep 10, 2004 - 3:59 AM
|
Dear Art,
Yes, you can construct Prof-UIS popup menus dynamically and modify any kind of menus on-the-fly (those dropped down from toolbar/menu bar buttons or context menus). We advise you to use pre-defined command identifiers. For example, MFC uses the standard ID_FILE_MRU_FILE1 command identifier in menus to replace it with the list of recent files dynamically when a popup menu appears on the screen. So, add some IDR_MY_POPUP_MENU menu resource to your project. This menu should contain one popup item with one command inside. Let this command be identified by ID_MY_DYNAMIC_LIST . At runtime, the item specified with ID_MY_DYNAMIC_LIST should be replaced with a list of your custom commands and/or popup submenus. In the CMainFrame::OnCreate() update the command manager and assign the popup menu to some button in the toolbar: VERIFY(
g_CmdManager->UpdateFromMenu(
pApp->m_pszProfileName, // command profile name string
IDR_MY_POPUP_MENU // resource ID of button’s popup menu
)
);
. . .
INT nBtnIdx =
m_wndToolBar.CommandToIndex(
ID_MY_BUTTON_THAT_SHOULD_HAVE_MENU
);
ASSERT( nBtnIdx >= 0 );
CMenu my_button_menu;
VERIFY( my_button_menu.LoadMenu( IDR_MY_POPUP_MENU ) );
VERIFY(
m_wndToolBar.SetButtonMenu( nBtnIdx, my_button_menu.Detach() )
);
Now let’s add a message handler for the CExtPopupMenuWnd::g_nMsgPrepareMenu registered windows message. This will allow you to modify any menus on-the-fly. Add this line to the CMainFrame class declaration:<code>afx_msg LRESULT OnExtMenuPrepare(WPARAM wParam, LPARAM lParam);
and this entry to to the frame’s message map: ON_REGISTERED_MESSAGE(
CExtPopupMenuWnd::g_nMsgPrepareMenu,
OnExtMenuPrepare
)
Here is the method’s body: LRESULT CMainFrame::OnExtMenuPrepare(WPARAM wParam,
LPARAM lParam)
{
CExtPopupMenuWnd::MsgPrepareMenuData_t * pData
= reinterpret_cast <
CExtPopupMenuWnd::MsgPrepareMenuData_t *
> ( wParam );
ASSERT( pData != NULL );
CExtPopupMenuWnd * pPopup = pData->m_pPopup;
ASSERT( pPopup != NULL );
// NOW WE CAN FIND AND REMOVE THE PREDEFINED COMMAND
INT nItemPos = pPopup->ItemFindPosForCmdID( ID_MY_DYNAMIC_LIST )
if( nItemPos >= 0 )
{ // if the predefined command was found
pPopup->ItemRemove( nItemPos );
// NOW WE CAN INSERT ANY OTHER ITEMS AT nItemPos POSITION
pPopup->ItemInsert( command_identifier, nItemPos );
// or
pPopup->ItemInsertCommand( command_identifier, nItemPos );
} // if the predefined command was found
}
Please note that the CMainFrame::OnExtMenuPrepare() method is called only once for each popup menu tree (NOT for each popup menu sublevel!). So, in the general case the routing of dynamic menu initialization is a recursive function. You need to use pPopup->ItemInsert() if your commands are registered in the command manager or pPopup->ItemInsertCommand() otherwise.
|
|
Saroj Acharya
|
Sep 7, 2004 - 11:13 AM
|
Hi, There might be few bugs here and there, few features not working well (not unusual if you really are a programmer) and may be the documentation is not 100% perfect (who can be perfect...not even GOD), I find the comment very harsh and inappropriate. As far as I am concerned, I am very happy with the support I am getting from Prof-UIS and I do not expect them to work for free either. I don’t think the comments like this are very encouraging for Prof-UIS customer support. Please hold your anger, do little more research plus reading before pouring your anger on this board. Saroj PS: I am not affiliated with Prof-UIS in any way. I am just one of their customer.
|
|
Neville Franks
|
Sep 7, 2004 - 12:50 AM
|
When a control bar is floating a double click on the title bar docks it on other applications, but not in prof-uis. If it is docked and you double click on the title bar it does float, as it should. How do I get double click to dock it when floating?
|
|
Technical Support
|
Sep 9, 2004 - 11:08 AM
|
Dear Neville,
We have not yet implemented this. The reason is, on the one hand, Prof-UIS dockable control bars are based on the MFC’s algorithms and, on the other, Prof-UIS supports too much complicated layouts of resizable control bars (you can place control bars in any combinations) to be compatible with MFC. By the way, Visual Studio .NET control bars are not compatible with MFC’s algorithms and even are not based on MFC. Yes, we have been receiving this request from our users but the problem is not resolved yet. We will try to provide this feature in October.
|
|
Akash Kava
|
Sep 3, 2004 - 11:01 AM
|
1) Events of CExtTabPageContainerWnd : How to get notification about which page got active recently, likewise if i want to hide and show certain toolbars according to the page viewed in this class. 2) CExtTabFlatWnd : This control doesnt work on CFormView, we can see, we can not select any Tab, neither there is way to receive any events. This control’s First Tab becomes invisible when we click 2nd Tab only first time in CView, from next time onwards it works.
3) CExHookSink: Class is missing in documentation
4) Suggestion: New Class CExPagedView which can be used in MFC with document/view architecture. CExPagedView must be able to create and hold, switch multiple Views derived from CView. Also it must have OnPageSelected function which can be overridden to get notification of current selected View.
5) Too Big Examples: To understand CExtTabPageContainerWnd, I had to read Page example almost 10 times to find out where control is created. Ideal example would be One Control with 2 child controls, here you have created N number of controls which takes so long to analyze.
6) Is it good trick to earn money? Is it your policy to force users to come back to you for support? not provide proper and complete documentation? If that is the case, I would have searched number of code websites, get one one code from there and integrated it if I had to spend time to go through each and every forums etc. I thought I will get nicely MSDN sort of documentation which would contain everything!!!
|
|
Technical Support
|
Sep 3, 2004 - 1:03 PM
|
- Events of CExtTabPageContainerWnd :
How to get notification about which page got active recently, likewise if i want to hide and show certain toolbars according to the page viewed in this class?
The CExtTabPageContainerWnd does not provide this notification directly. But you can use your own tab control inside tab page container and catch the tab selection event. This tab control should be derived from the CExtTabsWndImpl < CExtTabWnd > type. The instance of newly created tab control is returned from the CExtTabPageContainerWnd::OnTabWndGetTabImpl virtual method. By overriding the CExtTabWnd::OnTabWndSelectionChange virtual method in your tab control, you may catch the tab selection event and even prevent some tabs from being selected. - CExtTabFlatWnd :
This control doesnt work on CFormView, we can see, we can not select any Tab, neither there is way to receive any events. This control’s First Tab becomes invisible when we click 2nd Tab only first time in CView, from next time onwards it works.
We cannot confirm this. Please send us your test project. - CExHookSink:
Class is missing in documentation
This class is for internal use only. But it is not to difficult to understand how it works. Sometimes you need to watch and/or handle the messages from several windows in some class even before these windows recieve them. You may derive your class from CExtHookSink and override the OnHookWndMsg virtual method that should return true if you process the message manually. The SetupWndHookSink methods initializes/removes the hook to/from the specified window. - Suggestion:
New Class CExPagedView which can be used in MFC with document/view architecture. CExPagedView must be able to create and hold, switch multiple Views derived from CView. Also it must have OnPageSelected function which can be overridden to get notification of current selected View.
We added this into our TO-DO list. - Too Big Examples:
To understand CExtTabPageContainerWnd, I had to read Page example almost 10 times to find out where control is created. Ideal example would be One Control with 2 child controls, here you have created N number of controls which takes so long to analyze.
Maybe you are right. Untill this we tried to keep only valuable samples. - Is it good trick to earn money?
Is it your policy to force users to come back to you for support? not provide proper and complete documentation? If that is the case, I would have searched number of code websites, get one one code from there and integrated it if I had to spend time to go through each and every forums etc. I thought I will get nicely MSDN sort of documentation which would contain everything!!!
The documentation is something special that allways requires too much time, much more than we really have.
|
|
Finn Arildsen
|
Aug 13, 2004 - 5:30 PM
|
I have a problem with tooltips for ComboBoxes on a toolbar. They don’t appear even though I have verified that the tool string is associated with the command item, and that the activate message is sent to the tooltip control. Actually, I see the same behaviour for your ProfStudio sample program. For example the URL combobox on the Web toolbar doesn’t show a tooltip. Is this intentional? Thanks in advance Finn Arildsen
|
|
Technical Support
|
Aug 14, 2004 - 8:02 AM
|
Thank you for a good question. The tooltip support is provided by the toolbar window. The regular command items, which are part of the toolbar’s client area, are not HWND -based. The combo-box is a child window inside the toolbar. Tooltips provided by the toolbar cannot be applied to toolbar’s child windows. We think we should add the tooltip support methods to the CExtComboBox class as we did in the CExtButton class.
|
|
Dmitry Dulepov
|
Aug 3, 2004 - 12:37 PM
|
MFC asserts inside DDX_Radio on the line that says:
ASSERT(::SendMessage(hWndCtrl, WM_GETDLGCODE, 0, 0L) & DLGC_RADIOBUTTON);
and skips all other radio buttons because they also do not return DLGC_RADIOBUTTON. I checked ExtButton.cpp, PresubclassWindow clears type styles and Windows cannot return proper control code...
Please, fix this in the next release.
|
|
Dmitry Dulepov
|
Aug 3, 2004 - 12:50 PM
|
Button does not become checked in a call to SendMessage(hWndButton, BM_SETCHECK, 1, 0)... I fixed the previous problem but DDX_Radio still does not work.
|
|
Technical Support
|
Aug 5, 2004 - 9:39 AM
|
We cannot confirm this bug. We used CButton::SetCheck method which performs the same and did not find any problems. Please send us your test project.
|
|
David Baginski
|
Aug 3, 2004 - 11:35 AM
|
How would one provide an option that allows users to reorder the MDI tabs for all open documents. I would image you need to change the z-order of the windows with the SetWindowPos API. Would the tab control update to reflect the changed z-order? Is there a better method for accomplishing this? I’d like to see a drop and drop interface added to the tab control that allows the user to reorder tabs graphically (simliar to Avant and Maxthon browsers).
|
|
Technical Support
|
Aug 5, 2004 - 9:36 AM
|
The CExtTabMdiWnd class hooks the MDI client window, main and active child frame windows to synchronize tab items with a set of MDI child frames. This control is based on WM_MDI*** messages. So, just to change the window order is not enough to automatically update tab windows. Besides, the tab window does not provide a ready-to-use drag-and-drop mechanism. It just provides virtual methods for implementing drag-and-drop in user-defined tab windows.
We could treat your task as a feature request for the future or as a custom development issue.
|
|
Luis Alberto Pereira
|
Jul 29, 2004 - 1:36 PM
|
Dears, I´m using profUIS-Controls sample application as base for developing my application. In CPageTabContainers, I would like to know how can I hold event click in pages under CMyTabPageContainerWnd, to control behavior of CMyTabPageContainerWndFlat. Thanks, Luis
|
|
Technical Support
|
Aug 1, 2004 - 8:06 AM
|
Dear Luis,
You need to use your own class derived from CExtTabPageContainerWnd or CExtTabPageContainerFlatWnd and override the OnTabWndSelectionChange virtual method. Please do not forget to invoke the method of its parent class if you want just to monitor these events. The method is called twice. First, the bPreSelectionTest parameter is set to true and you may return false if you want to abandon the selection change event. The second time, this parameter is set to false and the selected tab item is already changed.
|
|
Finn Arildsen
|
Jul 25, 2004 - 10:10 AM
|
Hi, I have a problem with CExtLabel. The text in all of my CExtLabel controls appear with strikethrough (and sometimes also underlined). This doesn’t happen for texts in any other control in my application. When I simply replace CExtLabel with CStatic, the text appear properly. I have tried various things to pinpoint the reason for this problem, including a brute force SetFont call for the object, but to no avail. I hope you can tell me what I do wrong. Thanks in advance Finn Arildsen
|
|
Dmitry Dulepov
|
Aug 2, 2004 - 1:11 AM
|
...after installation of a 2.25.1 patch. I opened Prof-UIS project in VC and made a clean build of all Prof-UIS libs. Problem with CExtLabel disappeared.
Actually I wondered why patch setup did not recompile libraries...
|
|
Technical Support
|
Aug 2, 2004 - 6:54 AM
|
Neither the full library setup nor the patch "knows" which library configuration you really need. Besides, if we completely rebuild all library configurations, it will eat tens of gigabytes of the disk space. That is why the automatic library build is not performed by installation programs.
|
|
Dmitry Dulepov
|
Aug 3, 2004 - 12:41 PM
|
Hm, but setup program for the "normal" version has an option to build libraries. At least it was so in the previous version...
|
|
Technical Support
|
Jul 25, 2004 - 11:45 AM
|
Dear Finn,
We have not yet encountered such a bug. Of course, we are very interested in helping you and clarifying what causes the problem. Could you let us take a look at your sample project?
|
|
Finn Arildsen
|
Jul 25, 2004 - 3:25 PM
|
Thanks for your very swift response. I’m actually working on conversion of a 100K lines project, so it’s not straightforward for me to extract a sample project. However, I’ll see if I can recreate the problem in a sample project. This will be in a couple of weeks, though, due to other obligations. BTW, what governs a CExtLabel’s use of fonts? Is there anything I may have touched that I shouldn’t have ? (Not that I think I have intentionally touched anything wrt fonts).
|
|
Technical Support
|
Jul 26, 2004 - 3:14 AM
|
We have no idea why the label’s font is damaged but you can find it out yourself by debugging the CExtLabel::OnDrawLabelText method’s code. You need to see which font is used for painting the text and why it is striked out and/or underlined.
|
|
Finn Arildsen
|
Aug 5, 2004 - 3:52 PM
|
Thanks for your response. Having been away for some days, before I got round to creating a small example, Dmitry’s posting directed me to the solution, which is to rebuild the libraries. Thankfully, rebuilding the libraries is a simple solution. However, this reminds me that I have problems with the Integration Wizard. If I let the IW build the libraries on installation, it always ends up hanging while building the second library in the list, and I have to slay it. I haven’t been able to figure out the reason for this problem, and it something I can circumvent by just building the libraries directly from Visual Studio, so I don’t think it’s a problem I wish to pursue. BTW, it was the same with 2.23. Nevertheless, I thought I’d mention it, and I’ll be glad to provide any further information if you need it.
|
|
Saroj Acharya
|
Jul 20, 2004 - 9:48 AM
|
I am having strange problem with my project. I have installed the V2.25 latest patch and use VC++ 7.10. I get assert ERROR in the follwoing line of the code (file is winfrm.cpp). This happens only if I create certain COM Objects in my project. There is a function in my code to instantiate these COM objects. If I bypass these lines, I see no issues . Any idea where it is coming from ? Thanks in advance. Saroj BOOL CFrameWnd::LoadAccelTable(LPCTSTR lpszResourceName) { ASSERT(m_hAccelTable == NULL); // only do once
ASSERT(lpszResourceName != NULL);
HINSTANCE hInst = AfxFindResourceHandle(lpszResourceName, RT_ACCELERATOR);
m_hAccelTable = ::LoadAccelerators(hInst, lpszResourceName); return (m_hAccelTable != NULL);
} Function to instantiate the COM objects....
BOOL CMainFrame::InitializeVisionSystem()
{
HRESULT retVal; try
{ // Initialize the COM library
// retVal = CoInitialize(NULL);
// if( !((retVal == S_FALSE) || (retVal == S_OK )) ) // If not previously initialized or Initialization fails,
// return(FALSE); // return FALSE
retVal = pApplication.CreateInstance(_T("MIL.Application")); if(!ErrorDescription(retVal)) return(FALSE);
pSystem = pApplication->CreateObject(_T("MIL.System"), FALSE);
pDigitizer = pApplication->CreateObject(_T("MIL.Digitizer"), FALSE);
pDigitizer->OwnerSystem = pSystem;
if(blnOFFLineVersion)
pSystem->SystemType = _T("VGA"); else
pSystem->SystemType = _T("Meteor_II");
pSystem->Allocate();
Wait(1000); // Only allocate the digitizer if it is supported if ((pSystem->NumberOfDigitizers != 0) && (!pDigitizer->IsAllocated))
{
pDigitizer->Allocate();
}
pImageProcessing = pApplication->CreateObject(_T("MIL.ImageProcessing"), FALSE);
pImageProcessing->OwnerSystem = pSystem;
pImageProcessing->Allocate();
} catch(COleDispatchException* pException)
{
CString CErrorMessage;
CErrorMessage = pException->m_strDescription;
CErrorMessage = CErrorMessage + _T("\n");
CErrorMessage = CErrorMessage + pException->m_strSource;
AfxMessageBox(CErrorMessage, MB_OK, 0);
pException->Delete(); return(FALSE);
} catch(...)
{
CString CErrorMessage;
CErrorMessage.LoadString(IDS_UNHANDLED_EXCEPTION);
AfxMessageBox(CErrorMessage, MB_OK, 0); return(FALSE);
} return(TRUE);
}
|
|
Technical Support
|
Jul 21, 2004 - 4:16 AM
|
Didn’t you forget to call something like CoInitialize , OleInitialize , or AfxOleInit ? This is usually placed in the InitInstance virtual method of your CWinApp derived class.
|
|
Saroj Acharya
|
Jul 21, 2004 - 9:45 AM
|
Hi, I have tried calling CoInitialize(NULL) from the same function but it does not change anything. I will try OleInitialize() or AfxOleInit() from InitInstance() and see if solves the problem. Another thing I noticed was that when LoadAccelTable(..) function is called, the value of m_hAccelTable is already something. It means the variable has already been initialized. Microsoft code also says...call it only once. Any idea why LoadAccelTable(..) might be called twice ? ASSERT(m_hAccelTable == NULL); // only do once
Appreciate your help and support.
Saroj
|
|
Technical Support
|
Jul 22, 2004 - 1:48 AM
|
The LoadAccelTable API should really be called only once. We suppose the error is somewhere in the CMainFrame::OnCreate method in which you may use an invalid initialization sequence for Prof-UIS-related features. Please pay attention to this method and look at how it is implemented in Prof-UIS samples.
|
|
Dmitry Dulepov
|
Jul 23, 2004 - 1:54 AM
|
I remember I had the same problem when I used customization subsystem and passed incorrect parameters to customization subsystem... Do not remember details but worth to check.
|