This is a simple control which really helped me when I needed to debug the code with no debug info on the binary (Linked as Release mode). We can actually use List Control or something similar but we have to spend more time on its properties like font. This control (I hope) will simplify our task on debugging or displaying some progress in our code.
How to use
There are few steps to use this control:
- Include two files, TextDispCtrl.h and TextDispCtrl.cpp in your project
- Create a Picture box (Frame) in your form/dialog
- Change its ID to whatever you want
- Include TextDispCtrl.h in the class declaration of your form/dialog
- Put this in your dialog/form class:
- Initialize the control, usually within
OnInitDialog() in dialog or
OnInitialUpdate() in form:
if( !m_wndx.Create(WS_VISIBLE | WS_CHILD | WS_TABSTOP, rect, this, 1000) )
- Call the following method to display strings:
- Or this function to Hex Dump your buffer:
This class will be useful for projects which needs no fancy appearance but developed just for functionality and display the progress as simple as possible. That's all for now! Cheers!