|
found it -> RepositionBars
|
|
|
|
|
simple c++ questions
Hi what is that?!
TCHAR *pos;
pos = _tcsstr(key, _T("\"%1\""));
??
and
dc.FillRect(rectArea.operator LPRECT(),&m_brBckColor);
how is that
and
NewButtonRect -= CSize(ButtonRect.right - point.x + m_nJumpDistance, 0);
what does this mean?
if one can delete this post and answer me in private i think the questions are so simple I,am confused
ty
|
|
|
|
|
Try clicking on the command bit, and pressing f1 - it will search your help fils for them.
Failing that, there's always google.
1/
First google search for _tccstr led me to this sentence:
"Return a pointer to the first occurrence of a search string in a string.".
Read more, and I bet key is a TCHAR string, and you're looking for "%1" in it.
3/
dc.?
FillRect?
Look st athe surrounding code - you'll see what kind of a "thing" dc is. It will be a CDC, or class for a drawing (or is it device?) context. Look at the help for it, and you'll find a FillRect member function. From there, you can find it out for yourself.
3/
Whatever NewButtonRect is (I bet it's the size that a new button will be...) it's just been shrunk by an amount defined in that equation. Put a breakpoint earlier in the code to see the variables as the get inisitialised and changed.
This is all early stuff - and it takes time to sink in. The best way to learn is to follow the code through, and to take notes.
I wish you luck on your journey!
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Thanks for reply
pos = _tcsstr(key, _T("\"%1\""));
here what is pos value? '
In dc.FillRect(rectArea.operator LPRECT(),&m_brBckColor);
what is rectArea.operator LPRECT() what does this do?
and here
NewButtonRect -= CSize(ButtonRect.right - point.x + m_nJumpDistance, 0); what
will be the new values of NewButtonRect top left buttom right
Thanks
|
|
|
|
|
Mohammadj wrote: here what is pos value?
Did you read the documentation for that command?
Mohammadj wrote: what is rectArea.operator LPRECT() what does this do?
That is oddly written. If rectArea is a CRect, they could have written &rectArea instead.
Mohammadj wrote: what will be the new values of NewButtonRect top left buttom right
As I said, use the debugger to see the other values, without knowing them, I can;t answer. And if you can tell me, you don't need me to answer.
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|
|
Is it a quiz? What is the prize for the winner?
Mohammadj wrote: pos = _tcsstr(key, _T("\"%1\""));
here what is pos value? '
It strongly depends on key value.
Mohammadj wrote: In dc.FillRect(rectArea.operator LPRECT(),&m_brBckColor);
what is rectArea.operator LPRECT() what does this do?
It is a cast operator. It casts.
Mohammadj wrote: NewButtonRect -= CSize(ButtonRect.right - point.x + m_nJumpDistance, 0); what
will be the new values of NewButtonRect top left buttom right
Again, it strongly depends on the values of the operator arguments.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
hi
Thanks for replies
CRect rect1 ;
CRect rect2(1,2,11,13) ;
rect1 = rect2 -CSize( 3 ,5);
what is the new value of rect1 ?
Thanks
|
|
|
|
|
My guess is CRect(-2, -3, 9, 8).
BTW you have a debugger, haven't you?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I have 2 rect
CRect rect1( 4,5, 60,70);
CRect rect2(10,11, 90,100);
Bool IsIntersected ;// to check whether the rectangles are intersected ?!
how to use IntersectRect to see wheather the rectangle are intersected
I saw from msdn it uses casting? !~!
|
|
|
|
|
From documentation http://msdn.microsoft.com/en-us/library/262w7389(VS.80).aspx:
CRect rect1( 4,5, 60,70);
CRect rect2(10,11, 90,100);
CRect rectInter.IntersectRect(rect1, rect2);
bool areIntersected = rectInter.IsRectNull()==FALSE;
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
That's viable (just make sure to declare the flag as BOOL , instead of bool ).
BTW: why posting question here, if you've the solutions?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi There,
I need to download web pages from a website but don't want the images on that page.
Please let me know how we can download only contents of web page without any image.
Thanks!
|
|
|
|
|
Did you see IHTMLElement?
Of one Essence is the human race
thus has Creation put the base
One Limb impacted is sufficient
For all Others to feel the Mace
(Saadi )
|
|
|
|
|
Hi,
I'm a newbie in VC++.
I have to implement this into VC++, so please suggest.
|
|
|
|
|
Open a particular Directory
void CMultipleEOFDlg::OnBrowse()
{
CFileDialog dlg(TRUE);
CString sPath = "c:\\program files\\my folder\\1.c";
int nPos = sPath.Find("\\");
nPos = sPath.Find("\\",nPos + 1);
sPath = sPath.Left(nPos + 1);
dlg.m_ofn.lpstrInitialDir=sPath;
dlg.DoModal();
}
================================================================================
void CMultipleEOFDlg::OnBrowse()
{
char strFilter[] = { "Text Files (*.txt)|*.bcr|All Files (*.*)|*.*||" };
CFileDialog FileDlg(TRUE, "*.txt", NULL, 0, strFilter);
if( FileDlg.DoModal() == IDOK )
{
m_strFilePath = FileDlg.GetPathName();
}
AfxMessageBox(m_strFilePath);
UpdateData(FALSE);
}
|
|
|
|
|
Hi, just like the topic, thanks.
|
|
|
|
|
Nope, need a little more idea of what you mean. The terms you use are broad enough that you could mean one of several things.
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
I want to open a .html file via ShellExecute, but it has
warning. So I want to try use memory map file instead of
the file on disk, thanks your reply.
|
|
|
|
|
Yeahhh - can't see that making any difference. What was the warning you got?
[edit]Also - i know of no way to tell an application (using ShellExecute, CreateProcess or whatever) to open a file using a memory mapped file rather than any other mechanism - the way it opens files is a design decision of hte application and likely hard-coded into it.[/edit]
Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p
|
|
|
|
|
|
ShellExecute opens shell items - objects that the shell is aware of. If you can make your memory mapped file visible to the shell (via a shell extension) you could make ShellExecute open it - but trust me, this is not something you want to do
|
|
|
|
|
After searching around i still can't get the right way.
Firstly, since there are lots of web tabs, how can I determine the exact one's HANDLE?
Secondly, there are a lot of code involving COM and BHO to solve this problem, common on, I just need the current webpage's source code, I don't need and don't want to learn the architect of COM and BHO before I can solve this problem!
Can somebody give me some hints, source code provided will be more appreciated!
BTW, somebody told me I can get the url and socket-send-receive the source code. But that didn't work because the URl in the address toobar of IE sometimes doesn't reflect the exact page so the safer way is to try to find the source code in local disk or somewhere else in my own computer.
Thanks!!
Jack
|
|
|
|
|
A BHO will be the easiest to do this.
Visual Studio ATL COM project wizard does give you the option to create a BHO.
An instance of the BHO is loaded for each tab of the browser.
So you needn't worry about identifying the correct tab.
A BHO must implement the IObjectWithSite interface.
When the BHO is loaded the IObjectWithSite::SetSite function is called and the web browser control interface pointer is passed in.
You can retrieve the web page source using IHTMLElement::get_outerHTML .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
cs60089 wrote: I don't need and don't want to learn the architect of COM and BHO before I can solve this problem!
Let me rephrase that for you:
"I have a tin of pineapple chunks. I don't nned and don't want to learn how to use a tinopener before I can solve this problem!"
Iain.
Codeproject MVP for C++, I can't believe it's for my lounge posts...
|
|
|
|