Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


[Win32 API]Child Dialog woes


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
2 replies to this topic

#1 Clash Rocker   Members   -  Reputation: 130

Like
Likes
Like

Posted 18 June 2001 - 05:38 PM

OK, I have a my main program dialog, which has a menu and a tree view. At some time in the program the user will activate a child dialog to be displayed. Now when this happenes I get troubles. 1)When right clicking on title bar or left clicking on small icon: The system menu doesn''t show up. 2)I completely lose focus of my menu on treeview. Thou when I click repeatedy on the treeview control some, but not all of the tree view nodes show up... Child dialog stuff:
  
DLGTEMPLATE*         g_pChildDlgs[2];
//....

	g_pChildDlgs[0] = (DLGTEMPLATE *)LockResource(LoadResource(g_hMainInst, FindResource(0, MAKEINTRESOURCE(IDD_ONE), RT_DIALOG)));
	g_pChildDlgs[1] = (DLGTEMPLATE *)LockResource(LoadResource(g_hMainInst, FindResource(0, MAKEINTRESOURCE(IDD_TWO), RT_DIALOG)));
//....

	hChildDlg =  CreateDialogIndirect(g_hMainInst, g_pChildDlgs[0], hWnd, OneDlgProc);
	ShowWindow(hChildDlg, SW_SHOW);
  
Proc:
  BOOL CALLBACK OnetsDlgProc(HWND hDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
{
	switch(uMsg)
	{
		case WM_INITDIALOG:
		{
			SetWindowPos(hDlg, HWND_TOP, 193, 25, 0, 0, SWP_NOSIZE);
			return TRUE;
		}
		break;
	}
	return TRUE;
}
  
..anyone?.... One Must Fall: Battlegrounds

Sponsor:

#2 Shannon Barber   Moderators   -  Reputation: 1390

Like
Likes
Like

Posted 19 June 2001 - 08:07 PM

I''m kinda guessing, but it sounds as thought the child dialog is modal; but I see you call CreateDialogIndirect as though you''re creating a modeless dialog.

Is the child modeless?
Is the treeview on the main dialog or the child?
Is the system menu that doesn''t work on the child or the main?

Magmai Kai Holmlor
- The disgruntled & disillusioned


#3 Clash Rocker   Members   -  Reputation: 130

Like
Likes
Like

Posted 20 June 2001 - 12:26 AM

Its all modeless.
Treeview is on the main dlg. System menu is on the main dialog.
The other drop down menu is on the main dlg too.

My child dlgs are setup as follows:
"Styles"
Style: Child
Border: None
"More Styles"
[X]Visible
[X]Control

I''ve done the very same setup before and it worked fine.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS