Click here to Skip to main content
16,011,702 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionActiveX controls belong in Doc or View? Pin
Brendan Tregear9-Jan-01 11:01
Brendan Tregear9-Jan-01 11:01 
AnswerRe: ActiveX controls belong in Doc or View? Pin
Erik Funkenbusch9-Jan-01 12:20
Erik Funkenbusch9-Jan-01 12:20 
Generalstd::string and unicode Pin
Anders Molin9-Jan-01 8:52
professionalAnders Molin9-Jan-01 8:52 
GeneralRe: std::string and unicode Pin
Chad Plautz9-Jan-01 9:32
Chad Plautz9-Jan-01 9:32 
GeneralRe: std::string and unicode Pin
Chad Plautz9-Jan-01 9:38
Chad Plautz9-Jan-01 9:38 
GeneralRe: std::string and unicode Pin
Anders Molin9-Jan-01 21:02
professionalAnders Molin9-Jan-01 21:02 
QuestionHow do I force my program to check the message queue? Pin
Paul Auger9-Jan-01 6:35
Paul Auger9-Jan-01 6:35 
AnswerRe: How do I force my program to check the message queue? Pin
9-Jan-01 7:10
suss9-Jan-01 7:10 
I have the following static function in my class. (I also have a non-static function that takes no arguments and simply calls HandleMessages(m_hWnd, true). The reason I gave it the option to not do Idle processing is that OnIdle will kill the table that maps your CWnd's to HWND's. That is, if you have a temporary CWnd*, it will be useless after Idle processing happens. Anyway, all the function does is mimic what your program does while it's sitting around doing nothing. (The declaration is private: static void HandleMessages(HWND hWnd, bool bIdle = true))

void CypherusDlg::HandleMessages(HWND hWnd, bool bIdle /*=true*/)		//static
{
    MSG msg;
    while (::PeekMessage(&msg, hWnd, 0, 0, PM_NOREMOVE)) 
    { 
		if (!AfxGetApp()->PumpMessage()) 
		{ 
			break; 
		}
	}

	if(bIdle)
	{
		// let MFC do its idle processing
		LONG lIdle = 0;
		while (AfxGetApp()->OnIdle(lIdle++))
		{
			//nothing
		}
	}
}

GeneralCWnd - HWnd Map Related problem Pin
9-Jan-01 2:54
suss9-Jan-01 2:54 
GeneralHICON to .ico File Pin
8-Jan-01 23:17
suss8-Jan-01 23:17 
Questionhow to display a GIF image by programming? Pin
8-Jan-01 20:02
suss8-Jan-01 20:02 
AnswerRe: how to display a GIF image by programming? Pin
Jim Howard9-Jan-01 7:52
Jim Howard9-Jan-01 7:52 
GeneralRe: how to display a GIF image by programming? Pin
Marc Richarme9-Jan-01 9:01
Marc Richarme9-Jan-01 9:01 
GeneralRe: how to display a GIF image by programming? Pin
Christian Graus9-Jan-01 9:23
protectorChristian Graus9-Jan-01 9:23 
GeneralRe: how to display a GIF image by programming? Pin
Masoud Samimi9-Jan-01 9:59
Masoud Samimi9-Jan-01 9:59 
GeneralRe: how to display a GIF image by programming? Pin
Christian Graus9-Jan-01 13:14
protectorChristian Graus9-Jan-01 13:14 
GeneralRe: how to display a GIF image by programming? Pin
Masoud Samimi9-Jan-01 23:53
Masoud Samimi9-Jan-01 23:53 
AnswerRe: how to display a GIF image by programming? Pin
Juan Carlos Cobas9-Jan-01 10:23
Juan Carlos Cobas9-Jan-01 10:23 
Answerthank you very much Pin
9-Jan-01 22:57
suss9-Jan-01 22:57 
AnswerHere is the BEEF! (Animated GIF) :-) ( Was: how to display a GIF image by programming?) Pin
Masoud Samimi10-Jan-01 1:33
Masoud Samimi10-Jan-01 1:33 
GeneralRe: Here is the BEEF! (Animated GIF) :-) ( Was: how to display a GIF image by programming?) Pin
Masoud Samimi10-Jan-01 2:33
Masoud Samimi10-Jan-01 2:33 
GeneralSure ain't no beef - more likely Mad Cow Disease (Re: Here is the BEEF! (Animated GIF) :-) ( Was: how to display a GIF image by programming?)) Pin
10-Jan-01 4:07
suss10-Jan-01 4:07 
GeneralRe: Sure ain't no beef - more likely Mad Cow Disease (Re: Here is the BEEF! (Animated GIF) :-) ( Was: how to display a GIF image by programming?)) Pin
Masoud Samimi10-Jan-01 9:04
Masoud Samimi10-Jan-01 9:04 
AnswerRe: how to display a GIF image by programming? Pin
Chris Losinger10-Jan-01 10:36
professionalChris Losinger10-Jan-01 10:36 
GeneralRe: how to display a GIF image by programming? Pin
10-Jan-01 21:20
suss10-Jan-01 21:20 

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.