|
What do I have to do to "link" the scroll bar for one edit box to another so that when I move the slider in box A up and down, the slider in box B follows?????
Thank you in advance
PieRRe
|
|
|
|
|
You will have to do this manually i.e. intercept the message for first scroll bar and then move second scroll bar accordingly. Similarly do this for second scroll bar.
-Saurabh
|
|
|
|
|
what I need is know the rightmost part of the IP address for example if it's 192.133.14.17
I want to get the 17.
modified on Thursday, April 24, 2008 11:26 AM
|
|
|
|
|
The "17" is on the right side of the address, not the left part, that's probably why you cannot
get it.
|
|
|
|
|
Sorry for the confusion. Too much hours, I guess...
|
|
|
|
|
And what is your difficulty about?
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
|
|
|
|
|
finding the function that returns this data.
|
|
|
|
|
Have you the IP?
Is it storead as a string or whatever?
i.e. be specific.
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
|
|
|
|
|
Sorry for all the confusion I've scattered ...
I just need to know in my Win32 application what is my IP address.
|
|
|
|
|
One way would be:
gethostname();
struct hostent *host = gethostbyname();
struct in_addr *ptr = (struct in_addr *) host->h_addr_list[0]
int octet = ptr->S_un.S_un_b.s_b4;
"Love people and use things, not love things and use people." - Unknown
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Thank a lot. Don't have time to 'stitch' it now but first thing after the weekend
|
|
|
|
|
I have an embedded web browser control (IWebBrowser2) and I'm having problems getting it to process key presses, specifically to switch "focus" from one html element (like a text box) to another when you hit the TAB key.
I looked this up on Google and came across a number of links, apparently it's a known problem. But I have yet to get the solution to work for me.
The "apparent" solution is to check the MSG that you pulled off the queue with GetMessage and then either:
1) dispatch it with IsDialogMessage, and don't process with the normal TranslateMessage/DispatchMessage calls if IsDialogMessage returns true.
or
2) get the web browser control interface, QI for IOleInPlaceActiveObject, and if you get a valid instance back call the IOleInPlaceActiveObject::TranslateAccelerator
Supposedly this will then cause the tabs to get processed "correctly" and voila, everything is hunky dory.
I can't get this to work and I wonder if anyone here has gotten this to work and if so how?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Heh, turns out it was my fancy-schmancy customizations!
If you do the hosting (something like this: http://www.codeproject.com/KB/COM/cwebpage.aspx[^] ) and add support for a custom IDocHostUIHandler implementation you MUST return anything other than S_OK from the your TranslateAccelerator function implementation, otherwise things don't work right. Which is mentioned in the docs for this interface, it just didn't register with me. This of course is in ADDITION to doing something like the above to make sure the TranslateAccelerator gets properly called in the first place.
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
Save an Orange - Use the VCF!
VCF Blog
|
|
|
|
|
Hi all!
I would like to serialize/deserialize a std::vector of objects of a class into some buffer of a stream or of some other buffer. Can you address me about how to do this with the highest performance possible?
If I had an ARRAY of these instances..I would switch to a std::vector using this code:
CMyClass d[20];
// fill the array!
std::vector<CMyClass> v(d,d+sizof(d)/(d[0]));
What in case I use deserialization from a stream?
Is there a way to let the std::vector copy or use itself access the buffer
of a stream?
I would like to avoid the istream::read line below to go faster..do you know some way or address some nice super STL feature?
CMyClass d[20]; // buffer is created continuosly
istream::read( d, 20 ); // copy data from the buffer ( IS AVOIDABLE? )
std::vector<CMyClass> v( d,d+sizof(d)/(d[0])); // get the std::vector
Kind Regards
ManuStone
|
|
|
|
|
I am working presently in one project in my company, where I have to create a window using MFC in which I should be able to control each and every viewport independently in that output window (it is just like tiling all the sub-windows, but it shouldn’t contain the title name on every sub-window). Also I should be able to divide that window into as many viewports or sub-windows as I want and at any time. Here, splitter windows concept doesn’t work, because after I get the output window, I cannot change the number of view ports I want and also I cannot have control over the different panes of that window. So, how can I approach this problem. Can I get this with simple MFC? or I should go with any advanced concepts of Visual C++. I am working on Microsoft Visual Studio 2005. So, kindly help me as soon as possible.
K.V. Rama Krishna
|
|
|
|
|
Venkata Rama Krishna K wrote: Can I get this with simple MFC? or I should go with any advanced concepts of Visual C++
This isn't really a framework or language issue. It's just basic Windows.
You can create all the tile windows (as children of a window) and arrange
them any way you want to. Use the appropriate styles on the tile windows
so there's no title bar on them.
The basics of the windows is relatively simple with MFC....you're going to need
to actually write some code to do the layout
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
<br />
extern vector<int> v;
</int>
I want to get the number list included 5, 6
|
|
|
|
|
Can you rephrase your question?
Saurabh
|
|
|
|
|
Regards,
Vijay.
|
|
|
|
|
This should work
extern vector vData;
std::map<int, int> mapCount;
for(std::vector<int>::const_iterator it = vData.begin(); it != vData.end(); it++)
{
mapCount[*it]++;
}
std::vector<int> vFound;
for(std::map<int, int>::const_iterator itmap = mapCount.begin(); itmap != mapCount.end(); itmap++)
{
if(itmap->second >= 2 &&
itmap->second <= 5)
{
vFound.push_back(itmap->first);
}
}
codito ergo sum
modified on Thursday, April 24, 2008 1:24 PM
|
|
|
|
|
Wow, you must be genius. How did you figured that one
-Saurabh
|
|
|
|
|
Ah, 'Young One',
This is the merit of years of studying in the field of deciphering
the cryptic description of a new task that my boss give to me.
codito ergo sum
|
|
|
|
|
Thank you!
your code is I need.
|
|
|
|
|
I have retrieved data from an ASP page in XML format and parse it using MSXML. Now if i want do a reverse step i.e. if i want to send data back to ASP page then how would i accomplish it.
Thanks & Regards,
Hemang
|
|
|
|
|
What does the following code snippet (particularly THIS_FILE[]=__FILE__)signify ?
#ifdef _DEBUG
#undef THIS_FILE
static char THIS_FILE[]=__FILE__;
#define new DEBUG_NEW
#endif
Note : The above code could be found in .cpp files.
|
|
|
|