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

C / C++ / MFC

 
GeneralRe: Conversion from Visual studio 6 to VC 2005 Pin
nahitan1-May-06 3:22
nahitan1-May-06 3:22 
GeneralRe: Conversion from Visual studio 6 to VC 2005 Pin
Hamid_RT1-May-06 4:02
Hamid_RT1-May-06 4:02 
QuestionSending an Array Pin
dSolariuM28-Apr-06 9:38
dSolariuM28-Apr-06 9:38 
AnswerRe: Sending an Array Pin
valikac28-Apr-06 14:48
valikac28-Apr-06 14:48 
AnswerRe: Sending an Array Pin
ThatsAlok28-Apr-06 23:35
ThatsAlok28-Apr-06 23:35 
QuestionMultiple Top-Level Documents Pin
Andre xxxxxxx28-Apr-06 9:19
Andre xxxxxxx28-Apr-06 9:19 
QuestionZ order of window Pin
pince28-Apr-06 8:26
pince28-Apr-06 8:26 
AnswerRe: Z order of window Pin
Steve Echols28-Apr-06 12:16
Steve Echols28-Apr-06 12:16 
I don't think there is a GetWindowZOrder function (that would be nice), but you might be able to use EnumChildWindows to determine it.

You might be able to salvage some of this hacked together code:

BOOL CALLBACK EnumZOrderProc(HWND hwnd, LPARAM lParam);<br />
<br />
class CZOrder<br />
{<br />
public:<br />
	int	m_zorder;<br />
	HWND m_hwndFind;<br />
<br />
	CZOrder() : m_zorder(0), m_hwndFind(NULL) <br />
	{ }<br />
<br />
	int GetWindowZOrder(HWND hwnd)<br />
	{<br />
		m_hwndFind = hwnd;<br />
		m_zorder = -1;<br />
		::EnumChildWindows(::GetDesktopWindow(), EnumZOrderProc, (LPARAM)this);<br />
		return m_zorder;<br />
	}<br />
<br />
};<br />
<br />
BOOL CALLBACK EnumZOrderProc(HWND hwnd, LPARAM lParam)<br />
{<br />
	WINDOWPLACEMENT wp;<br />
	wp.length = sizeof(WINDOWPLACEMENT);<br />
	::GetWindowPlacement(hwnd, &wp);<br />
<br />
	if (wp.showCmd != SW_SHOWMINIMIZED  // ignore minimized windows<br />
		&& ::IsWindowVisible(hwnd)		// ignore hidden windows<br />
		&& ::GetParent(hwnd) == NULL)	// top level windows only<br />
	{<br />
		CZOrder* pZorder = reinterpret_cast<CZOrder*>(lParam);<br />
		pZorder->m_zorder++;			// bump zorder<br />
<br />
		if (hwnd == pZorder->m_hwndFind)<br />
			return FALSE;				// found window -- quit enumerating<br />
	}<br />
	return TRUE;	// keep enumerating<br />
}<br />
<br />
CZOrder zo;<br />
int windowZOrder = zo.GetWindowZOrder(hwnd);<br />
<br />


Good thing it's Friday! Big Grin | :-D


- S
50 cups of coffee and you know it's on!

-- modified at 18:17 Friday 28th April, 2006
QuestionGet primary thread handle from process handle Pin
Federico Milano28-Apr-06 8:21
Federico Milano28-Apr-06 8:21 
AnswerRe: Get primary thread handle from process handle Pin
Hamid_RT28-Apr-06 18:47
Hamid_RT28-Apr-06 18:47 
Questionerror when loading filter in graphedit Pin
yongwpi28-Apr-06 7:29
yongwpi28-Apr-06 7:29 
AnswerRe: error when loading filter in graphedit Pin
Justin Tay28-Apr-06 13:43
Justin Tay28-Apr-06 13:43 
GeneralRe: error when loading filter in graphedit Pin
yongwpi28-Apr-06 16:05
yongwpi28-Apr-06 16:05 
GeneralRe: error when loading filter in graphedit Pin
Justin Tay28-Apr-06 17:47
Justin Tay28-Apr-06 17:47 
GeneralRe: error when loading filter in graphedit Pin
yongwpi28-Apr-06 18:01
yongwpi28-Apr-06 18:01 
GeneralRe: error when loading filter in graphedit Pin
Justin Tay28-Apr-06 18:17
Justin Tay28-Apr-06 18:17 
GeneralRe: error when loading filter in graphedit Pin
yongwpi29-Apr-06 4:45
yongwpi29-Apr-06 4:45 
GeneralRe: error when loading filter in graphedit Pin
Justin Tay29-Apr-06 5:40
Justin Tay29-Apr-06 5:40 
GeneralRe: error when loading filter in graphedit Pin
yongwpi30-Apr-06 11:12
yongwpi30-Apr-06 11:12 
QuestionQuestion about CAxDialogImpl class in VC++ 6.0 Pin
Barry True28-Apr-06 7:16
Barry True28-Apr-06 7:16 
QuestionHandle to Dialog, In Dialog Application Pin
jerry1211a28-Apr-06 6:52
jerry1211a28-Apr-06 6:52 
QuestionRe: Handle to Dialog, In Dialog Application Pin
David Crow28-Apr-06 7:42
David Crow28-Apr-06 7:42 
AnswerRe: Handle to Dialog, In Dialog Application Pin
Hamid_RT28-Apr-06 19:22
Hamid_RT28-Apr-06 19:22 
AnswerRe: Handle to Dialog, In Dialog Application Pin
Steve Echols28-Apr-06 22:42
Steve Echols28-Apr-06 22:42 
Questionhow to convert a CString to unsigned short Pin
joy2128-Apr-06 6:02
joy2128-Apr-06 6:02 

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.