Make a window Static as well as allow adding text using CreateWindowEx(

Thread Solved

Join Date: Jun 2009
Posts: 2
Reputation: GotAmye is an unknown quantity at this point 
Solved Threads: 0
GotAmye GotAmye is offline Offline
Newbie Poster

Make a window Static as well as allow adding text using CreateWindowEx(

 
0
  #1
Jun 26th, 2009
I'm using CreateWindowEx() function to create an "EDIT" window, i.e. where a user can type.
g_hwndMain =  CreateWindowEx(0,
			WC_TEXT,
			NULL, 
			WS_VISIBLE | WS_BORDER | ES_AUTOHSCROLL,
			0, 0, 400, 200,
			phwnd, NULL, 
			g_hInstance, NULL);

But I would also like the window to be static. Is there a way to do it during the creation of the window? Or any other function that may be used after the creation of the window? I tried using SetWindowPos function after creating the window using SWP_NOSENDCHANGING and SWP_NOREPOSITION, but that didn't o the trick. ANy ideas
Reply With Quote Quick reply to this message  
Join Date: Jun 2009
Posts: 2
Reputation: GotAmye is an unknown quantity at this point 
Solved Threads: 0
GotAmye GotAmye is offline Offline
Newbie Poster

Re: Make a window Static as well as allow adding text using CreateWindowEx(

 
0
  #2
Jun 29th, 2009
Handling WM_WINDOWPOSCHANGING message and then setting the SWP_NOSENDCHANGING flag of the flags member of the WINDOWPOS structure did the trick
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC