|
how to know the parent item of a child tree item.
and how to traverse from last child item to root parent item.
|
|
|
|
|
1- GetParentItem ( HTREEITEM );
2- you'd loop over the items returned by GetParentItem until the item is TVI_ROOT (or something like that)
Watched code never compiles.
|
|
|
|
|
Sakhalean wrote: how to know the parent item of a child tree item.
and how to traverse from last child item to root parent item.
What do you have, i mean where do u struck? do you have HTREEITEM of child?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
Sakhalean wrote: yes i have HTREEITEM
To Find Parent TreeItem:
call GetParentItem(child tree item)
To Find Root TreeItem:
HTREEITEM child = HTREEITEM of child;
HTREEITEM root = NULL;
do
{
root = GetParentItem(child);
child = root
}
while(root != NULL);
root will contain root tree item
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow Never mind - my own stupidity is the source of every "problem" - Mixture
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
|
Have u tried SetForegroundWindow??
|
|
|
|
|
Yes I had tried but that was not working so I was asking here
|
|
|
|
|
Did you only use SetForegroundWindow or combination of SetForegroundWindow and SetWindowPos???
Try This..
Sleep(5000);
::SetForegroundWindow(this->m_hWnd);
::SetWindowPos(this->m_hWnd, HWND_TOPMOST,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
|
|
|
|
|
I had only used SetForegroundWindow. Yup! This combination is also working.
|
|
|
|
|
rahul.kulshreshtha wrote: Yup! This combination is also working.
What else is working?
|
|
|
|
|
Check out my first reply.
It is also working
Sleep(5000);
::BringWindowToTop(this->m_hWnd);
::SetWindowPos(this->m_hWnd, HWND_TOPMOST,0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
::SetWindowPos(this->m_hWnd,HWND_NOTOPMOST,0,0,0,0,SWP_NOMOVE | SWP_NOSIZE);
Third line is to make it NoTopMost otherwise it will be always on Top.
|
|
|
|
|
Hello all,
I have a question, Can we install IIS in client system programmatically? , If yes then i will appreciate some links and answers regarding that.
Regards
Ashish
|
|
|
|
|
Which version of IIS do you intend to install?If it is IIS6 see here.
[EDIT]
In addition this may be useful too.
[/EDIT]
Life is a stage and we are all actors!
|
|
|
|
|
Thanks for your reply, But i intend to install IIS version 5.1..
|
|
|
|
|
I've found that for IIS 5.1 .
Life is a stage and we are all actors!
|
|
|
|
|
To be very frank, I don't see any help code in the link.. How do i do this in VC??
|
|
|
|
|
Does anyone know how to install IIS using Sysocmgr.exe?
|
|
|
|
|
Hey everybody.
Here's a C++ question.
I have 2 classes:
template<typename T>
class A_template
{
public:
... other stuff ...
void operator = (T* other){ _obj = other; }
protected:
T* _x;
};
class B : public A_template<C>
{
... some functions ...
};
Now, the problem is that if I have the following line of code:
C* x = CreateC();
B b;
b = x; // <--- compiler returns that there is no possible conversion, but it does, in A ! what am I doing wrong??
Thanks a lot !!!
|
|
|
|
|
Oh,
and the definition of B is:
class B : public A_template<c>.
|
|
|
|
|
assignment operator works like the constructor when it comes to inheritance. You should read more about this.
Also read about:
<br />
using A<T>::operator =;<br />
which should be placed in the declaration of B
|
|
|
|
|
Thanks
I read about what you said, and I understand why the copy assignment is not being derived,
but I can't find anything about the "using A<t>::operator =;".
Can I tell c++ explicitly that I want to use the operator at the base class?
|
|
|
|
|
just put that line in your B implementation and it should work
|
|
|
|
|
Hi,
I want to create a model-less dialog as a child of CFormView class.
what I did is as follow :
m_pDlg = new CMyDlg(this);
if(! m_pDlg->Create(IDD_DIALOG_DIAGRAM, this))
{
::AfxMessageBox(L"An unknown error occurred while creating the window.");
return;
}
I have created a Dialog with the ID of IDD_DIALOG_DIAGRAMbut in my resource editor And also I override the necessary methods to have model-less dialog But It always fail.
When I trace the dialog creation note that the
BOOL bResult = CreateIndirect(hTemplate, pParentWnd, hInst); returns the error.
What is my problem?
|
|
|
|