Click here to Skip to main content
15,910,009 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: C++ headers help.. Pin
prasad_som5-Apr-07 22:23
prasad_som5-Apr-07 22:23 
Questionscreen capturing Pin
khema5-Apr-07 19:12
khema5-Apr-07 19:12 
AnswerRe: screen capturing Pin
Hamid_RT5-Apr-07 19:29
Hamid_RT5-Apr-07 19:29 
AnswerRe: screen capturing Pin
Naveen5-Apr-07 19:33
Naveen5-Apr-07 19:33 
AnswerRe: screen capturing Pin
Don Box5-Apr-07 19:37
Don Box5-Apr-07 19:37 
AnswerRe: screen capturing Pin
ThatsAlok23-Apr-07 0:09
ThatsAlok23-Apr-07 0:09 
QuestionMDI maximized child bug Pin
hsuch5-Apr-07 19:03
hsuch5-Apr-07 19:03 
AnswerRe: MDI maximized child bug Pin
hsuch6-Apr-07 0:27
hsuch6-Apr-07 0:27 
I read "Daniel Bowen, Creating a new MDI child: maximization and focus issues" and got some idea. I should handle redraw and focus issues. Set the client window as MDIS_ALLCHILDSTYLES style and change the function to :
HWND child_createWnd(HWND hwndClient, int x, int y, int w, int h, TCHAR szCaption[], TCHAR szFilename[])
{
	HWND hwndChild ;
	MDICREATESTRUCT mdicreate ;
	int fMax = 0;
	
	if(!childClass) childClass = zw_child_registerClass(); 
	
	mdicreate.szClass = szChildClass ;
	mdicreate.szTitle = szCaption ;
	mdicreate.hOwner  = GetModuleHandle(0) ;
	mdicreate.x       = CW_USEDEFAULT ;
	mdicreate.y       = CW_USEDEFAULT ;
	mdicreate.cx      = CW_USEDEFAULT ;
	mdicreate.cy      = CW_USEDEFAULT ;
	mdicreate.style   = <code>WS_OVERLAPPEDWINDOW | WS_CHILD | WS_CLIPSIBLINGS | WS_VSCROLL | WS_HSCROLL;</code>
	mdicreate.lParam  = (LPARAM)szFilename ;	
	
	<code>SendMessage(hwndClient, WM_SETREDRAW, FALSE, 0); /* Disable redraw */ </code>

	hwndChild = (HWND) SendMessage (hwndClient,
		WM_MDICREATE, 0,
		(LPARAM) (LPMDICREATESTRUCT) &mdicreate) ; 

		
<code>	/* Should maximize? */
	SendMessage(hwndClient, WM_MDIGETACTIVE, 0, &fMax);
	fMax? ShowWindow(hwndChild, SW_MAXIMIZE) : ShowWindow(hwndChild, SW_NORMAL);
	
	/* Handle focus here */
	SetFocus(hwndChild);
	
	/* Enable and redraw */
	SendMessage(hwndClient, WM_SETREDRAW, TRUE, 0); 
	RedrawWindow(hwndClient, NULL, NULL, RDW_INVALIDATE | RDW_ALLCHILDREN);</code>	
	

	return hwndChild;

Right now everything is correct except very slow. If you have better idea, please let me know, thanks.
QuestionglBindTexture undefined identifier? Pin
dreamtwister5-Apr-07 18:09
dreamtwister5-Apr-07 18:09 
AnswerRe: glBindTexture undefined identifier? Pin
dreamtwister5-Apr-07 19:35
dreamtwister5-Apr-07 19:35 
AnswerRe: glBindTexture undefined identifier? Pin
Hamid_RT5-Apr-07 19:35
Hamid_RT5-Apr-07 19:35 
GeneralRe: glBindTexture undefined identifier? Pin
dreamtwister5-Apr-07 20:44
dreamtwister5-Apr-07 20:44 
QuestionHow to overlap a Edit control onto a List control? Pin
zouchao11125-Apr-07 16:17
zouchao11125-Apr-07 16:17 
AnswerRe: How to overlap a Edit control onto a List control? Pin
Naveen5-Apr-07 19:26
Naveen5-Apr-07 19:26 
AnswerRe: How to overlap a Edit control onto a List control? Pin
ThatsAlok23-Apr-07 0:05
ThatsAlok23-Apr-07 0:05 
QuestionSMS Text Messages Pin
Bram van Kampen5-Apr-07 13:58
Bram van Kampen5-Apr-07 13:58 
AnswerRe: SMS Text Messages Pin
ThatsAlok23-Apr-07 0:05
ThatsAlok23-Apr-07 0:05 
GeneralRe: SMS Text Messages Pin
Bram van Kampen4-May-07 14:33
Bram van Kampen4-May-07 14:33 
QuestionFunction help [modified] Pin
planetx225-Apr-07 12:47
planetx225-Apr-07 12:47 
AnswerRe: Function help Pin
Bram van Kampen5-Apr-07 14:59
Bram van Kampen5-Apr-07 14:59 
GeneralRe: Function help Pin
planetx225-Apr-07 15:16
planetx225-Apr-07 15:16 
GeneralRe: Function help Pin
Rick York5-Apr-07 15:27
mveRick York5-Apr-07 15:27 
GeneralRe: Function help Pin
Bram van Kampen5-Apr-07 15:39
Bram van Kampen5-Apr-07 15:39 
Questionfibbonacci series Pin
badamanil5-Apr-07 10:54
badamanil5-Apr-07 10:54 
AnswerRe: fibbonacci series Pin
led mike5-Apr-07 10:59
led mike5-Apr-07 10:59 

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.