Click here to Skip to main content
15,900,590 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: BOOL AFXAPI AfxWinInit Pin
Naveen31-Dec-07 21:02
Naveen31-Dec-07 21:02 
GeneralInline functions and static linkage Pin
vikramlinux31-Dec-07 19:08
vikramlinux31-Dec-07 19:08 
GeneralRe: Inline functions and static linkage Pin
CPallini1-Jan-08 0:29
mveCPallini1-Jan-08 0:29 
GeneralRe: Inline functions and static linkage Pin
vikramlinux1-Jan-08 0:33
vikramlinux1-Jan-08 0:33 
GeneralRe: Inline functions and static linkage Pin
CPallini1-Jan-08 0:55
mveCPallini1-Jan-08 0:55 
GeneralRe: Inline functions and static linkage Pin
vikramlinux1-Jan-08 1:37
vikramlinux1-Jan-08 1:37 
GeneralRe: Inline functions and static linkage Pin
CPallini1-Jan-08 3:06
mveCPallini1-Jan-08 3:06 
GeneralStop iteratively creating handle. Pin
CodingLover31-Dec-07 19:03
CodingLover31-Dec-07 19:03 
Hi all,

I've create a window as follows,

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.

while(m_hwnd_RTFBox != NULL)
{
// Do the processing here
}


But it doesn't work. Can you guys give me a clue on this.

I appreciate your help all the time...
Eranga Smile | :)

GeneralRe: Stop iteratively creating handle. Pin
CodingLover31-Dec-07 21:50
CodingLover31-Dec-07 21:50 
GeneralMerry Christmas! Pin
Hakan Bulut31-Dec-07 7:51
Hakan Bulut31-Dec-07 7:51 
GeneralRe: Merry Christmas! Pin
Paul Conrad31-Dec-07 10:29
professionalPaul Conrad31-Dec-07 10:29 
GeneralRe: Merry Christmas! Pin
leckey31-Dec-07 15:40
leckey31-Dec-07 15:40 
GeneralPocket PC windows and the Return Key, it always closes them :'( Pin
OwenBurnett31-Dec-07 5:00
OwenBurnett31-Dec-07 5:00 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
Chris Losinger31-Dec-07 9:08
professionalChris Losinger31-Dec-07 9:08 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
OwenBurnett31-Dec-07 10:16
OwenBurnett31-Dec-07 10:16 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
Chris Losinger31-Dec-07 10:23
professionalChris Losinger31-Dec-07 10:23 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
OwenBurnett31-Dec-07 10:44
OwenBurnett31-Dec-07 10:44 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
Chris Losinger31-Dec-07 10:51
professionalChris Losinger31-Dec-07 10:51 
GeneralRe: Pocket PC windows and the Return Key, it always closes them :'( Pin
OwenBurnett31-Dec-07 12:41
OwenBurnett31-Dec-07 12:41 
QuestionOnMouseMove Flags Pin
Hakan Bulut31-Dec-07 4:31
Hakan Bulut31-Dec-07 4:31 
GeneralRe: OnMouseMove Flags Pin
ashukasama31-Dec-07 4:42
ashukasama31-Dec-07 4:42 
GeneralRe: OnMouseMove Flags Pin
Hakan Bulut31-Dec-07 7:38
Hakan Bulut31-Dec-07 7:38 
GeneralSimple C++ Inheritance and Performance Pin
Lea Hayes31-Dec-07 2:50
Lea Hayes31-Dec-07 2:50 
AnswerRe: Simple C++ Inheritance and Performance Pin
Florin Crişan31-Dec-07 3:14
Florin Crişan31-Dec-07 3:14 
GeneralRe: Simple C++ Inheritance and Performance Pin
Florin Crişan31-Dec-07 3:17
Florin Crişan31-Dec-07 3:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.