Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionto anyone who can explain further...thank you in advance Pin
not insane yet!5-Mar-06 17:25
not insane yet!5-Mar-06 17:25 
AnswerRe: to anyone who can explain further...thank you in advance Pin
Nibu babu thomas5-Mar-06 17:30
Nibu babu thomas5-Mar-06 17:30 
AnswerRe: to anyone who can explain further...thank you in advance Pin
Divyang Mithaiwala5-Mar-06 17:50
Divyang Mithaiwala5-Mar-06 17:50 
Questionproblem in a program code Pin
ashira khera5-Mar-06 17:16
ashira khera5-Mar-06 17:16 
QuestionRe: problem in a program code Pin
David Crow6-Mar-06 3:06
David Crow6-Mar-06 3:06 
Answerhow to replace first half with reversed 2nd half Pin
ashira khera6-Mar-06 8:19
ashira khera6-Mar-06 8:19 
QuestionRe: how to replace first half with reversed 2nd half Pin
David Crow6-Mar-06 8:37
David Crow6-Mar-06 8:37 
QuestionProgram hangs when focused... Pin
the_augy5-Mar-06 15:27
the_augy5-Mar-06 15:27 
I have a dialog-based MFC application. I create a prop sheet, add some pages to it, and display it. Everything works fine at first, but if I move focus away from the dialog (like alt-tabbing to another window or clicking on another window), if I try to view my application again it hangs. However, it will ONLY hang if I interact with the prop sheet (tab control) window. I play around all I want with dialog controls that aren't in the prop sheet or its prop pages, but the minute I touch anything having to do with the prop sheet, the dialog will hang in the manner I just described.

Some other random things I've noticed:
1) If I do anything with the prop sheet (even something as simple as switch tabs), then move focus back to the main dialog by clicking one of the non-propsheet controls, the program will still hang when it gets focus back.
2) The program works perfectly fine while as long as it has focus. It's just when I switch to another window and then return that it hangs.
3) If I hit break in VC++6 while the program is hung, 99% of the time the message that my window is attempting to handle is WM_ACTIVATE (surprise surprise).

Here's my main dialog's OnInitDialog function:

<br />
	// make our tab control<br />
	m_PropSheet = new CPropertySheet("Project Manager");<br />
<br />
	m_ThreadProperties = new ThreadPropertiesPage;<br />
	m_PropSheet->AddPage(m_ThreadProperties);<br />
<br />
	m_TestSpec = new TestSpecificationPage;<br />
	m_PropSheet->AddPage(m_TestSpec);<br />
<br />
	m_MapProts = new MapPrototypes;<br />
	m_PropSheet->AddPage(m_MapProts);<br />
<br />
	m_PersistPage = new PersistPage;<br />
	m_PropSheet->AddPage(m_PersistPage);<br />
<br />
	m_ProjViewPage = new ProjectViewPage;<br />
	m_PropSheet->AddPage(m_ProjViewPage);<br />
	m_ProjViewPage->SetPMDlg(this);<br />
	<br />
	m_PropSheet->Create(this,WS_CHILD,NULL);<br />
<br />
	m_PropSheet->SetWindowPos(NULL,10,27, 750,300,NULL); <br />
	m_PropSheet->ShowWindow(TRUE);<br />


Nothin' much there.
Thanks much for your help.
AnswerRe: Here's some more information Pin
the_augy5-Mar-06 21:46
the_augy5-Mar-06 21:46 
AnswerYour urgent query... Pin
BadJerry8-Jan-07 1:47
BadJerry8-Jan-07 1:47 
QuestionProgramming Tutor Pin
VegasMalone5-Mar-06 14:45
VegasMalone5-Mar-06 14:45 
AnswerRe: Programming Tutor Pin
John R. Shaw5-Mar-06 16:17
John R. Shaw5-Mar-06 16:17 
QuestionExtracting numbers from a year Pin
Titan905-Mar-06 13:05
Titan905-Mar-06 13:05 
AnswerRe: Extracting numbers from a year Pin
Michael Dunn5-Mar-06 13:22
sitebuilderMichael Dunn5-Mar-06 13:22 
AnswerRe: Extracting numbers from a year Pin
PJ Arends5-Mar-06 13:31
professionalPJ Arends5-Mar-06 13:31 
GeneralRe: Extracting numbers from a year Pin
Titan905-Mar-06 15:26
Titan905-Mar-06 15:26 
QuestionUsing .lib vs. .dll Pin
Eikthrynir5-Mar-06 12:12
Eikthrynir5-Mar-06 12:12 
AnswerRe: Using .lib vs. .dll Pin
Jörgen Sigvardsson5-Mar-06 12:44
Jörgen Sigvardsson5-Mar-06 12:44 
GeneralRe: Using .lib vs. .dll Pin
John R. Shaw5-Mar-06 16:08
John R. Shaw5-Mar-06 16:08 
AnswerRe: Using .lib vs. .dll Pin
Tim Smith5-Mar-06 14:05
Tim Smith5-Mar-06 14:05 
QuestionOpenGL MFC Pin
braveheartkenya5-Mar-06 11:14
braveheartkenya5-Mar-06 11:14 
AnswerRe: OpenGL MFC Pin
Steve Echols5-Mar-06 12:28
Steve Echols5-Mar-06 12:28 
Questionproblem calling NtQuerySystemInformation Pin
gamitech5-Mar-06 8:18
gamitech5-Mar-06 8:18 
QuestionCFileDialog Resource Pin
MON2055-Mar-06 6:26
MON2055-Mar-06 6:26 
AnswerRe: CFileDialog Resource Pin
Naveen5-Mar-06 16:10
Naveen5-Mar-06 16:10 

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.