Subject |
Author |
Date |
|
Offer Har
|
Jan 21, 2007 - 8:52 AM
|
Dear Support,
I need to prevent the user from changing the height of CExtPropertyGridCtrl rows.
Thanks, Ron.
|
|
Technical Support
|
Jan 22, 2007 - 11:29 AM
|
The property grid control contains two tree grid windows initialized by default: categorized property tree and sorted property tree. Both cannot be resized by default. We can guess you have custom trees in the property grid. If it is the case, could we take a look at the code that initializes these tree grids?
|
|
Offer Har
|
Jan 23, 2007 - 9:30 PM
|
My mistake - I meant width.
|
|
Technical Support
|
Jan 24, 2007 - 12:04 PM
|
The CExtPropertyGridCtrl control is a container for one or more tree grid windows. By default, there are two tree grids in it: CExtPropertyGridWndCategorized and CExtPropertyGridWndSorted . So you should get pointers to these grids and change their settings: void EnablePropertyGridColumnResizing( CExtProperyGridCtrl * pPGC, bool bEnable = true )
{
CTypedPtrArray < CPtrArray, CExtPropertyGridWnd * > arrGrids;
pPGC->OnPgcQueryGrids( arrGrids );
DWORD dwStylesAdd = bEnable ? (__EGBS_RESIZING_CELLS_INNER_H|__EGBS_DYNAMIC_RESIZING_H) : 0;
DWORD dwStylesRemove = bEnable ? 0 : (__EGBS_RESIZING_CELLS_INNER_H|__EGBS_DYNAMIC_RESIZING_H);
INT nGridIdx = 0, nGridCount = arrGrids.GetSize();
for( ; nGridIdx < nGridCount; nGridIdx ++ )
{
CExtPropertyGridWnd * pGrid = arrGrids[ nGridIdx ];
ASSERT_VALID( pGrid );
pGrid->SiwModifyStyle(
dwStylesAdd,
dwStylesRemove
);
}
}
|
|
Andrew Cochran
|
Jan 20, 2007 - 5:13 AM
|
Hi. I have a problem again. My MDI application crashes when closed. Unhandled exception is received in ExtHook.cpp line 216.
Here is the stack:
DpdfDesignerd.exe!CArray<CExtHookSink *,CExtHookSink *>::GetSize() Line 279 + 0x11 bytes C++ > DpdfDesignerd.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=130, unsigned int & wParam=0, long & lParam=0) Line 216 + 0xb bytes C++ DpdfDesignerd.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00230d00, unsigned int nMessage=130, unsigned int wParam=0, long lParam=0) Line 271 + 0x14 bytes C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_DispatchClientMessage@20() + 0x4d bytes user32.dll!___fnNCDESTROY@4() + 0x26 bytes ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 bytes user32.dll!_NtUserDestroyWindow@4() + 0xc bytes DpdfDesignerd.exe!DpdfDesigner::CMainFrame::DestroyWindow() Line 621 C++ DpdfDesignerd.exe!CFrameWnd::OnClose() Line 849 C++ DpdfDesignerd.exe!DpdfDesigner::CMainFrame::OnClose() Line 721 C++ DpdfDesignerd.exe!CWnd::OnWndMsg(unsigned int message=16, unsigned int wParam=0, long lParam=0, long * pResult=0x02a1f040) Line 2028 C++ DpdfDesignerd.exe!CWnd::WindowProc(unsigned int message=16, unsigned int wParam=0, long lParam=0) Line 1741 + 0x20 bytes C++ DpdfDesignerd.exe!AfxCallWndProc(CWnd * pWnd=0x04256b68, HWND__ * hWnd=0x00120cfc, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 240 + 0x1c bytes C++ DpdfDesignerd.exe!AfxWndProc(HWND__ * hWnd=0x00120cfc, unsigned int nMsg=16, unsigned int wParam=0, long lParam=0) Line 389 C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_CallWindowProcAorW@24() + 0x51 bytes user32.dll!_CallWindowProcW@20() + 0x1b bytes DpdfDesignerd.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=16, unsigned int & wParam=0, long & lParam=0) Line 213 + 0x20 bytes C++ DpdfDesignerd.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00120cfc, unsigned int nMessage=16, unsigned int wParam=0, long lParam=0) Line 271 + 0x14 bytes C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_DispatchClientMessage@20() + 0x4d bytes user32.dll!___fnDWORD@4() + 0x24 bytes ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 bytes user32.dll!_NtUserMessageCall@28() + 0xc bytes user32.dll!_DefFrameProcWorker@24() + 0x8f bytes user32.dll!_DefFrameProcW@20() + 0x1b bytes DpdfDesignerd.exe!CMDIFrameWnd::DefWindowProcW(unsigned int nMsg=274, unsigned int wParam=61536, long lParam=460024) Line 188 C++ DpdfDesignerd.exe!CWnd::Default() Line 274 C++ DpdfDesignerd.exe!CWnd::OnSysCommand(unsigned int __formal=61536, unsigned int __formal=61536) Line 460 + 0xf bytes C++ DpdfDesignerd.exe!CFrameWnd::OnSysCommand(unsigned int nID=61536, long lParam=460024) Line 1046 C++ DpdfDesignerd.exe!CWnd::OnWndMsg(unsigned int message=274, unsigned int wParam=61536, long lParam=460024, long * pResult=0x02a1f664) Line 2056 C++ DpdfDesignerd.exe!CWnd::WindowProc(unsigned int message=274, unsigned int wParam=61536, long lParam=460024) Line 1741 + 0x20 bytes C++ DpdfDesignerd.exe!AfxCallWndProc(CWnd * pWnd=0x04256b68, HWND__ * hWnd=0x00120cfc, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=460024) Line 240 + 0x1c bytes C++ DpdfDesignerd.exe!AfxWndProc(HWND__ * hWnd=0x00120cfc, unsigned int nMsg=274, unsigned int wParam=61536, long lParam=460024) Line 389 C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_CallWindowProcAorW@24() + 0x51 bytes user32.dll!_CallWindowProcW@20() + 0x1b bytes DpdfDesignerd.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=274, unsigned int & wParam=61536, long & lParam=460024) Line 213 + 0x20 bytes C++ DpdfDesignerd.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00120cfc, unsigned int nMessage=274, unsigned int wParam=61536, long lParam=460024) Line 271 + 0x14 bytes C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_DispatchClientMessage@20() + 0x4d bytes user32.dll!___fnDWORD@4() + 0x24 bytes ntdll.dll!_KiUserCallbackDispatcher@12() + 0x13 bytes user32.dll!_NtUserMessageCall@28() + 0xc bytes user32.dll!_DefFrameProcWorker@24() + 0x8f bytes user32.dll!_DefFrameProcW@20() + 0x1b bytes DpdfDesignerd.exe!CMDIFrameWnd::DefWindowProcW(unsigned int nMsg=161, unsigned int wParam=20, long lParam=460024) Line 188 C++ DpdfDesignerd.exe!CWnd::WindowProc(unsigned int message=161, unsigned int wParam=20, long lParam=460024) Line 1742 + 0x1c bytes C++ DpdfDesignerd.exe!AfxCallWndProc(CWnd * pWnd=0x04256b68, HWND__ * hWnd=0x00120cfc, unsigned int nMsg=161, unsigned int wParam=20, long lParam=460024) Line 240 + 0x1c bytes C++ DpdfDesignerd.exe!AfxWndProc(HWND__ * hWnd=0x00120cfc, unsigned int nMsg=161, unsigned int wParam=20, long lParam=460024) Line 389 C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_CallWindowProcAorW@24() + 0x51 bytes user32.dll!_CallWindowProcW@20() + 0x1b bytes DpdfDesignerd.exe!CExtHookSink::HookChains_t::HookChainsWindowProc(unsigned int nMessage=161, unsigned int & wParam=20, long & lParam=460024) Line 213 + 0x20 bytes C++ DpdfDesignerd.exe!CExtHookSink::HookChains_t::g_HookWndProc(HWND__ * hWnd=0x00120cfc, unsigned int nMessage=161, unsigned int wParam=20, long lParam=460024) Line 271 + 0x14 bytes C++ user32.dll!_InternalCallWinProc@20() + 0x28 bytes user32.dll!_UserCallWinProcCheckWow@32() + 0xb7 bytes user32.dll!_DispatchMessageWorker@8() + 0xdc bytes user32.dll!_DispatchMessageW@4() + 0xf bytes DpdfDesignerd.exe!AfxInternalPumpMessage() Line 183 C++ DpdfDesignerd.exe!CWinThread::PumpMessage() Line 896 C++ DpdfDesignerd.exe!CWinThread::Run() Line 625 + 0xd bytes C++ DpdfDesignerd.exe!CWinApp::Run() Line 894 C++ DpdfDesignerd.exe!AfxWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020b76, int nCmdShow=1) Line 47 + 0xd bytes C++ DpdfDesignerd.exe!wWinMain(HINSTANCE__ * hInstance=0x00400000, HINSTANCE__ * hPrevInstance=0x00000000, wchar_t * lpCmdLine=0x00020b76, int nCmdShow=1) Line 33 C++ DpdfDesignerd.exe!__tmainCRTStartup() Line 324 + 0x35 bytes C DpdfDesignerd.exe!wWinMainCRTStartup() Line 196 C kernel32.dll!_BaseProcessStart@4() + 0x23 bytes
It happens only in debug build, besides, not every time. Here is the actions sequence in my application that causes the problem:
1. Run with one opened document 2. Close this document, so there is no one opened 3. Open 6 documents one after another. 4. Close application
I have found similar questions in subject on General Forum and have read answers. That’s why I don’t know exactly whether it is a bug or it is my fault. Why can it happen? Please, help to understand & fix. Thanks in advance.
|
|
Technical Support
|
Jan 20, 2007 - 1:11 PM
|
Would you send us a stripped version of your project that reproduces the problem? Typically CExtHookSink -derived objects are detaching the window procedures correctly when catching the WM_DESTROY messages. Similar problems may occur when using a third party C++ core which also uses a window procedure replacement and the de-initialization sequence is broken.
|
|
Andrew Cochran
|
Jan 25, 2007 - 3:19 AM
|
It’s not so easy to strip project for sending you, but we are trying to prepare it. It may not be soon. :(
During the research according to this crash we noticed that it has appeared after we have upgrated to version 2.62. While version 2.54 - everything was ok! May be this knowledge will help you to find the problem more quickly.
|
|
Technical Support
|
Jan 29, 2007 - 1:10 PM
|
We have just fixed it. Please contact us for the update by e-mail.
|
|
Thomas Hsieh
|
Jan 30, 2007 - 11:07 PM
|
Dear Support:
I got the same crash core stacks when my program exit (SDI with mutiple window tabs). Could you also send me the fixed update to me by e-mail? thomas@iTravel-Tech.com
Thanks a lot.
|
|
Technical Support
|
Jan 31, 2007 - 4:34 AM
|
We have just emailed you the information about how to download the latest code from our ftp site.
|
|
Stefan Krybus
|
Jan 20, 2007 - 5:08 AM
|
In my Code i try to use the feature to change the Language. Now i have a question. If the Menubar is not docked and i select Menu/Exit, the command has no effect. The example LanguageSwitcher shows the same behavior. I use Ver.2.62.
|
|
Technical Support
|
Jan 20, 2007 - 2:28 PM
|
We cannot yet confirm the incorrect behavior of the File | Exit menu item. This can only happen if you changed the command identifier values during your development process and did not remove the application state from the registry. Of course, this can also happen if the command handler does not perform any actions for terminating the application.
|
|
Leland Dykes
|
Jan 19, 2007 - 3:01 PM
|
In a CExtGridCellString subclass I’ve overridden OnClick() to detect right button up and pop up a menu with, of course, subsequent actions depending upon selection from the menu.
How do go about getting the selection to be set to the cursor position, as though it were a left button event, before I bring my menu?
|
|
Leland Dykes
|
Jan 19, 2007 - 4:22 PM
|
Well, after scratching my head a bit more, I came up with a solution: Override CExtGridWnd::OnRButtonUp() and call CExtGridWnd::OnLButtonDown() before calling the base member function. If anyone has a better solution, I’m willing to entertain suggestions. Thanks.
|
|
Technical Support
|
Jan 20, 2007 - 1:43 PM
|
You can analyze any mouse click events by overriding the CExtGridWnd::OnGbwAnalyzeCellMouseClickEvent() method. The CExtGridBaseWnd::SelectionSet() method allows you to set selection for a particular cell range. The CExtGridBaseWnd::FocusSet() method allows you to change both focus and selection at the same time and we think you should use it to set focus to the grid cell before tracking the context menu over it.
|
|
Offer Har
|
Jan 19, 2007 - 8:36 AM
|
Dear support,
I am using CExtCheckListWnd, and I don’t see how to make it match the theme of the paint manager. Is it not possible? if not, when you do plan on doing it.
Regards, Ron.
|
|
Technical Support
|
Jan 20, 2007 - 2:37 PM
|
The check list was designed to have the OS-based skin. It is used in the Toolbars page of the Customize dialog and in the navigations pane options dialog of the page navigator control. In both cases, the feature in question is not needed. But the main reason not to skin this control is that we are no longer using list and tree common controls in our projects. We are using CExtGridWnd , CExtTreeGridWnd and CExtReportGridWnd instead.
|
|
Brett Cook
|
Jan 18, 2007 - 7:28 PM
|
Dear Tech Support,
I am wondering if it’s safe to put a CView in a CExtControlBar. I have done this and it mostly works except for auto-hide and closing the app come up with asserts.
Thanks, -Brett
|
|
Technical Support
|
Jan 19, 2007 - 3:05 AM
|
Here is a project that demonstrates control bars with a form view and a scroll view:
test_views_in_cb.zip
|
|
Fabien Masson
|
Jan 18, 2007 - 5:38 AM
|
Dear Support Team,
Do you plan to add support for normal CView (or CFormView) class support to your "printing and print preview (PPV) subsystem".
In fact, I already have my printing and preview code working but I use the classic MFC class which are not themed :-(
regards, Fabien
|
|
Technical Support
|
Jan 19, 2007 - 2:55 AM
|
We can add this feature to our TO-DO list and implement it later after finishing other tasks that we planned before.
|
|
HeeTae Lee
|
Jan 18, 2007 - 2:39 AM
|
I am now studying the Prof-UIS. I have a question. Why samples source have CDocument class? How to add CDocument class at the sample especially "PageNavigator"
|
|
Technical Support
|
Jan 19, 2007 - 3:37 AM
|
If you want to convert the SDI sample that comes with Prof-UIS into SDIDOCVIEW sample (or MDI into MDIDOCVIEW), you should implement the document class at first. Then you should make your view class so it is based on some MFC’s view classes. Then you should remove the old code for creating a view from the OnCreate() method of its parent frame window. Finally, you should update the application’s OnInitInstance() method and put the document template registration into there.
|
|
HeeTae Lee
|
Jan 18, 2007 - 10:54 PM
|
|
|
Jose Andres
|
Jan 17, 2007 - 5:21 PM
|
How to disable(make it invisible) CExtPropertyGridComboBoxBar and CExtPropertyGridToolBar in a property grid?
|
|
Technical Support
|
Jan 19, 2007 - 3:30 AM
|
You can use a CExtPropertyGridCtrl -derived class in which the OnPgcCreateBars() method is overridden in a way that it is mainly similar to the original one but you should not create the CExtPropertyGridComboBoxBar window in it. Another way is to call CExtPropertyGridCtrl::GetChildByRTC() in order to get a pointer to the created CExtPropertyGridComboBoxBar window, hide it and finally call CExtPropertyGridCtrl::RecalcLayout() .
|
|
Suhai Gyorgy
|
Jan 18, 2007 - 2:46 AM
|
There’s an article about Property Grid. In that there’s a part that explains how you can hide those child control. Here’s the link.
|
|
Offer Har
|
Jan 17, 2007 - 12:20 PM
|
Dear Support,
I saw a post dating back to August regarding this feature, and your reply that this feature is in development. Is this feature ready? If not, when is it going to be ready?
Regards, Ron.
|
|
Andrew Banks
|
Jan 17, 2007 - 11:05 AM
|
I have 2 CExtControlBars that contain the same dialog type. One floats, one docked in autohide mode. When placing the cursor over the autohidden, it expands. However, when expanding the floating CExtControlBar clips the expanding CExtControlBar. The dialog class has clip children and clip siblings set to false.
When expanding an auto hidden CExtControlBar, how do I get it painted as the top window?
|
|
Technical Support
|
Jan 18, 2007 - 1:24 PM
|
From your message it is not completely clear what the problem is. Would you send us a screenshot?
|
|
Offer Har
|
Jan 17, 2007 - 9:38 AM
|
Dear Support,
I have sent you a mail regarding this bug more then a week ago (Jan 9th), and got no response. I sent it again today.
Please at least approve that you received my mail, ran the example, saw the bug, and some estimation as to when you are planning to fix this bug.
Regards, Ron.
|
|
Paul Cowan
|
Jan 17, 2007 - 9:32 AM
|
How can I set gray and hot images for the toolbar buttons? The gray buttons that are currently being drawn from the normal button image looks like a gray blob, I’d like to specify my own image.
|
|
Paul Cowan
|
Jan 19, 2007 - 9:35 AM
|
Are there any sample apps that show this?
|
|
Technical Support
|
Jan 22, 2007 - 11:15 AM
|
There is no such a sample at the moment but we will add it later. Did you try the solution we suggested in this thread?
|
|
Technical Support
|
Jan 17, 2007 - 1:26 PM
|
Prof-UIS supports normal/hovered/pressed/disabled icons for each command item both in toolbars and menus. You should construct a CExtCmdIcon object with these icons and put it into the command manager using g_CmdManager->CmdSetIcon() . The CExtCmdIcon class has four CExtBitmap properties: m_bmpNormal , m_bmpDisabled , m_bmpHover and m_bmpPressed . By default the m_bmpNormal bitmap is initialized using APIs like CExtToolControlBar::LoadToolBar() or CExtCmdManager::UpdateFromToolBar() . All the other icon bitmaps are generated automatically by the currently applied paint manager. So, by default the m_bmpDisabled, m_bmpHover and m_bmpPressed icon versions are generated on-the-fly from the m_bmpNormal bitmap when the icon is painted and re-generated when the paint manager is changed. You can initialize the m_bmpDisabled , m_bmpHover and m_bmpPressed icon images and mark them as persistent to avoid automatic image generation by Prof-UIS code. The CExtCmdIcon::m_dwFlags property is a set of flags which can contain one or more combinations of the following values: __EXT_ICON_PERSISTENT_BITMAP_DISABLED - this flag should be present if the CExtCmdIcon::m_bmpDisabled property contains an image initialized by the user and should not be re-generated by Prof-UIS code. __EXT_ICON_PERSISTENT_BITMAP_HOVER - the same for the CExtCmdIcon::m_bmpHover property. __EXT_ICON_PERSISTENT_BITMAP_PRESSED - the same for the CExtCmdIcon::m_bmpPressed property.
|
|
Gevork Odabashyan
|
Jan 16, 2007 - 9:04 AM
|
Hello
For example I set ArabicSA language as current language in my application, which has a property sheet with serveral property pages. I set PSP_RTLREADING flag in constructors of all property pages and PSH_RTLREADING flag in constructor of the property sheet. But the sheet’s title has LTR layout. How can I Set RTL layout in a property sheet? And by the way, how I can do that in message boxes?
|
|
Technical Support
|
Jan 22, 2007 - 11:37 AM
|
We are sorry for the delay with this reply. We analyzed the property sheet’s RTL compatibility issues and came to the conclusion that to make it RTL-friendly would be the same as coding it from scratch. In other words, we would have to hook and adjust everything in it. It is easier to create one container dialog and a set of dialog pages working in RTL instead.
|
|
Seth Strong
|
Jan 15, 2007 - 2:03 PM
|
I see in different painting examples you consistantly create a CExtMemoryDC. but I don’t see where it is flipped or drawn the the display. Can you provide more information about this class?
Thanks, Seth
|
|
Technical Support
|
Jan 16, 2007 - 11:37 AM
|
The CExtMemoryDC::__Flush() is an internal method that draws the content of in-memory surface into the original device context. This method is invoked from the CExtMemoryDC::~CExtMemoryDC() destructor. But you can also invoke it explicitly. In most cases, you should simply declare an in-stack local CExtMemoryDC variable and specify a pointer to the original device context in the constructor parameter. Sometimes you may also need to specify the rectangular area of the original device context. This may be needed if you want to use only some part of the surface. The CExtMemoryDC::__MDC_OPT_*** flags are typically not required. They are designed for the very specific painting tasks described in the code comments next to each constant.
|
|
Seth Strong
|
Jan 15, 2007 - 1:04 PM
|
I have a custom static control as part of a toolbar. This custom static control needs to be repainted when some options are changed. However when it (based on CStatic) Invalidate() s itself, its OnPaint never gets called. I tried trapping the OnPaint message in the owner (toolbar), but there is a comment not to call CExtToolControlBar::OnPaint and several other buttons don’t display properly.
Is there a proper way to get the custom control to repaint properly?
|
|
Technical Support
|
Jan 16, 2007 - 3:07 AM
|
If your static control is HWND-based, then you should simply redraw this window: HWND hWnd = . . .
::InvalidateRect( hWnd, NULL, TRUE );
::UpdateWindow( hWnd ); // update the screen immediately If it is a custom toolbar button, then just invoke the CExtBarButton::RedrawButton() method instead.
|
|
Jean-Yves Tremblay
|
Jan 15, 2007 - 12:24 PM
|
Hi !
I get a memory leak when I try to load a bitmap file with an invalid path. I think it’s because of no CException (CFileException) are caught, and then, deleted
I supposed that’s the same case for CExtBitmap::SaveBMP_File
David
|
|
Courtney Smith
|
Mar 9, 2007 - 11:12 AM
|
I’m getting weird behaviors from FromBitmap(hbitmap). Is there similar code in this function?
|
|
Technical Support
|
Mar 9, 2007 - 11:45 AM
|
In v.2.64 we fixed a memory leak in the code that loads bitmaps when the CExtBitmap::LoadBMP_File() method is invoked with an invalid file path. You can either switch to version 2.64 or simply tell us and we will send you the latest ../Prof-UIS/Include/ExtCmdIcon.h and ../Prof-UIS/Src/ExtCmdIcon.cpp files from v.2.64.
|
|
Jean-Yves Tremblay
|
Jan 15, 2007 - 2:03 PM
|
Here’s my output :
[...]
* * * TERMINATING DYNAMIC LIBRARY: ProfUIS version 2.62 * * *
Detected memory leaks!
Dumping objects ->
f:\rtm\vctools\vc7libs\ship\atlmfc\src\mfc\strcore.cpp(141) : {30675} normal block at 0x0251D1E8, 33 bytes long.
Data: < >x > EC 97 3E 78 10 00 00 00 10 00 00 00 01 00 00 00
{30674} client block at 0x025649A0, subtype c0, 24 bytes long.
a CFileException object at $025649A0, 24 bytes long
Object dump complete.
The thread ’__tmainCRTStartup’ (0x8d0) has exited with code 0 (0x0).
The thread ’Win32 Thread’ (0x8f0) has exited with code 0 (0x0).
The program ’[3472] TestProfuis.exe: Native’ has exited with code 0 (0x0).
[...]
And the code I use :
bData.extBmp.LoadBMP_File(strTemp.c_str(), false, false);
|
|
Technical Support
|
Jan 16, 2007 - 12:27 PM
|
Please update the source code for the CExtBitmap::LoadBMP_Buffer() , CExtBitmap::LoadBMP_File() and CExtBitmap::SaveBMP_File() methods in the ../Prof-UIS/Src/ExtCmdIcon.cpp file: bool CExtBitmap::LoadBMP_Buffer(
LPCVOID pBuffer,
UINT nByteCount,
bool bMake32, //= false
bool bEnableThrowException, // = false
bool bResourceFormat // = false
)
{
ASSERT( pBuffer != NULL );
try
{
Empty();
CMemFile _file(
(LPBYTE)pBuffer,
nByteCount
);
if( ! LoadBMP_File(
_file,
bMake32,
bEnableThrowException,
bResourceFormat
)
)
return false;
return true;
}
catch( CException * pException )
{
if( bEnableThrowException )
throw;
pException->Delete();
}
catch( ... )
{
if( bEnableThrowException )
throw;
}
return false;
}
bool CExtBitmap::LoadBMP_File(
__EXT_MFC_SAFE_LPCTSTR strFilePath,
bool bMake32, //= false
bool bEnableThrowException, // = false
bool bResourceFormat // = false
)
{
try
{
CFile _file(
strFilePath,
CFile::modeRead
| CFile::typeBinary
);
return
LoadBMP_File(
_file,
bMake32,
bEnableThrowException,
bResourceFormat
);
}
catch( CException * pException )
{
if( bEnableThrowException )
throw;
pException->Delete();
}
catch( ... )
{
if( bEnableThrowException )
throw;
}
return false;
}
bool CExtBitmap::SaveBMP_File(
__EXT_MFC_SAFE_LPCTSTR strFilePath,
bool bMake32, //= false
bool bEnableThrowException, // = false
bool bUseIndexedRLE // = true
)
{
try
{
CFile _file(
strFilePath,
CFile::modeCreate
| CFile::modeWrite
| CFile::typeBinary
);
return
SaveBMP_File(
_file,
bMake32,
bEnableThrowException,
bUseIndexedRLE
);
}
catch( CException * pException )
{
if( bEnableThrowException )
throw;
pException->Delete();
}
catch( ... )
{
if( bEnableThrowException )
throw;
}
return false;
}
|
|
Technical Support
|
Jan 15, 2007 - 1:13 PM
|
Could you let us look at the content of the Visual Studio’s Output window displaying the information about the memory leak?
|
|
Suhai Gyorgy
|
Jan 15, 2007 - 4:26 AM
|
Dear Support,
Am I right to assume that SerializeState method saves the command usage statistics only?
Thank you, Chris
|
|
Technical Support
|
Jan 15, 2007 - 11:21 AM
|
Yes, you don’t need to serialize the command manager if you are not using expandable menus.
|
|
Ashley Gullen
|
Jan 14, 2007 - 2:03 PM
|
Hello,
Whilst implementing CExtColorButton, I noticed the colour square is very small and the size is unchangeable. Is there anything I can do about this?
Thanks
|
|
Technical Support
|
Jan 15, 2007 - 11:30 AM
|
You can override the CExtColorButton::OnGenerateColorBtnIcon() virtual method and generate the color icon yourself.
|
|
Ashley Gullen
|
Jan 13, 2007 - 7:36 AM
|
Hi there,
While I love all the controls that come with this library, I also like to develop my own controls which are specialised for the interface I’m creating. Originally I used to use system colours to allow the interface to theme nicely with the users desktop. However, as the Prof-UI can be skinned to just about anything, I was wondering what’s the best way of allowing the colours in my controls to match the common colours of the skins in Prof-ui? Is it possible to manually draw things like the window background (which on some themes is a gradient) and suchlike?
Many thanks
|
|
Technical Support
|
Jan 13, 2007 - 1:31 PM
|
There should not be problems with creating you controls compatible with Prof-UIS themes. However, there are two issues we would like to draw you attention to.
1. You should get colors using the g_PaintManager->GetColor() method rather than ::GetSysColor() : g_PaintManager->GetColor( COLOR_3DSHADOW )
2. Your painting procedure generally should look like: CRect rcClient;
GetClientRect( &rcClient );
if( rcClient.IsRectEmpty() )
return;
CPaintDC dcPaint( this );
CExtMemoryDC dc(
&dcPaint,
&rcClient
);
CRgn rgnClient;
if( rgnClient.CreateRectRgnIndirect( &rcClient ) )
dc.SelectClipRgn( &rgnClient );
// ...
// ...
// PLACE YOUR PAINTING CODE HERE
// ...
// ...
if( rgnClient.GetSafeHandle() != NULL )
dc.SelectClipRgn( &rgnClient ); For example you can use the following code to make your control’s background consistent with the current theme: bool bTransparent = false;
if( (! bTransparent )
&& PmBridge_GetPM()->GetCb2DbTransparentMode(this)
)
{
CExtPaintManager::stat_ExcludeChildAreas(
dc,
GetSafeHwnd(),
CExtPaintManager::stat_DefExcludeChildAreaCallback
);
if( PmBridge_GetPM()->PaintDockerBkgnd( true, dc, this ) )
bTransparent = true;
}
if( ! bTransparent )
dc.FillSolidRect(
&rcClient,
PmBridge_GetPM()->GetColor( CExtPaintManager::CLR_3DFACE_OUT, this )
);
|