Click here to Skip to main content
16,005,826 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionWSA - SOCKET ERROR Pin
marc.bellario16-Oct-07 4:31
marc.bellario16-Oct-07 4:31 
AnswerRe: WSA - SOCKET ERROR Pin
led mike16-Oct-07 4:51
led mike16-Oct-07 4:51 
GeneralRe: WSA - SOCKET ERROR Pin
marc.bellario16-Oct-07 5:08
marc.bellario16-Oct-07 5:08 
GeneralRe: WSA - SOCKET ERROR Pin
Mark Salsbery16-Oct-07 5:17
Mark Salsbery16-Oct-07 5:17 
GeneralRe: WSA - SOCKET ERROR Pin
David Crow16-Oct-07 5:25
David Crow16-Oct-07 5:25 
GeneralRe: WSA - SOCKET ERROR Pin
Mark Salsbery16-Oct-07 6:31
Mark Salsbery16-Oct-07 6:31 
GeneralRe: WSA - SOCKET ERROR Pin
led mike16-Oct-07 5:22
led mike16-Oct-07 5:22 
QuestionProblem with a loop in UpdateWindow Pin
Nelek16-Oct-07 3:17
protectorNelek16-Oct-07 3:17 
Hi people,

I’m having a problem while updating a CFormView. I switch a variable m_nStatus and depending on its value I do some things. My problems are in these lines:

//This code is inside CMyFormView::OnDraw ()
//
case 4:		// Connected, avoid changes
//
	//… Here I disable some buttons with m_cbMyButtonX.EnableWindow (FALSE);
//
	if (m_bWriteMode && !m_bReadMode)
		m_cbTransfer.ShowWindow (TRUE);					
	else if (!m_bWriteMode && m_bReadMode)
		m_cbRead.ShowWindow (TRUE);
//
	//… Here I change the value of the labels
	break;


I know the problem is there, because if I comment them, all works ok.

What happens is that, when I have my application running on the top, works fine. If I switch to another program (i.e. back to VC++ to debug something) and come back, or using a timer all ok until the first WM_TIMER…

Then the FormView gets crazy and starts to update itself continuously, so quick, that the labels don’t appear. It stays so… till I move the window or something like that.

I guess that the ShowWindow () to make the buttons in/visibles is sending an internal UpdateWindow () or something like that. And it comes into a loop: show button, updatewindow, show button, updatewindow…


Is there any way to avoid this f… continous window update? I know I can make both buttons visible and play with the enable/disable, but I would like to do it as I have (without the problem of course).

Thanks


Greetings.

--------
M.D.V.

If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?

Help me to understand what I'm saying, and I'll explain it better to you

Wink | ;)

QuestionRe: Problem with a loop in UpdateWindow Pin
David Crow16-Oct-07 4:02
David Crow16-Oct-07 4:02 
AnswerRe: Problem with a loop in UpdateWindow Pin
Nelek16-Oct-07 21:49
protectorNelek16-Oct-07 21:49 
GeneralRe: Problem with a loop in UpdateWindow Pin
David Crow17-Oct-07 4:20
David Crow17-Oct-07 4:20 
JokeRe: Problem with a loop in UpdateWindow Pin
Nelek17-Oct-07 5:40
protectorNelek17-Oct-07 5:40 
AnswerRe: Problem with a loop in UpdateWindow Pin
Mike Dimmick17-Oct-07 4:11
Mike Dimmick17-Oct-07 4:11 
GeneralRe: Problem with a loop in UpdateWindow Pin
Nelek17-Oct-07 5:36
protectorNelek17-Oct-07 5:36 
QuestionOpenGL Coloured Lighting Pin
Anthony Mushrow16-Oct-07 1:52
professionalAnthony Mushrow16-Oct-07 1:52 
AnswerRe: OpenGL Coloured Lighting Pin
El Corazon16-Oct-07 6:52
El Corazon16-Oct-07 6:52 
GeneralRe: OpenGL Coloured Lighting Pin
Anthony Mushrow16-Oct-07 9:43
professionalAnthony Mushrow16-Oct-07 9:43 
GeneralRe: OpenGL Coloured Lighting Pin
El Corazon16-Oct-07 10:49
El Corazon16-Oct-07 10:49 
QuestionAdding Images to the subitems in ListView Pin
D.Srihari16-Oct-07 1:37
D.Srihari16-Oct-07 1:37 
AnswerRe: Adding Images to the subitems in ListView Pin
Nelek16-Oct-07 3:21
protectorNelek16-Oct-07 3:21 
AnswerRe: Adding Images to the subitems in ListView Pin
Hamid_RT16-Oct-07 8:28
Hamid_RT16-Oct-07 8:28 
QuestionMinimize button for the application Pin
shir_k16-Oct-07 1:27
shir_k16-Oct-07 1:27 
QuestionRe: Minimize button for the application Pin
David Crow16-Oct-07 3:09
David Crow16-Oct-07 3:09 
AnswerRe: Minimize button for the application Pin
shir_k16-Oct-07 19:01
shir_k16-Oct-07 19:01 
GeneralRe: Minimize button for the application Pin
shir_k16-Oct-07 23:28
shir_k16-Oct-07 23:28 

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.