|
As I have stated in my question the OLE interfaace only works SF_RTF my text was streamed in SF_TEXT
I have decided to copy Visual Studio the code is probably in SF_TEXT if you look around the code there is a frame possibly a dialogbox frame the breakpoint is probably and CDC::Ellipse. bitmaps seem to have a 3d look With SF_TEXT you cann't draw in the rich edit it messes up the text. I drew on side of the adjoining dialogbox box frame what I really needed was the y coordinates got the from PosFromChar the x I can determine from the width of the dialogbox frame thank you
|
|
|
|
|
Ignore answers from that person. We are fairly sure that they are creating answers by using the AI site ChatGPT.
|
|
|
|
|
Thanks Richard’s it looks really nice wish I could post a .jpg
|
|
|
|
|
Hi
I posted this yesterday by mistake in the CLI forum, so I am reposting here. I am getting a heap corruption in my stream in function. I have a global variable, which keep count of the number of records I stream in the exception happens when the record count is 0x197e
When I insert the following code
if (nummachine == 0x000000000000196E)
__debugbreak();
and step thru the code everythibg works fine
the amount of characters i am streaming (as I said I am able to complete the process with the above code
is 0x7604d0 or 7,734480 decimal
I use the following code
RichListing->LimitText(0x780000); though the function says that is intended for RTF code
here is the stack frame when I get the exception any debugging ideas would be much appreciated.
Thank you.
ntdll.dll!RtlReportCriticalFailure() Unknown
ntdll.dll!RtlpHeapHandleError() Unknown
ntdll.dll!RtlpHpHeapHandleError() Unknown
ntdll.dll!RtlpLogHeapFailure() Unknown
ntdll.dll!RtlpHeapFindListLookupEntry() Unknown
ntdll.dll!RtlpFindEntry() Unknown
ntdll.dll!RtlpAllocateHeap() Unknown
ntdll.dll!RtlpAllocateHeapInternal() Unknown
riched20.dll!CTxtArray::AddBlock(long,long) Unknown
riched20.dll!CTxtArray::SplitBlock(long,long,long,long,int) Unknown
riched20.dll!CTxtPtr::InsertRange(long,unsigned short const *) Unknown
riched20.dll!CRchTxtPtr::ReplaceRange(long,long,unsigned short const *,class IUndoBuilder *,long,long *,unsigned long) Unknown
riched20.dll!CTxtRange::ReplaceRange(long,unsigned short const *,class IUndoBuilder *,enum SELRR,long *,unsigned long) Unknown
riched20.dll!CTxtRange::CheckLimitReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned long,long *,long,int,unsigned long) Unknown
riched20.dll!CTxtRange::CleanseAndReplaceRange(long,unsigned short const *,int,class IUndoBuilder *,unsigned short *,long *,unsigned long) Unknown
riched20.dll!CLightDTEngine::ReadPlainText(class CTxtRange *,struct _editstream *,int,class IUndoBuilder *,long) Unknown
riched20.dll!CLightDTEngine::LoadFromEs(class CTxtRange *,long,struct _editstream *,int,class IUndoBuilder *) Unknown
riched20.dll!CTxtEdit::TxSendMessage(unsigned int,unsigned __int64,__int64,__int64 *) Unknown
riched20.dll!RichEditWndProc() Unknown
riched20.dll!RichEditANSIWndProc() Unknown
user32.dll!UserCallWinProcCheckWow() Unknown
user32.dll!CallWindowProcAorW(__int64 ,struct HWND__ *,enum _WM_VALUE,unsigned __int64,__int64,int) Unknown
user32.dll!CallWindowProcA() Unknown
mfc140d.dll!CWnd::DefWindowProcA(unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 1100 C++
mfc140d.dll!CWnd::WindowProc(unsigned int message, unsigned __int64 wParam, __int64 lParam) Line 2100 C++
mfc140d.dll!AfxCallWndProc(CWnd * pWnd, HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 265 C++
mfc140d.dll!AfxWndProc(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 418 C++
mfc140d.dll!AfxWndProcBase(HWND__ * hWnd, unsigned int nMsg, unsigned __int64 wParam, __int64 lParam) Line 299 C++
user32.dll!UserCallWinProcCheckWow() Unknown
user32.dll!SendMessageWorker() Unknown
user32.dll!SendMessageInternal(struct HWND__ *,unsigned int,unsigned __int64,__int64,int) Unknown
user32.dll!SendMessageA() Unknown
> mfc140d.dll!CRichEditCtrl::StreamIn(int nFormat, _editstream & es) Line 775 C++
DriveRichEdit.exe!CProgDebug::OnInitDialog() Line 137 C++
[External Code]
DriveRichEdit.exe!CMainFrame::PROGDEBUG() Line 48 C++
[External Code]
DriveRichEdit.exe!WinMain(HINSTANCE__ * hInstance, HINSTANCE__ * hPrevInstance, char * lpCmdLine, int nCmdShow) Line 26 C++
[External Code]
|
|
|
|
|
it was a storage overlay I'll explain I had a global variable. the kept track of the number of records are but even so the exception didn't happen at that point.
I ended doing a binary search from thousands of records.
I had allocated 63 bytes assembler of storage. e,g a dc statement that defined 90
thing is the exception doesn't happen. right away its way down the road and you have no idea where those _crtcheckmemory don't really help.
|
|
|
|
|
ForNow wrote: right away its way down the road
Yep that is how memory (heap) corruption works. You broke the heap at that point. Then somewhere after it something went to use the heap and at that point the data was bad.
Additionally the behavior that happens could be almost anything. Depends on what the actual data (bad) was in the heap and what it was attempting to do with it at that point, and even what was calling it.
|
|
|
|
|
When I overlay storage on z/os I get a s0c4 pic 10,11 etc my recovery gets control and I can pretty much determine what happened
I had a record count at of x196e
It actually happened at record x1905 had no idea where to look inserted crtmemory check at my new’s and map::insert
Finally got it wondering if there is easier way to figure out storage/heap issues thank you
|
|
|
|
|
Message Closed
modified 15-May-23 19:06pm.
|
|
|
|
|
It's a way of commenting out a block of code. In your case, seems like a way to eliminate some debug messages.
Mircea
|
|
|
|
|
Message Closed
modified 15-May-23 19:06pm.
|
|
|
|
|
Quote: BUT does
#if 0
evaluates to "true " ?
0 evaluates to 'false' see, for instance, the bottom line of this page: If (The C Preprocessor)[^]
Quote: I have been using
#ifdef BYPASS
#endif
where BYPASS is not defined
to skip the enclosed block The compiler skips the code if BYPASS is not defined (that is, the 'condition' is 'false').
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I am using a (portable?) exe, not requiring an install.
[DELETED]
It allows to drag its panes, which it remembers between sessions.
The pane layout is now in a corrupted state, one pane does not show up and I would like to "reset" it.
I was looking in the following places:
- no hidden file with the binary
- no registry entry
- no data in AppData
- no change upon deleting the directory and unzipping again.
Any idea?
|
|
|
|
|
Go back to the manufacturers and ask them: they are the only people with the source code, so they are the only ones who can help you fix it.
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
OK, found a solution:
- install Process Explorer
- add Evan.exe process/subprocess monitoring
- Filter subsequently for file/registry access
- Found
HKCU\SOFTWARE\EVAN with size data
- delete this key in regedit.
|
|
|
|
|
Message Closed
modified 15-May-23 19:06pm.
|
|
|
|
|
Forward declarations have their use (without them that code wouldn't compile).
You might find an explanation here: Forward declaration - Wikipedia[^].
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
I would assume that the forward declarations are required because you have:
public:
QBluetoothDeviceDiscoveryAgent *discoveryAgent;
QBluetoothLocalDevice *localDevice;
in your class. And these two pointers refer to the QBluetoothDeviceDiscoveryAgent and QBluetoothLocalDevice classes. However, you also have the include files:
#include "QtBluetooth/qbluetoothdevicediscoveryagent.h" // ?
#include "QtBluetooth/qbluetoothdeviceinfo.h"
#include "QtBluetooth/qbluetoothlocaldevice.h" // ?
before your class definition, where one would assume that the aforementioned are actually declared. So maybe they are not really needed.
|
|
|
|
|
Member 14968771 wrote: Why so many
That is usually a subjective thing. In general it should not be required.
But what happens, over time, is that as complexity grows so does the definitions.
And there are only two choices
1. Include the actual source of the definition
2. Include a short cut.
The first solution, in general requires that the compiler reread (parse, tokenize, etc) the full included source files every time and then likely the includes for those as well and that can continue for a while. That takes time. Compilers, now, tend to attempt to optimize that by using various caching strategies. But, at least in the past, some of those were less than reliable.
So people might want to avoid that by using short cuts. Thus the compiler can do far less work. And that is what that is.
Ideally of course the design should minimize all of that. Even at times to the point of perhaps reducing clarity. One trick that I used to use was to create two includes. One that was only for public consumption and the other for internal consumption (for example internal structs) and then the public visible items used something like a 'void *' and then I used casts for the internals. That did allow the external include to be smaller it size but it was a solution that only worked in some cases.
|
|
|
|
|
Message Closed
modified 15-May-23 19:06pm.
|
|
|
|
|
Member 14968771 wrote: even with the comment "things grow in complexity "....
Have you worked with legacy systems? Systems that have been in continued use for 20 years with ongoing changes throughout that time period?
And for a product that has started with a small customer base but which has grown to many?
Google for example...
"span a whopping 2 billion lines of code that stretch across 1 billion files and require 86 terabytes of storage,"
Don't you suppose there are some less than ideal code in that?
Or if you prefer GCC is roughly 15 million lines of code.
Member 14968771 wrote: and that should be all ( objective) what is needed
That is of course specifically subjective.
And you will not find any non-trivial application code base in C++ where the vast majority of files follow that model. Most will have many include files. Sometimes there are even include files that are nothing but a container for other include files (and that can recurse.)
|
|
|
|
|
Hi
I resolved all the initial heap errors still receiving some but I think I know the cause the Assembler listing I am streaming is 153 pages with 54 lines to page and about 130 characters across so that's a little bit over a meg large, Can I use LimitText to give myself the space?
|
|
|
|
|
|
|
I am working at blitting to back frame buffers a changing variety of bitmaps to create animations. When completed, that would be sent to the screen. I want to do this with minimum processing and minimum RAM.
Svetoslav Chekanov, on another page Fast 2:1 Image Shrink (Scale Down)[^] said,
Quote: Device dependent format is blitted faster to the screen.
I did not know that. I have been using Device Independent because it seemed to be easier to work with. I will now consider this Dependent vs Independent.
I found a discussion with some interesting observations. C++ Windows API: Is there any alternative of the SetDIBits for device-dependent Bitmap?[^] In that I found: Quote: The difference is insignificant, more than swamped by the time it takes to
copy the bitmap to the frame buffer. May I have some feedback on this "is insignificant" comment (from the Windows API link) if it is correct or not?
I also read on that page, Quote: In a DIB, each scanline is always a multiple of 4 bytes. In a 24-bit DIB,
that means you will have extra padding bytes unless the width is a multiple
of 4. I did not know that. I will now have that to consider.
Looking forward to learning more about this.
|
|
|
|
|
|