|
Handle WM_ENTERSIZEMOVE and WM_EXITSIZEMOVE to know when a resize or move operations begins and ends. When you get WM_ENTERSIZEMOVE , save the window's RECT . When you get WM_EXITSIZEMOVE , get the new RECT and if it's different, move your controls around.
--Mike--
Personal stuff:: Ericahist | Homepage
Shareware stuff:: 1ClickPicGrabber | RightClick-Encrypt
CP stuff:: CP SearchBar v2.0.2 | C++ Forum FAQ
----
"die"
ahhhh!
"diet"
AAHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHHH!!!!!!!!!
|
|
|
|
|
thanku very much Ravi and Michel.
i tried wht michel was telling... it's working fine.
thanks again...
Adi
|
|
|
|
|
Hi all,
Could anyone show me an implementation of ICopyHook Interface and CopyCallBack Function.?
Where can i find free source code or project for this purpose.?
Thanks a lot.
|
|
|
|
|
how can I hide my VC++ application from task list
is there any API?
any example will do!
|
|
|
|
|
are you lokin for ShowWindow(hWnd,SW_HIDE);
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Suhredayan P wrote:
ShowWindow(hWnd,SW_HIDE);
it will hide the window too.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
I want that my running exe should not be visible in the task manager list, is ther a way
|
|
|
|
|
there is no harm being in the task managers list unless you are writing a crook program.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Yes I do want to write a spy application, which the users should not aware that it is running when pressed CTRL+ALT+DEL to see the list of running programs, where my running application should be invisible
|
|
|
|
|
instead of hinding your application from the task manager (something i doubt you can do) you can give some name that looks like some windows service
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
Task Manager's Applications tab does not actually show applications—it shows the captions of visible, top-level windows .The Task Manager builds this list by walking through all of the top-level windows in the system (using something like EnumWindows), and adds to the list the windows that have the WS_VISIBLE style bit turned on.
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
I think you are confused with Spy++
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
that was how Jeffrey Richter told me abt taskmgr.exe.
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Set the WS_EX_TOOLWINDOW extended window style.
Edward.
|
|
|
|
|
hain i want ot extend you more,
you have remove CS_titlebar property to hide completly
ok
Alok Gupta
visit me at http://alok.stormpages.com
|
|
|
|
|
hi
is there a function in windows API that can return actual position of
child window (control) in say for example formview?
Something opposite to SetWindowPos(..)
For now i must calculate it using GetWindowRect (of formview) and
GetWindowRect (of control). But it is lot of work when i have lot of
controls in form and i want to reposition them in OnSize(...)
thx
|
|
|
|
|
Have you tried GetClientRect() ?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
GetClientRect returns just coordinates of client area of window, so how can it help me?
I'm trying to calculate left/top corner of one window that is inside other bigger in 'biggers's' coordinates.
But it's not critical for me. I just thought that there is some magic function that all have knowledge of and i'm not.
I will do it my way then.
thx for response
Chris
|
|
|
|
|
Get the window coordinate of the control using getwindowrect(...)
then map it to "bigger" client window using screentoclient(...)
you need to build the logic over that.
hope it helps.
MSN Messenger.
prakashnadar@msn.com
"If history isn't good, just burn it." - Sidhuism.
|
|
|
|
|
CMultiDocTemplate* pDocTemplate;
pDocTemplate = new CMultiDocTemplate(
IDR_EX20DTYPE,
RUNTIME_CLASS(CPoemDoc),
RUNTIME_CLASS(CChildFrame), // custom MDI child frame
RUNTIME_CLASS(CStringView));
AddDocTemplate(pDocTemplate);
m_pTemplateHex = new CMultiDocTemplate(
IDR_EX20DTYPE,
RUNTIME_CLASS(CPoemDoc),
RUNTIME_CLASS(CChildFrame),
RUNTIME_CLASS(CHexView));
when i in the end add "AddDocTemplate(m_pTemplateHex)",although run,but just stop run suddenly pop a warning messagebox,why?i see from msdn ,can add two more,why not in my program?
|
|
|
|
|
Try deriving new doc,
make it dynamically creatable
and use that to register second document template.
greatest thing is to do wot others think you cant suhredayan@omniquad.com
messenger :suhredayan@hotmail.com
|
|
|
|
|
Dear all,
I am having a problem in understanding operator overloading in C++.
Below is the code I am reading and its explanation.
There are some points that I do not really understand.
[CODE]
class Ratio
{
public:
Ratio(int =0, int =1); //default constructor
Ration(const Ratio&); //copy constructor
Ration& operator=(const Ratio&); //assignment operator
private:
int num, den;
};
Ratio& Ratio::operator=(const Ratio& r)
{
num = r.num;
den = r.den;
return *this;
}
[/CODE]
In the book it is written:
[QUOTE]
The assignment operator is a function that should return the value it assigns.(This is okay)
The assignment operator should return a reference to the same type as the object being assigned.
The return type is a reference to an object of the same class. ( I would say okay for both statements)
But then this means that the function should return the object that is being assigned in order for the assignment chain to work. So when the assignment operator is being overloaded as a class member function, it should return the object that owns the call. Since there is no other name available for this owner object, C++ defines a special pointer, named this pointer, which points to the owner object.
[/QUOTE]
I do not really ubderstand the rest of the statements about the object that owns the call.
Also I do not understand the implementation code of the operator= function.
Why do we use the r object to access the member data and then assign them to the same member data?
I do not understand the logic behind that piece of code.
Regards,
grscot
|
|
|
|
|
Ratio r1, r2;
r1 = r2;
is equal to:
r1.operator=(r2);
I guess what the author means is that r1 "owns" the .operator=()-call. But how do you return the r1-object? This is where you need the this-pointer, which points to r1. "this" is defined as "a pointer that points to the object for which the member function is called".
I hope that helps, just ask if I didn't explain it good enough.
|
|
|
|
|
in fact, the this pointer is needed because we can write such code :
Ratio r1, r2, r3;
<font style="color:green;">
r1 = r2 = r3 = Ratio();
to do such cascading calls, the following operator=() must have a state of the precedent object...
Moreover, we need the r object because the reference anc the call owner are not necessary the sam, and as the member datas are private , you cannot acces them directly. however, a constructor have got permissions that other member function have, so it can read the data from r.den (for example) when another can't do so.
TOXCCT >>> GEII power
|
|
|
|
|
class Ratio
{
public:
Ratio(int numerator=0, int denominator=1);
Ratio(const Ratio&);
Ratio& operator=(const Ratio&);
private:
int num, den;
};
Ratio& Ratio::operator=(const Ratio& r)
{
num = r.num;
den = r.den;
return *this;
} When you refer to data members of a class (num and den in your example) within a member function of the class, it is done implicitly through a this pointer. The assignment operator member function could have been written as:
Ratio& Ratio::operator=(const Ratio& r)
{
this->num = r.num;
this->den = r.den;
return *this;
} Suppose you had the following example:
Ratio r1(1,2);
Ratio r2(3,4);
r2 = r1; After the assignment, you would expect r2 to contain 3/4. The compiler implements the call to the assignment operator as if you had written:
r2.operator=(r1); In this case, the assignment code that executes is:
(&r2)->num = r1.num;
(&r2)->den = r1.den; The this pointer contains the address of variable r2 , and the argument is a reference to variable r1 .
Returning a reference to this using 'return *this; ' makes assignment chaining work as follows. Suppose our example is this:
Ratio r1(1,2), r2(3,4), r3(5,6);
r3 = r2 = r1; After the assignment statement, you expect all three variables to have the same value of 1/2. The compiler implements this statement as if it had been written:
r3.operator=(r2.operator=(r1)); The r3.operator= function is called with the return value of the r2.operator= call, which is a reference to r2 .
Software Zen: delete this;
|
|
|
|