Thank you! Best regards, Kevin
Thank you! Best regards, Kevin
Hi Kevin, Thanks for the additional information. I've adopted the changes you suggestion to add support for the MF_MENUBARBREAK menu item style. You can download the latest code as a snapshot from the Code section. Best regards, David
Hi Kevin, Thanks for the suggestion. I've updated CWnd::Create to set the window class name as follows: // Prefer the classname specified in PreRegisterClass over the one // specified in PreCreate. The class name will default to "Win32++ Window" // if neither PreRegisterClass nor PreCreate specify a class name. LPCTSTR className = wc.lpszClassName ? wc.lpszClassName : cs.lpszClass; Best regards, David
Added support for the MF_MENUBARBREAK menu item style.
Hi David Attached is sample code with image. Kevin
Hi Kevin, Thanks for the pictures, but I still need to see the code you use to create the menu to troubleshoot this issue. Best regards, David
Hello It looks like CWnd::Create starting at line ~418 needs to match what was in the 1010 version. -- Add this line around ~417 cs.lpszClass = wc.lpszClassName; ... Line 425 - use cs.lpszClass, not wc.lpszClassName since PreCreate could override. wnd = CreateEx(cs.dwExStyle, cs.lpszClass, cs.lpszName, style, Regards, Kevin
Hello On line 425 of wxx_wincore.h version 10.2.0 wnd = CreateEx(cs.dwExStyle, wc.lpszClassName, cs.lpszName, style, I believe that should be same as version 10.1.0 wnd = CreateEx(cs.dwExStyle, cs.lpszClass, cs.lpszName, style, But repair requires more than that fix, assert loading window now - wxx_imagelist.h line 632 m->pData->images.
Hello On line 425 of wxx_wincore.h version 10.2.0 wnd = CreateEx(cs.dwExStyle, wc.lpszClassName, cs.lpszName, style, I believe that should be same as version 10.1.0 wnd = CreateEx(cs.dwExStyle, cs.lpszClass, cs.lpszName, style, Best regards, Kevin Milch
Hi David My apologies for the late reply! Multiple column menu created by adding MF_MENUBARBREAK (1.jpg). Mouse over the second column, and the highlight does not get erased (2.jpg). With proposed fix, highlight gets erased (3.jpg). Thanks for the awesome project!! Best regards, Kevin
Minor update to wxx_setup.h and some samples.
Dynamic-Link Library Security
Most calls to LoadLibrary have been replaced with GetModuleHandle. The remaining calls to LoadLibrary use the path provided by ::GetSystemDirectory.
Performance warnings (found via PVS) fixed
Fixed in version 10.0
Updated CFrameT::OnInitMenuPopup and Titlebar sample.
Updated Themes sample
Updated samples.
Updated CWinApp.
Nice, thanks!
CStringA::AllocSysString() uses potentially wrong length
I've submitted an SVN update that corrects the issue you've described in CStringA::AllocSysString. You can download the latest code snapshot from the code section here on SourceForge. Best regards, David
Updated CStringA::AllocSysString
CStringA::AllocSysString() uses potentially wrong length
Updated CFolderDialogEx
Added project files for Visual Studio 2026.
Minor update to CommonDialogs sample.
Updated Bitmaps
Updated the About dialog in the samples.
Minor update to documentation.
Hi Kevin, Apologies for the tardy reply. I've just returned from a holiday in Hong Kong. I've been unable to reproduce the problem you've described but perhaps I misunderstand the conditions under which it occurs. Is the "drop down" menu the frame's top level menu, a drop down menu from the toolbar, or something else? Is the menu with "subsequent columns" a submenu or something else? In my testing the item.left value in CMenuMetrics::GetSelectionRect is always zero, so removing it has no effect....
I have a drop down menu with multiple columns. The subsequent columns don't get highlighted properly with a mouseover. Made tweaks to wxx_frame.h and wxx_menumetrics.h
Version 10.2 Released
Version 10.2
Updated CMenuBar.
Updated IsXPThemed.
Added IsAppRunning(). Updated CMenuBar, CDC, CGDIObject, CMenu, CImageList and samples.
Updated CMenuBar.
Updated CWinApp, CDC, CImageList, CGDIObject, and CMenu
Updated samples.
Hi Andy, Yes the thread lock does go out of scope immediately as you described. Sorry for the misunderstanding. Best regards, David
Sorry for the delay - I didn't get any notification of your response. I understand locks/semaphores in general and understand why you might want one. The code removes the entry from the map at line 254 RemoveFromMap(). At that point the lock acquired at line 241 by instantiating a CThreadLock has been released - the destructor for CThreadLock is run before we get to Line 242 as mapLock goes out of scope. You can run through the sequence using a debugger to demonstrate this. Regards Andy
Updated CustomPrintDlg and Notepad samples.
Updated CMenuBar.
it works. thanks david
Hi Alan We can use the GetCWndPtr function to retrieve the CWnd pointer mapped to a window handle (HWND). If no CWnd pointer is mapped to the window handle, GetCWndPtr returns nullptr. If we want to get a pointer to the CMainFrame class from CView, we could do it like this: CMainFrame* pFrame = (CMainFrame*)GetCWndPtr(GetAncestor()); For this to work we also need to include the "Mainfrm.h" header file in View.cpp. In the example provided above, we could replace GetAncestor with GetParent for a simple...
thank david. I don't mean the above. For example, in the FrameEx sample program, CMainFrame has a function LoadPngResource. I want to use this function in CView, so I must get the pointer of CMainFrame in Cview. Or CMainFrame has other functions, such as SetStatusText. I want to use them in CView, and I also need to get the same CMainFrame pointer in Cview. So, my question is, how to get the pointer of CMainFrame in Cview?
Updated the FastGDI and Picture samples.
Hi Alan, If I understand correctly, you would like to know how to control the status bar when using a frame based application. The StatusBar sample demonstrates various ways to customize the status bar when used with a frame. Perhaps this sample provides a useful guide for what you need. Best regards, David
Hi Alan, If I understand correctly, you would like to know you to control the status bar when using a frame based application. The StatusBar sample demonstrates various ways to customize the status bar when used with a frame. Perhaps this sample provides a useful guide for what you need. Best regards, David
There is a view in the mainframe. How to get the frame in this view to set the status bar or other frame functions
Hi Andy, The thread lock in wxx_menu.h is not a bug. CThreadLock installs a Critical Section which ensures that one thread and one thread only runs a section of code. When the CThreadLock object goes out of scope, the Critical Section is removed. In multi-threaded environments, several threads can attempt to modify a variable at the same time. This attempt can fail or leave the variable in an unknown state. A Critical Section ensures that only one thread at a time modifies the variable. This keeps...
Hi David I've just been updating to Release 10.1. That has revealed a fault in my code (destroying cascading popup menus before they are used - I have failed to identify what change in 10.1 has led to this fault surfacing 😟) In investigating this fault, I noticed a bug in Win32++. In wxx_menu.h line 240, there is an attempt to get a thread lock if the application is initialised. Of course the lock goes out of scope immediately the conditional completes. I don't know if there are other instances of...
Added CFolderDialogEx.
Updated Help
Added the TaskDialogBox global function.
Updated DarkModeFrame sample.
Hi Daniel, I've updated the CDocker code to resolve the issues you've mentioned. You can download the latest code snapshap from the Code section here on SourceForge. Best regards, David
Updated CDocker and the docking samples.
Thanks a lot David! Another observation related to Dock.exe and DockContainer.exe: 1. close almost all dockers, leaving only one open 2. restart the app 3. observe that the previous layout is preserved (one docker only) 4. close also the last docker (from DockContainer.exe -> menu -> Docking -> Close All) 5. restart the app 6. observe that the layout is reset to default I think this is because CDocker::LoadDockRegistrySettings sets isLoaded = TRUE only when dockList.size() > 0: is this expected?...
Hi Daniel The standard way of moving a window in Microsoft Windows is to click and drag the window's caption area. When Win32++ undocks a window it repositions the window such that the center of the window's caption area is under the mouse pointer. This is by design. Presumably, you could reduce the "jump" in the window's position by positioning the container tabs at the top rather than the bottom of the container. As for the second issue you mentioned, undocking a window should not remove the maximized...
Updated FastGDI and Picture samples.
Hi David, in the DockContainer sample I noticed that undocking a view will make it jump to the current cursor position... This looks a bit odd when the app is maximized because then the newly undocked view can get easily out of the screen. I couldn't add pictures here, so I added some details on Win32xx/issues/14. Kindly please check if it makes sense to do such a change (to avoid that jump). And a second issue observed with the DockContainer.exe: - undocking one of the "Output" views doesn't un-maximize...
Thanks David, they work fine now!
Thanks Daniel. I've updated the TextFileReader and Tray samples to fix the problem you've described. You can download the latest SVN Snapshot from the Code section here on SourceForge. Best regards, David