|
Hi, everyone..hope this is the right forum.. could anyone hint me a good, beginner book about C++.Net? I've got a book on C++, but I need to use the IDE, its GUI facilities and so on.
Thanks a lot.
Erminio.
|
|
|
|
|
Tom Archer has written a book on managed C++, that could be what you're after. I don't know, I don't use MC++ and I learned how the IDE works by working through C# books. I did do some MFC last night in VC7, and I highly recommend NOT doing that. It's much easier in VC6, where you have the class wizard, etc.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Hi,
I added a button as a client control of a CListbox.
void CMyListBox::PreSubclassWindow()
{
CListBox::PreSubclassWindow();
m_pButton.Create(":o)",WS_CHILD | WS_VISIBLE,
CRect(0,0,20,20),(CWnd *) this, 1);
}
Unfortunately, when I scroll in the listbox (e.g pressing scrollbar) the client control will be scrolled too. How can I avoid this behaviour, can I override something? My button should be fixed in the upper corner.
Thanks for help.
|
|
|
|
|
You probably need to catch the WM_HSCROLL and WM_VSCROLL messages. There you would get the scroll position and call MoveWindow( ) for the button.
Wenn ist das Nunstück git und Slotermeyer? Ja! Beierhund das oder die Flipperwaldt gersput!
|
|
|
|
|
You mean, after the scrolling and moving the client control, I repositioned it again with MoveWindow?
Okay, I understand. So there is no possibility to intercept the movement of the button with a windows style or somthing? I have to catch the message and redo the unwanted movement, right?
Thanks.
|
|
|
|
|
I'm working on a new version of a BHO and I'm having trouble deciding on a sort of caching data structre and algorithm and was hoping someone had some suggestions.
Basically, this BHO can operate on a URL at any level, which is definable by the user. So, the user could choose to set flags (using a UI, of course) for http://www.domain.com/dir/subdir/page.html, http://www.domain.com/dir/subdir/, http://www.domain.com/dir/, http://www.domain.com/, or even on the entire domain.com (but I'm just concentrating on the fully-qualified URLs for now). Basically, I would need an algorithm to start with the full path and recurse backward till it finds a key that has flags set.
One thing I considered was to have a hashtable that uses the domain (domain.com) as the key and the value is a sorted array in descending order, such that I can enumerate the URLs and search for the first match (which should be the desired scope in this implementation).
Does anyone have any better ideas about how to accomplish this? I want it to be as fast as possible since speed in this project is critical. TIA
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|
You could use an STL map, or other type of container that may fit. I would use the UrlCompare function to find any matches.
|
|
|
|
|
I want to create effects on the image such as a border, drop shadow, etc does anybody has idea about how to do this
please help me if u have any sample piece of code
right now i am trying with Kodak Image Edit activex Control but dont have how to use in VC++..does anybody have idea how to use this?
thanking in advance
bye
chan
|
|
|
|
|
Hi,
I have been working on a suite of applications,
All of these applications communicate with an interface application via tcp/ip which then talks to a serial interface device.
I need the main applications to be separatly installable using MSI, in separate msi files, and each msi file needs to be able to install the interface tool, however I do not want to have multiple copies of the interface tool installed if multiple applications are installed.
Is it suitable to create a merge module to install the interface application, and then use that merge module in each of the main application installers? will this ensure only one copy of the interface is installed, and that the latest version is installed (if a newer version is built into the installer of another application).
Thanks...
Blade[DMS]
|
|
|
|
|
|
Perhaps the Zip Library with
http://www.icsharpcode.net/ would give you some hints to start with. However as the domain name goes by, it is in C#.
Deepak
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Is that zlib ? zlib is a really well known library for zipping and unzipping, I'm sure google will tell you more.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
Hi Nish,
I got ZipArchive compiled under VC7. If you want I can send you the source.
Gero
|
|
|
|
|
I got ZLIB to work just fine. It just took about an hour to get which files I needed in the project.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
|
I'll second that (your article helped ma lately).
And one may just as well get the real horse[^], as it's the original source code for zlib.
|
|
|
|
|
Does anyone know how can I obtain name or IP address of SMTP server.
My problem:
I'd like to make simple SMTP server.
I'll recive something like this:
...
S: MAIL FROM: Smith@myserver.com
R: 250 OK
S: RCPT TO: Jones@codeproject.com
...
...
And !!!
How can I obtain information that email for "Jones@codeproject.com"
should be send to -for example to "relay.psi.ca",
because "codeproject.com" is not SMTP server
I dont know..
another example: somebody@yahoo.com
Where is SMTP for this email? (for yahoo mail users)
Thank you
viliam
|
|
|
|
|
Hi viliam,
Basically, what you need is to contact the MX Server for the domain. From the command prompt you can try and MX Server for a domain from nslookup utility like this:
D:/nslookup
>codeproject.com
Server: my.dns.server.com
Address: 192.168.10.24
Name: codeproject.com
Address: 207.219.70.31
>set type=MX
Server: my.dns.server.com
Address: 192.168.10.24
codeproject.com MX preference = 1000, mail exchanger = mail.codeproject.com
mail.codeproject.com internet address = 207.219.70.3
Those words that come after > are typed by us and server responds with the message from the next line till the next > which is the nslookup utility prompt.
Reply me, if you want DNS Class SourceCode, which I would zip and send you.
Deepak Kumar Vasudevan
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
Thank you,
It's seems what I'm looking for.
It would be nice I you have some source code to show me
how get it programable.
Viliam (frga@email.cz)
viliam
|
|
|
|
|
|
Hi viliam,
Perhaps the following URL should throw some light on your doubts:
http://www.csharphelp.com/archives/archive43.html
(Though the article is again in C#, the concept should in fact be shared. Is'nt it?)
Deepak Kumar Vasudevan
http://deepak.portland.co.uk/
|
|
|
|
|
to open a connection...
hr = pConn->Open(L"Provider=sqloledb; Data Source=127.0.0.1; Initial Catalog=realtime", L"sa", L"sa", NULL);
however, this time, i need to concatenate my connection string:
this->m_pszConn = new char[nLenConn+1];
strcpy(this->m_pszConn, this->m_pszProvider);
strcat(this->m_pszConn, this->m_pszDataSource);
strcat(this->m_pszConn, this->m_pszInitialCat);
how can I convert m_pszConn to Unicode? This is what the "L" macro does right? from char* to Unicode? And is "L" a macro by the way?
I can't do this:
pConn->Open( L m_pszConn, ....);
Thanks.
norm
|
|
|
|
|
L requires a constant, i.e. a string in quotes. Instead if you have a char *, you should change this member to a _bstr_t. This wrapper will allow it's internal value to be set by either a narrow or wide string, it keeps two internally, and only builds the one it does not have when the operator asks for it. So you can pass it as a BSTR, or as a char *, and being a wrapper, it even cleans up after itself.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002
Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
|
|
|
|
|
I'm trying to use an activex component in a container. I created it using the dialog box wizard and created a member variable for the control. This all works fine, but I need to initialise a property that the control uses at run-time, i.e. while creating the control.
How do I access (and use) this persistent data stream?
I can initialise properties fine via the dialog box editor, but I want to be able to change one property value at initialisation of the control. Note: I know how to set the properties after the control has been initialised, but this essential peice of data I want to use only gets read once at initialisation/creation of the control, so after that event it's too late
I'm looking at the msdn info for CreateControl, and I imagine I need to pass in some info in the "CFile* pPersist" parameter, but I can't find any reference to the structure of this.
Debbie
|
|
|
|
|
You'll want to look at implementing IPersistStream or IPersistStreamInit (the latter allows you to initialize a persistent stream when one does not already exist). The CFile* pPersist is a stream that actually gets loaded with IPersistStream::Load(). If you look at MSDN for documentation about this interface, I'm sure you'll find everything start to fall into place.
As a side note, this is a basic component of ActiveX controls and how containers (like Word, Excel, the ActiveX Control Test Container, etc.) work. When those documents are saved, the application creates an IStream which is passes as a pointer to all its child controls' IPersistStream::Save methods. The child controls (OLE at a minimum, but can be ActiveX) save their information to this IStream* while the application calls IPersist::GetClassID() to associate the control's CLSID with that particular section of the finished IStream. This is all part of the COM persistence model. The container application actually implements IPersistStorage itself, so that it can load a file and create an IStream from it, or vice-versa to save it.
"Well, I wouldn't say I've been missing it, Bob." - Peter Gibbons
|
|
|
|
|