| | |
Stop iteratively creating handle.
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
Hi all,
I've create a window as follows,
After doing all the process, I've destroyed the window as well.
My question is this. I use the above handler iteratively within a loop. So all the time call the Initialize() in each processing step. Simply create and destroy to the equal number of looping process. I want to avoid it.
According to the MSDN, if the CreateWindowEx() is succeeds, the return value is a handle to the window. If it is failed the return value is NULL. So I've tried something like this.
But it doesn't work. Can you guys give me a clue on this.
I've create a window as follows,
C++ Syntax (Toggle Plain Text)
void CRtf::Initialize(void) { HWND m_hwnd_RTFBox = CreateWindowEx( WS_EX_APPWINDOW, RICHEDIT_CLASS, "RichTextWindow", WS_BORDER|ES_MULTILINE, 0, 0, 100, 100, ::GetConsoleWindow(), NULL, 0, NULL); }
After doing all the process, I've destroyed the window as well.
My question is this. I use the above handler iteratively within a loop. So all the time call the Initialize() in each processing step. Simply create and destroy to the equal number of looping process. I want to avoid it.
According to the MSDN, if the CreateWindowEx() is succeeds, the return value is a handle to the window. If it is failed the return value is NULL. So I've tried something like this.
C++ Syntax (Toggle Plain Text)
while(m_hwnd_RTFBox != NULL) { // Do the processing here }
But it doesn't work. Can you guys give me a clue on this.
“victory breeds hatred, the defeated live in pain; happily the peaceful live giving up victory and defeat” - Gautama Buddha
![]() |
Other Threads in the C++ Forum
- Previous Thread: Calling SocketServer's constructor
- Next Thread: waveInOpen
| Thread Tools | Search this Thread |
api array based beginner binary bitmap c++ c/c++ calculator char char* class classes coding compile compiler console conversion count data database delete deploy desktop developer directshow dll dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez google graph homeworkhelp homeworkhelper iamthwee ifstream input int integer lib linkedlist linux list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference return rpg sorting string strings struct template templates text tree unix url vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets





