Click here to Skip to main content
15,919,749 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questioncalcution of the the total process time(urgent) Pin
makaveli_073-May-06 17:58
makaveli_073-May-06 17:58 
AnswerRe: calcution of the the total process time(urgent) Pin
Joe Woodbury3-May-06 18:20
professionalJoe Woodbury3-May-06 18:20 
GeneralRe: calcution of the the total process time(urgent) Pin
makaveli_073-May-06 19:03
makaveli_073-May-06 19:03 
GeneralRe: calcution of the the total process time(urgent) Pin
Joe Woodbury3-May-06 19:14
professionalJoe Woodbury3-May-06 19:14 
AnswerRe: calcution of the the total process time(urgent) Pin
Laxman Auti3-May-06 18:32
Laxman Auti3-May-06 18:32 
GeneralRe: calcution of the the total process time(urgent) Pin
makaveli_073-May-06 18:42
makaveli_073-May-06 18:42 
AnswerRe: calcution of the the total process time(urgent) Pin
Laxman Auti3-May-06 19:14
Laxman Auti3-May-06 19:14 
QuestionUnmovable Window Pin
HakunaMatada3-May-06 17:49
HakunaMatada3-May-06 17:49 
Hi all,

I have created a Window using WINAPI. To make the window unmovable, this is what I have done:

LRESULT CMyFrameWnd::WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)<br />
{<br />
	LRESULT lr ;<br />
<br />
	switch( uMsg )<br />
	{<br />
		case WM_CREATE:<br />
			OnCreate( uMsg, wParam, lParam ) ;<br />
			break ;<br />
<br />
		case WM_SIZE:<br />
			if( wParam == SIZE_MAXIMIZED )<br />
				MessageBox(NULL, "sdfasd", NULL, 0 ) ;<br />
			break ;<br />
<br />
		case WM_WINDOWPOSCHANGING:<br />
			MessageBeep( 0 ) ;			<br />
			break ;<br />
<br />
		case WM_NCHITTEST:<br />
			lr = DefWindowProc( hWnd, uMsg, wParam, lParam ) ;<br />
			if( lr == HTCAPTION )<br />
			{<br />
				lr = HTNOWHERE ;<br />
			}<br />
			return lr;<br />
			break ;<br />
<br />
		case WM_NCDESTROY:<br />
			OnFinalMessage();<br />
			break ;<br />
	}	<br />
<br />
	return DefWindowProc( hWnd, uMsg, wParam, lParam ) ;<br />
}


and its working fine. But overriding the HTCAPTION disables all clicks on the caption bar. Although, I don't want the Window to move, I would like to maximize its size by double clicking on the caption bar. Any ideas?

Also, How do I set the maximum size for a window and control the resizing of the Window?

Thanks.

---
With best regards,
A Manchester United Fan

The Genius of a true fool is that he can mess up a foolproof plan!
AnswerRe: Unmovable Window Pin
Ryan Binns3-May-06 17:57
Ryan Binns3-May-06 17:57 
AnswerRe: Unmovable Window Pin
Anilkumar K V3-May-06 18:09
Anilkumar K V3-May-06 18:09 
AnswerRe: Unmovable Window Pin
Nibu babu thomas3-May-06 18:13
Nibu babu thomas3-May-06 18:13 
GeneralRe: Unmovable Window Pin
Nishad S3-May-06 18:27
Nishad S3-May-06 18:27 
AnswerRe: Unmovable Window Pin
Nishad S3-May-06 18:25
Nishad S3-May-06 18:25 
QuestionStatic Text Win32 Pin
Anilkumar K V3-May-06 17:45
Anilkumar K V3-May-06 17:45 
AnswerRe: Static Text Win32 Pin
Justin Tay3-May-06 22:16
Justin Tay3-May-06 22:16 
QuestionHow to change background color of PropertyPage? Pin
includeh103-May-06 17:03
includeh103-May-06 17:03 
AnswerRe: How to change background color of PropertyPage? Pin
Nibu babu thomas3-May-06 17:30
Nibu babu thomas3-May-06 17:30 
QuestionSWITCH CASE ON std::string Pin
rahultaing3-May-06 16:21
rahultaing3-May-06 16:21 
AnswerRe: SWITCH CASE ON std::string Pin
Joe Woodbury3-May-06 16:26
professionalJoe Woodbury3-May-06 16:26 
Questionmmsystem.h errors!??? Pin
Ed K3-May-06 15:50
Ed K3-May-06 15:50 
QuestionRe: mmsystem.h errors!??? Pin
Nibu babu thomas3-May-06 17:32
Nibu babu thomas3-May-06 17:32 
AnswerRe: mmsystem.h errors!??? Pin
Ed K5-May-06 14:52
Ed K5-May-06 14:52 
AnswerRe: mmsystem.h errors!??? Pin
Nishad S3-May-06 17:40
Nishad S3-May-06 17:40 
AnswerRe: mmsystem.h errors!??? Pin
Saurabh.Garg3-May-06 17:53
Saurabh.Garg3-May-06 17:53 
AnswerRe: mmsystem.h errors!??? Pin
Ryan Binns3-May-06 18:01
Ryan Binns3-May-06 18:01 

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.