This notification code is sent in the form of a WM\NOTIFY message. NMCUSTOMDRAW notification code (Commctrl.h) - Win32 apps Notifies a control's parent window about custom drawing operations. Have you called AfxInitRichEdit() to initialize RichEdit control. To create a rich edit control, call the CreateWindowEx function, specifying the rich edit window class. Once again, these leaks disallow the dialog box from even appearing during a debug. I added a variable to the Edit Control - no leaks Your application can resize a Rich Edit Control (CRichEditControl) as needed, so that the control is always the same height as its contents. I resized and renamed the Edit Control - no leaks The Rich Edit Control already has what's called a 'bottomless' behavior, but as we'll see, it's doesn't solve the problem of calculating the optimal 'width'. Taking it another step farther, I created an empty MFC application and ran it naked. It, too, wouldn't run, crashing before opening the application. (These memory leaks cause the program to crash when testing, before the dialog box even showed up).Īfter failing to discover the problem in my code, I decided to build an empty duplicate-that is, re-create the dialog box in a new project so the only code present was that generated by Visual Studio. After building the application, writing the code (it compiled cleanly), I was stunned to find there were memory leaks, even though I'd not allocated any memory. I'm creating a simple MFC dialog-based program that requires the use of two Rich Edit 2.0 Controls.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |