[comp.windows.ms] stack overflow

cig@genrad.UUCP (Charles I. Ganimian Jr.) (01/12/89)

Hi
	Well I have the grandchild working (thanks again) but... 
	it seems to have generated a problem, here is the scenario.

	I fire up the app and go to the child window
	call up a dialog box and read in a file
	next I fire up the grandchild window and display the contents
		of the file and then close the grandchild
	the next operation (usually call a dialog box) causes a
		stack overflow (the child window's title bar shows
		that it is deactivated and then flickers until the 
		CV reports a stack overflow)

	spy tells me that I get a loop of WM_NCACTIVATE WM_GETTEXT and
	WM_ACTIVATE messages.

	CV shows that it happens in the WM_INITDIALOG when I do a SetFocus
	but if I let windows do the SetFocus (ie return TRUE from WM_INIT..) 
	it does the same thing.
	CV also tells me that the SP in back where it started after the
	the grandchild has been created and deleted

	What could I be doing in the grandchild code to cause this.  The
	grandchild displays text on the client area of the child (its parent)
	and has an OK button to remove it when you are done with the text.
	I also get a global memory handle and lock it and then unlock it
	and free it when I am done.


	Question 2 (for those still reading)
		how do I implement a keyboard interface for the grandchild,
		the user needs to be able to go from the OK button to a
		scrollbar.  Do I check WM_KEYDOWN for tabs and do it myself
		or is there a way to let windows do it (ala dialog boxes)


				any hints...

					thanks much
						charlie g.