Saturday, March 14, 2020

Error: RC2135 file not found: 0 PropertySheet C:\Demo\PropertySheet\PropertySheet\Prop.rc 97

when I compile PropertySheet Dialog resource file, I got this error:

Error RC2135 file not found: 0 PropertySheet C:\Demo\PropertySheet\PropertySheet\Prop.rc 97

  1. RC2135 file not found error
  2. Error RC 2135 file not found
  3. RC2135 file not found after edit resource.
  4. compile error 1>ReClassEx.rc(1): error RC2135: file not found: Visual #53
  5. Error RC2104: undefined keyword or key name: LISTBOX1 PropertySheet C:\Demo\PropertySheet\PropertySheet\Prop.rc 107

  6. Resource Compiler Error RC2104
  7. error RC2247: Symbol name too long (winnt.h)

  8. error RC2247: Symbol name too long (winnt.h)
  9. VS2008 resource view crashes with RC2247 when prsht.h included as a resource include.
  10. RC2247 : Cannot open Rc file : Resource explorer cannot load resource ; Load failed
  11. my case is : I should have LISTBOX in .rc definition file, but I put LISTBOX1 instead.

  12. VS2008 resource view crashes with RC2247 when prsht.h included as a resource include.
  13. error RC2247: Symbol name too long (winnt.h)
  14. Resource Compiler error RC2247 SYMBOL name too long
  15. Migrating old project to VS2008 - resource file errors
  16. Upgraded to Visual Studio 2010
  17. windows - RC2247 : Cannot open Rc file : Resource explorer cannot load resource ; Load failed -
  18. this trick worth a further look:

    #define apstudio_hidden_symbols
    #include "windows.h"
    #include "prsht.h"
    #undef apstudio_hidden_symbols

  19. 【Visual Studio】【两种方法解决】error rc2247: SYMBOL name too long
  20. 汉字的Unicode范围
  21. 打开rc文件时出现“SYMBOL name too long”错误
  22. [Windows] VS打开资源文件(.rc)时显示 error RC2247 : SYMBOL name too long
  23. EU-can-code
  24. error RC2247 : SYMBOL name too long[ZHUAN]

smallest circle topics

smallest circle topics

  1. Coding Challenge: Smallest Circle Problem
  2. Visual Studio Custom Tools - Make It Smarter
  3. Demo Data
  4. When you are about to present an application/feature to a potential customer or future user, the data you are using is very important. Missing details, too few records, repetitive info or gibberish can create bad impression. Wrong display can ruin all your effort you put into your code, after all what people see is the surface...

    In this article you will see a tool, that I used to randomize usable data...

  5. Color Scheme Selector
  6. VSMinifier2013Plus
  7. Implementing ICustomFormatter in C#

Sunday, March 8, 2020

How To deliver MFC application?

How To deliver MFC application?

under my Laptop Alpha, I find all MFC dll under this folder: C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\redist\x86

there are two DLLs:mfc140u.dll and mfcm140u.dll.

  1. Determining Which DLLs to Redistribute
  2. vcruntimeversion.dll: Runtime Library for native code. Applications that use the normal C and C++ language startup and termination services.

    mfcversion.dll : Microsoft Foundation Classes (MFC) Library. Applications that use the MFC Library.

    mfcversionu.dll: MFC Library with Unicode support. Applications that use the MFC Library and require Unicode support.

  3. Redistributing the MFC Library
  4. Redistributing Visual C++ Files
  5. To deploy redistributable Visual C++ files, you can use the Visual C++ Redistributable Packages (VCRedist_x86.exe, VCRedist_x64.exe, or VCRedist_arm.exe) that are included in Visual Studio. In Visual Studio 2017, these files can be found in the Program Files[ (x86)]\Microsoft Visual Studio\2017\edition\VC\Redist\MSVC\lib-version folder, where edition is the Visual Studio edition installed, and lib-version is the version of the libraries to redistribute.

    In Visual Studio 2015, these files can be found under your Visual Studio installation directory in Program Files [(x86)]\Microsoft Visual Studio version\VC\redist\locale\.

    Another option is to use redistributable merge modules (.msm files), which in Visual Studio 2017 can be found in the Program Files [(x86)]\Microsoft Visual Studio\2017\edition\VC\Redist\MSVC\lib-version\MergeModules\ folder. In Visual Studio 2015 these can be found in Program Files [(x86)]\Common Files\Merge Modules\.

    It's also possible to directly install redistributable Visual C++ DLLs in the application local folder, which is the folder that contains your executable application file. For servicing reasons, we do not recommend that you use this installation location.

  6. MFC Library Versions
  7. Redistributing the MFC Library
  8. Regular DLL using: MFC Shared vs MFC statically linked
  9. Migrating Projects Created with Visual Studio Versions Earlier than 2010
  10. 20.7. Use MFC in static library or use MFC in shared DLL?
  11. Create projects easily with private MFC, ATL and CRT assemblies
  12. Threads with MFC
  13. Unicode, MBCS and Generic text mappings
  14. An MFC Curve Control
  15. MFC under the hood
  16. Deploying Controls to VS.NET ToolBox Programatically
  17. Deployment Examples
  18. Deploying Native Desktop Applications (Visual C++)

Saturday, March 7, 2020

Layout manager research topics-C++ related

  1. Persistence of Window State and Appearance for .NET Applications
  2. Layout Manager for Dialogs, Formviews, DialogBars and PropertyPages
  3. MFC/C++ Helper Class for Window Resizing
  4. WPF content model and layout
  5. WPF Layouts - A Visual Quick Start
  6. The Ultimate Toolbox Layout Manager
  7. above post deserves more review.

  8. FreeLayout: A New Java Layout
  9. BoxPlanner - Simple Layout Algorithm
  10. Fun with Physics: Implementing a Physics based layout manager
  11. Sharp Layout
  12. I do not find the atlapp.h file in the installation any place!
  13. A Few Classes to Work With Date, Time, Datetime and Timezone Data
  14. Fun with Physics: Implementing a Physics based layout manager
  15. Designing the Layout of Windows Forms using a TableLayoutPanel, with auto-expand panels
  16. Creating a wizard layout using C#
  17. Sequential Structure Layout For Speed
  18. Part I: Unifying Web and Windows Form design and layout
  19. Marc Clifton on GitHub
  20. Part II: Web & Window Form Unification: Synchronous And Asynchronous Event Handling For Controls Created At Runtime
  21. Persistence of Window State and Appearance for .NET Applications
  22. Layout Persistence for your Forms including all of their subcontrols
  23. SolidWidgets Layout Manager Tutorial - Part 1
  24. good points in comment section.

  25. EvaLayout, Lay It Be!
  26. Control Positioning and Sizing using a C++ Helper Class
  27. FlowPanel
  28. Windows Ribbon for WinForms, Part 21 – SizeDefinition
  29. Visual Studio IDE like Dock Container - Second Version
  30. Visual Studio IDE like Dock Container
  31. AutoLayout and UILabel Don't Get Along
  32. Dockable CAB Workspaces
  33. Ruler Control
  34. A Professional Ribbon You Will Use (Now with orb!)
  35. MultisplitContainer - A FlowlayoutPanel Providing Sizeable Contents
  36. ListView Layout Manager
  37. WPF Layout to Layout Transitions
  38. Customizable Window Layouts
  39. WPF Tutorial : Layout-Panels-Containers & Layout Transformation
  40. Planning the form layout in VB.NET
  41. Layout Manager for Prism v2
  42. windows resizing research

  43. EasySize - Dialog resizing in no time!
  44. CCreditsCtrl - An advanced About Box
  45. Moveable Resizable Objects
  46. X-Window Manager like dragging and resizing of windows
  47. A Resizable Graphical Rectangle
  48. Resizing Controls When Resizing Form
  49. Smooth Resize and Reposition
  50. Automatic Layout of Resizable Dialog
  51. research: windows resizing

  52. Automatic resizing controls
  53. Runtime Control Resizer
  54. VB.NET - Dynamically Resize and Reposition All Controls when Form is Resized, Including Font Sizes
  55. Simple and more powerful resizable dialog
  56. WTL CPropertySheet as a Resizable View
  57. Control Resizing on a UserControl in WinForms
  58. Resize/Reposition the Controls in a Dialog at your Pleasure
  59. Allow the User to Resize Controls at Runtime
  60. Resizing Win32 Dialogs with DialogBox() and Dialog Resources

