|
huutribk2001 wrote: BITMAP.
Is StretchBlt of any use
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
Hello!
How do i call MyFunction in _asm block, for a VC++ code?
my function takes a "char*" value as its parameter.
///////////////////////////////////////////////////////
_asm
{
Main2 :
push eax
lea eax, text
mov eax, [eax]
push eax
Call MyFunction
pop eax
pop eax
text: __asm _emit 'Z' __asm _emit ' ' __asm _emit '0'
}
//////////////////////////////////////////////////////
void MyDecode(char* chCaption) {
AfxMessageBox(chCaption);
};
Zo.Naderi-Iran
|
|
|
|
|
The following fragment seems to work:
void MyFunction(char* chCaption)
{
MessageBox(0, chCaption, "", 0);
}
void main()
{
_asm
{
push eax
lea eax, text
push eax
Call MyFunction
pop eax
pop eax
}
return;
text: __asm _emit 'Z' __asm _emit ' ' __asm _emit 0
}
Your problems was:
- The "
mov eax, [eax] " instruction hase no sence; - The
text string is incorectly ended with '0' instead of 0 ; - No exit function at the program end; I used the
return instruction in this sample.
|
|
|
|
|
Thank you Viorel!
I corrected them.
Zo.Naderi-Iran
|
|
|
|
|
Hi All,
when I get the client rect, I used to pass GetClientRect(rect);
but in many places i have seen that GetClientRect(rect); and GetClientRect(&rect); interchangeably. but the result is same.
Actually what is happening in teh above scenario.
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
SaRath. wrote: when I get the client rect, I used to pass GetClientRect(rect);
but in many places i have seen that GetClientRect(rect); and GetClientRect(&rect); interchangeably. but the result is same.
GetClientRect(rect);
In this scenario we pass object as Value
GetClientRect(&rect);
In this scenario we pass object as Reference
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
A_LaxmanGetClientRect(&rect);
In this scenario we pass object as Reference
false... we pass the object by pointer.
in this case, the prototype of the function is not GetClientRect(RECT&); but GetClientRect(RECT*);
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
When GetClientRect(RECT&); prototype used??
Knock out 't' from can't,
You can if you think you can
|
|
|
|
|
|
The CWnd::GetClientRect function actually requires an argument of type “pointer to RECT ” -- RECT * , or LPRECT .
Nevertheless, this function can be used in more contexts:
RECT rect1;
GetClientRect(&rect1);
<br>
CRect rect2;
GetClientRect(&rect2);
CRect rect3;
GetClientRect(rect3);
The design of CRect class allow you to use it with Windows functions that actually require LPRECT .
-- modified at 6:10 Tuesday 6th June, 2006
|
|
|
|
|
Thanks for the detailed reply.
when I have checked the MFC defintion of CRect, I could find that
the operators are defined as follows
operator LPRECT() throw();
operator LPCRECT() const throw();
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
see GetClientRect() in MSDN
void GetClientRect( LPRECT lpRect ) const;
Actual argument needed is of type LPRECT
If you give GetClientRect(rect) or GetClientRect(&rect)both returns same because CRect has got .operator LPRECT() which automatically get invoked if you pass rect. But i tell u that &rect is more correct.
Rin
|
|
|
|
|
See prev post by Viorel
SaRath.
"Don't Do Different things... Do Things Differently..."
|
|
|
|
|
sory i just saw the same
Rin
|
|
|
|
|
Hi All,
Can anyone tell me how to obtain a crash dump?? I have Visual Studio 6 on my machine.
Thanks and Regards,
Anil
|
|
|
|
|
|
Thanx .... I think this will serve my purpose
|
|
|
|
|
It surely will . And you are always welcome.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
Anil_vvs wrote: Can anyone tell me how to obtain a crash dump?? I have Visual Studio 6 on my machine.
From where do you want to obtain the crash dump ?
suhredayan There is no place like 127.0.0.1
|
|
|
|
|
From the development setup
|
|
|
|
|
Anil_vvs wrote: how to obtain a crash dump??
Just generate a "MEMORY.DMP" this way (MSDN)[^].
Maxwell Chen
|
|
|
|
|
|
I am using an edit box and i want to know the every charecter which is being typed, before showing it is displayed in the edit box.
Can we handle this.
Plz help me.
THANKYOU
KIRAN
|
|
|
|
|
|
what exactly i want is i have written a chat application. As in yahoo mesngr
we type out message and press enter, then automatically the send button is pressed. So i want to implement the same in my code.
Can u help me
KIRAN
|
|
|
|