|
Thank you for the excellent reply!
With so many choices in frameworks, languages, SDKs, etc., I'm constantly having to make decisions
on which way to go based on performance, ease of use, extensibility, longevity, etc. and it's
nice to add others' real-life experience and opinion to the "equation".
Had you answered "Because I heard it's slow" I would have screamed.
Thanks again,
Mark
|
|
|
|
|
my code:
CComQIPtr<IHTMLDOMNode> pRootNode(lpParentDisp);
CComPtr<IDispatch> spChildren;
if(FAILED(pRootNode->get_childNodes(&spChildren)))return;
CComQIPtr<IHTMLDOMChildrenCollection> pChildColl(spChildren);
long lCount = 0;
pChildColl->get_length(&lCount);
for (long l = 0;l<lCount;l++)
{
CComPtr<IDispatch> spChild;
pChildColl->item(l,&spChild);
CComQIPtr<IHTMLDOMNode> pChild(spChild);
CComQIPtr<IHTMLElement> pElement(pChild); // I don't obtain the point
}
please somebody help me ! thanks........
-- modified at 22:17 Thursday 7th December, 2006
I'm a good man!
-- modified at 22:17 Thursday 7th December, 2006
|
|
|
|
|
guti_milan wrote: CComQIPtr<ihtmldomnode> pChild(spChild);
CComQIPtr<ihtmlelement> pElement(pChild); // I don't obtain the point
SEE IHTMLDOMNode::childNodes
"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
|
|
|
|
|
thank you!
I'm a good man!
|
|
|
|
|
guti_milan wrote:
I'm a good man!
I am BAD.... [ ]
<div class='ForumSig'>"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 </div>
|
|
|
|
|
in MS Paint (or Paint-Brush), when we draw a line, a sample line is drawn befor actual drawing hapends, which tells user where the line is and its size.
the sample line moves peaceful with mouse's moving.
Q: how to draw the sample line? is it drawn on bitmap directly or on another interface? any special tech used?
thx
|
|
|
|
|
includeh10 wrote: how to draw the sample line? is it drawn on bitmap directly or on another interface? any special tech used?
RubberBand Lines[^].
|
|
|
|
|
It's drawn direct to the DC in the WM_PAINT event.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
im making a simple wav audio player. i need a volume control (i.e. slider) which is independent from the windows main vol ctrl - that is, modifying the volume in the audio player should not affect the windows volume settings. i am using playsound(). please point me in the right direction. thanks.
|
|
|
|
|
Controlling volume by process is only available in Vista.
Anyone who thinks he has a better idea of what's good for people than people do is a swine.
- P.J. O'Rourke
|
|
|
|
|
Hi,
Can someone please tell me how to enable the DROP DOWN list while writing code?
For example:
m_open.drop down list so that I can select what I want
Thanks
C++Prog
|
|
|
|
|
Do you mean drop the list down programatically?
m_open.ShowDropDown( TRUE );
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
no...not programatically.....but its default. Like when I type m_open.
After "." it should open me a drop down list and we can select anything. For example "IsWindowEnabled". And then I won't have to type it, I can select and then press ENTER.
I hope I explained it now.
Thanks
C++Prog
|
|
|
|
|
Ah, you mean Intellisense. It's touch and go for me on VC6 - sometimes I get it, sometimes I don't. I have no idea what breaks it.
- S
50 cups of coffee and you know it's on!
|
|
|
|
|
O okay....but thanks anyways for telling me what is it called..Smile.
Intellisense..now will remember it.
Thanks
C++Prog
|
|
|
|
|
First make sure that the variable's type is known (as seen by the compiler) at the point
you are typing. If the variable isn't already defined then intellisense won't know what to put
in the list.
If that doesn't work then possibly the intellisense database is corrupt (that's been happening
for many VS versions ). To rebuild the intellisense database:
1) Exit VS or at least close the project/solution.
2) Find the <solutionname>.ncb file in your solution/project folder.
3) Rename it to something like <solutionname>_bak.ncb if you want to be safe
4) If you didn't rename it then delete it.
5) Open the project/solution in VS and a new .ncb file will be built
|
|
|
|
|
How would I make sure that the variable type is known at the point of typing?
I rebuilded the .ncb file but that doesn't work.
Thanks for your effort.
C++Prog
|
|
|
|
|
celllllllll wrote: How would I make sure that the variable type is known at the point of typing?
Just like the compiler sees it - startin at the top, through all include files and their included
files.
If I just start typing:
myvariable.
Intellisense knows nothing.
If I type:
CWnd myvariable;
myvariable.
Intellisense gives me the list of CWnd members, assuming somewhere above these lines I have
included the header file declaring the CWnd class.
p.s.
I still kind of chuckle every time I type the word "Intellisense", considering it is the #1 problem
I've had over the years with VS
*edit* One other thing - Intellisense has always started working again at some point for me
|
|
|
|
|
Ah shoot - I said "one other thing" - I lied.
Also, if there's a coding error above the line you're typing and intellisense can't parse through
the error then it will stop working as well. So, sometimes compiling (if the error isn't obvious)
will show you where it's getting hung up.
Mark
|
|
|
|
|
celllllllll wrote: How would I make sure that the variable type is known at the point of typing?
It will also fail to work if you are in a method that has not yet been added to the class' .h file.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Let's say I have a generic interface for DB access. If I use ADO to implement this interface, can this wrapper also be said to support ODBC on Windows? Or do I need to write another implementation for ODBC using the SQLXXX Win32/ODBC API functions?
|
|
|
|
|
I don't see how. ODBC is a set of functions split on two interfaces (interface in the general sense, not the COM way): one for the database client and one for the database provider. Unless there are some magic ADO->ODBC adapters (I know of none - but on the other hand I do not claim that I know everything ), I don't see how ADO could ever provide any data for ODBC clients.
--
In Hypno-Vision
|
|
|
|
|
Jim Crafton wrote: If I use ADO to implement this interface, can this wrapper also be said to support ODBC on Windows?
Absolutly, ADO can connect to an amazing number of data sources. The best place to go to find out how to connect to different datasources is http://www.connectionstrings.com/[^]. Biggest chanlenge is supporting all of the various SQL differences out there.
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
Hi,
I have a VC++/MFC application.
I decided to move the UI to VB.NET to improve it.
I created a VB project with new interface and moved the C++ core into a MFC dll project.
When I run the application I got 'Stack owerflow' inside the MFC code.
For code details:
The C++ code does image processing using some recursive functionality, that is the point where the stack sucks up.
It happens when I passing over 4400 iterrations (the maximum is about 12000).
The recursive function looks like this
<br />
void CBitmapScan::CheckAround(CRect* pBound, int nX, int nY)<br />
{<br />
if(oMemDC.GetPixel(nX, nY) == RGB(0x00, 0x00, 0x00))<br />
{<br />
oMemDC.SetPixel(nX, nY, RGB(0xff, 0xff, 0xff));<br />
<br />
if(pBound->left > nX) pBound->left = nX;<br />
if(pBound->right < nX) pBound->right = nX;<br />
if(pBound->top > nY) pBound->top = nY;<br />
if(pBound->bottom < nY) pBound->bottom = nY;<br />
<br />
CheckAround(pBound, nX + 1, nY);<br />
CheckAround(pBound, nX - 1, nY);<br />
CheckAround(pBound, nX, nY + 1);<br />
CheckAround(pBound, nX, nY - 1);<br />
}<br />
}<br />
Why this happening?!
Thanks in advance
Peter
|
|
|
|
|
Your recursive function does not seem to have any terminating condition, so your recursion is infinite.
you might want to look at your logic here:
CheckAround(pBound, nX + 1, nY);
CheckAround(pBound, nX - 1, nY);
The function will keep bouncing back and forth between those two pixels under some conditions.
|
|
|
|