Monday, March 2, 2020

MFC CTreeCtrl instructions

MFC CTreeCtrl instructions

when I build a demo project on CTreeCtrl, I added treectrl.h file into .rc resource file. it caused compilation errors:

Error RC2188 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\atlmfc\include\afxcmn3.inl(502) : warning RC4011: identifier truncated to '_CSTRING_DISABLE_NARROW_WIDE_CO' TreeControl C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\atlmfc\include\atlalloc.h 665

ErrorRC2188 C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\atlmfc\include\atlalloc.h(609) : error RC2188: C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\atlmfc\include\atlalloc.h(640) : warning RC4011: identifier truncated to '_ATL_USE_WINAPI_FAMILY_DESKTOP_' TreeControl C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\VC\Tools\MSVC\14.16.27023\atlmfc\include\atlconv.h 22

then I googled and find this post. it gives me a clue:

  1. Warning RC4011 and error RC2188
  2. I told you in my first reply, you have to check all the headers included by the resource file, some of them cannot be parsed by the resource compiler and the need to be excluded by using #ifndef RC_INVOKED.

    You have 2 headers that may cause this problem in your resource file: resacz99.h and widgets.h. One of them must somehow include ATL headers.

  3. VS Preview 2019 vcruntime.h causes RC4011 warning
  4. What is this error: invalid preprocessor command 'include_next' ?
  5. Thanks for your hint.

    I found an include on one resource file that made use of stdio.h . Removing that dependence, the warning vanished.

then I compiled this project again and ran into another error:

Error RC1004 unexpected end of file found TreeControl C:\Demo\TreeControl\TreeControl\ids.h 21

then I googled and find another wonderful link. tested the solution and it works well. amazing internet!

Full Error Name: Resource Compiler Fatal Error RC1004 unexpected end of file found

To Fix: Be sure to hit enter at the end of the last line in both the resource.h and the resource.rc files.

  1. Complier Error: RC1004

good research on CTreeCtrl.

  1. CDeviceTree
  2. Using CTreeCtrl:: gateway to articles
  3. Using Tree Controls:: detailed steps
  4. Tree Control Styles
  5. Tree-View Control Window Styles
  6. Tree Control Notification Messages::Mcirosodt Official Message List
  7. it lists all notification message designed for this CTreeCtrl control.

  8. TN061: ON_NOTIFY and WM_NOTIFY Messages
  9. it has detailed instructions on mapping message handlers.

  10. Module 5b: The Modal Dialog and Windows Common Controls 3
  11. the bottom section touched on CTreeCtrl and Notification Message. needs to take a look:

    The Tree Control

    The list control and the tree control have some things in common: they can both use the same image list, and they share some of the same notification messages. Their methods of identifying items are different, however. The tree control uses an HTREEITEM handle instead of an integer index. To insert an item, you call the InsertItem() member function, but first you must build up a TV_INSERTSTRUCT structure that identifies (among other things) the string, the image list index, and the handle of the parent item (which is null for top-level items). As with list controls, infinite customization possibilities are available for the tree control. For example, you can allow the user to edit items and to insert and delete items.

    The WM_NOTIFY Message

    The original Windows controls sent their notifications in WM_COMMAND messages. The standard 32-bit wParam and lParam message parameters are not sufficient, however, for the information that a common control needs to send to its parent. Microsoft solved this "bandwidth" problem by defining a new message, WM_NOTIFY. With the WM_NOTIFY message, wParam is the control ID and lParam is a pointer to an NMHDR structure, which is managed by the control. This C structure is defined by the following code:

    typedef struct tagNMHDR { HWND hwndFrom; // handle to control sending the message UINT idFrom; // ID of control sending the message UINT code; // control-specific notification code } NMHDR;

    Many controls, however, send WM_NOTIFY messages with pointers to structures larger than NMHDR. Those structures contain the three members above plus appended control-specific members. Many tree control notifications, for example, pass a pointer to an NM_TREEVIEW structure that contains TV_ITEM structures, a drag point, and so forth. When ClassWizard maps a WM_NOTIFY message, it generates a pointer to the appropriate structure.

  12. Thread: CTreeCtrl and DeleteItem notification
  13. MFC Controls: The Tree Control
  14. CTreeCtrl Notification Message
  15. CTreeCtrl, TrackPopupMenu and CCmdTarget
  16. MFC-- manually call message response function CTreeCtrl
  17. CTreeCtrl使用演示
  18. CTreeCtrl使用演示

CTabCtrl programming and other good MFC website

Sunday, March 1, 2020

MFC ClistCtrl topics

MFC ClistCtrl topics

  1. CListCtrl For Beginners
  2. Other C++ Sites: good list to take a look
  3. Creating an MFC Application Without the AppWizard
  4. Resource Editors (C++)
  5. how to open the file in resource view.

  6. CListCtrl and Displaying a Tooltip
  7. CListCtrl and Cell Navigation
  8. I got error when I compiled this project in Visual Studio 2017.

    Error CVT1100 duplicate resource. type:MANIFEST, name:1, language:0x0409 ListCtrl_CellNav C:\Users\chris_alpha\Downloads\ListCtrl_CellNav\ListCtrl_CellNav\CVTRES 1

    I tested this solution:

    This error message shows the given resource was specified more than once. I would suggest you try to set Embed Manifest to No through Project > Properties... > Configuration Properties > Manifest Tools > Input and Output , or try to comment/remove the manifest from .rc file.

    another solution: edit .rc file and remove manifest file

    I know this is a late response, but I had the same issue. I found that if I removed the manifest.xml or whatever extension from the .RC2 file and explicitly put in under MANIFEST TOOLS> INPUT AND OUTPUT>

    Additional Manifest Files: _____ full path \ manifest.xml

    Everything works as it should. This applies for Visual Studio 2013.

  9. fatal error CVT1100: duplicate resource. type:MANIFEST, name:1,
  10. Solve CVT1100: duplicate resource. type:MANIFEST issue in Visual Studio for MFC/C++
  11. a good comment needs attention:

    The error is often cause by two resources having the same resource ID. i.e. the same source resource (.rc) values in a (downloaded) library as in your main application.

    This needs to be fixed by making sure any included resources (from a library) do not conflict with your main program resources. A quick edit of the ID numbers will fix the problem (don't forget to alter the next issue number at bottom to the resource file!),

    For our own libraries we ensure they all use different ranges to the main application.

  12. Understanding Manifest Generation for C/C++ Programs

  13. Custom ToolTips for MFC Projects
  14. ListControl: on YouTube.com
  15. MFC Virtual List Control
  16. MFC Controls: The List Control
  17. About Tooltip & CListCtrl
  18. /Clistctrl sample.md on GitHub
  19. How to add BCGControlBar/BCGSuite for MFC controls to dialogs
  20. demo steps on how to add these controls into project

  21. CListCtrl Class
  22. Requirements: Header: afxcmn.h

  23. Using CListCtrl
  24. MFC - List Control
  25. Using the List Control
  26. this project is very good example to learn CListCtrl basics. when I compiled this project, I got this errors when I used static MFC library.

    Error C1189 #error: Building MFC application with /MD[d] (CRT dll version) requires MFC shared dll version. Please #define _AFXDLL or do not use /MD[d] ListCtrlDemo c:\program files (x86)\microsoft visual studio\2017\enterprise\vc\tools\msvc\14.16.27023\atlmfc\include\afx.h 24

    my solution is tested the same with this post:

    In my experience is a two ways step. suppose You want STATIC linking: a) set "Use MFC in a Static Library" b) add: #define _AFXDLL 1 in stdafx.h works on VS 2012

  27. error Please #define _AFXDLL or do not use /MD[d] occurs even after making changes in Project Properties
  28. CListCtrl and Grouping Rows
  29. CListCtrl and Displaying a Tooltip
  30. CListCtrl and sorting rows
  31. Searching for a reliable hardware ID
  32. CListCtrl and sorting rows
  33. Using the List Control
  34. TN035: Using Multiple Resource Files and Header Files with Visual C++
  35. What are the macros in resource.h used for?
  36. Need understanding of the code
  37. Localizing resources problem
  38. Microsoft Visual C++ generated resource script
  39. fatal error:can not open afxres.h file
  40. MFC中的Resource.h文件理解