I have a CrichEditctrl which I am using to display code (as in debugger). When the User whishes to place a breakpoint I TransparentBlt a red bitmap to the left In order to give GDI it own space DeflateRect the Richedit Rect (for the text ) to the left and RcihEdit::SetRect the new smaller size for richedit, Placing the bitmap everything looks fine
However when my code reaches to where the breakpoint was set I highlite the line of code with SetSel and SetSelectionCharFormat this has the effect of wiping out the top of the red bullet bitmap which I dont understand Since the SetRect should ensure that it doesnt go out of the rect bounds. I know rich edit has an OLE interface (which can display bitmaps) however with that too I had problem as the bullet shifted the text
Sorry about that, it was not appropriate to the specifics of your question.
I cannot remember if you are using MFC or not. If you are then perhaps create your own class that inherits from the RichEdit class. If not then you could use the SubClassWindow function to get control of Windows WM_xxx messages and so modify what gets displayed.
I understand I am going to try one more thing all this time I have been using DDX to create the window handle to the richedit. and using the control id it would pick the rect value from the resource file
This in a way doesnt make sense. I am going to do a GetClientRect for the parent dialog deflat the recct on the left side then instantiate the Richedit with new and Call the Richedit Create to Create the
Have a look at the Scintilla library[^]. Last time I used it was nearly 20 years ago. I'm not even sure if Scintilla supports Windows anymore, you might need to do some research. I do see that they mention requiring a C++17 compiler on the website.
The default constructor does not contain PD_RETURNDEFAULT. You will need to use the PD_RETURNDEFAULT flag[^] to get the CPrintDialog class to simply return the default printer. In fact by using this flag the DoModal(); function won't even open a window.
Windows 10 makes decisions for the novice users. So Windows 10 will sometimes decide which printer to use and override the user choice. To disable this programmatically you could set the HKCU\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Windows\LegacyDefaultPrinterMode to TRUE.
I have some basic knowledge about pointers and I`m trying to get an exhaustive understanding, like an all sides perspective. My question is what does the operator ++ do to a pointer? I`ve seen it being used in linked lists related code.
could I increment not the value of the variable the pointer is pointing to but the pointer itself?
int Something0 = 0;
int Something1 = 1;
int ** Pointers = new int*;
Pointers = &Something0;
*Pointers++; //increase Something0 by 1
Pointers = &Something1;
*Pointers++; //increase Something1 by 1//Could I do this
**Pointers =10; //set Something0 to 10
**Pointers =30; //set Something1 to 30