need a handle to a CStatic object
-
:confused:I have a pointer to a CStatic object but i need a handle to it cos i need to reposition it on the screen with the help of SetWindowPos function. How can i obtain a handle to the object if I have pointer and is there any other way to move/reposition the CStatic object. Plzz Help !!! Anshul
-
:confused:I have a pointer to a CStatic object but i need a handle to it cos i need to reposition it on the screen with the help of SetWindowPos function. How can i obtain a handle to the object if I have pointer and is there any other way to move/reposition the CStatic object. Plzz Help !!! Anshul
-
:confused:I have a pointer to a CStatic object but i need a handle to it cos i need to reposition it on the screen with the help of SetWindowPos function. How can i obtain a handle to the object if I have pointer and is there any other way to move/reposition the CStatic object. Plzz Help !!! Anshul
Err... You don't need its handle. Just call the MoveWindow function directly:
pStaticCtrl->MoveWindow(...);
Cédric Moonen Software developer
Charting control -
:confused:I have a pointer to a CStatic object but i need a handle to it cos i need to reposition it on the screen with the help of SetWindowPos function. How can i obtain a handle to the object if I have pointer and is there any other way to move/reposition the CStatic object. Plzz Help !!! Anshul
HWND CStatic::GetSafeHwnd() const;
Maxwell Chen
-
:confused:I have a pointer to a CStatic object but i need a handle to it cos i need to reposition it on the screen with the help of SetWindowPos function. How can i obtain a handle to the object if I have pointer and is there any other way to move/reposition the CStatic object. Plzz Help !!! Anshul
-
Hey....do you want to know that how to give the first param of SetWindowPos( ) u have an object to the CStatic like
CStatic objMyStatic;
then get handle like thisobjMyStatic.m_hWnd;
:)Dream bigger... Do bigger...Expect smaller aji
see i will tell u, there are many CStatic objects on the client window, right. Now what happens is that the user clicks on one of them and i get the address of that object in the 'this' pointer. Now i want to move this object according to the mouse drag on the screen, with the help of SetWindow Pos func and Invalidate(TRUE); I have the address of the CStatic object which the user is trying to drag.How do i get the handle of this object so that i can move it. is there any way to find out the handle with the help of this pointer.
-
see i will tell u, there are many CStatic objects on the client window, right. Now what happens is that the user clicks on one of them and i get the address of that object in the 'this' pointer. Now i want to move this object according to the mouse drag on the screen, with the help of SetWindow Pos func and Invalidate(TRUE); I have the address of the CStatic object which the user is trying to drag.How do i get the handle of this object so that i can move it. is there any way to find out the handle with the help of this pointer.
if you have a derived CStatic what do you need?
_**
**_
WhiteSky
-
Err... You don't need its handle. Just call the MoveWindow function directly:
pStaticCtrl->MoveWindow(...);
Cédric Moonen Software developer
Charting controlsee i will tell u, there are many CStatic objects on the client window, right. Now what happens is that the user clicks on one of them and i get the address of that object in the 'this' pointer. Now i want to move this object according to the mouse drag on the screen, with the help of SetWindow Pos func and Invalidate(TRUE); I have the address of the CStatic object which the user is trying to drag.How do i get the handle of this object so that i can move it. is there any way to find out the handle with the help of this pointer. otherwise tell me how i can move the CStatic window along with the mouse.
-
if you have a derived CStatic what do you need?
_**
**_
WhiteSky
i need to move the CStatic object which is again a window along with mouse drag. The moment user clicks in the window i get the pointer to it in the this pointer, but SetWindowPos func takes the handle of the window as tha paramater so now what to do ????
-
i need to move the CStatic object which is again a window along with mouse drag. The moment user clicks in the window i get the pointer to it in the this pointer, but SetWindowPos func takes the handle of the window as tha paramater so now what to do ????