|
Hello all
I am planning to start making activeX control using MFC.
can you please suggest some good books.
regards
Anil:
|
|
|
|
|
"Understanding ActiveX and OLE" by David Chappell - Microsoft Press
SkyWalker
|
|
|
|
|
Thanks for your quick response
I will have a look at it
|
|
|
|
|
anil wrote: I am planning to start making activeX control using MFC.
Developer's Workshop to COM and ATL 3.0 [^]
"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
|
|
|
|
|
Thanks for your quick responce.
The book you suggested is on ATL.
MFC based book.
there is something difference between ATL based and MFC based I think.
if not then tell me. I am totaly new to this area.
|
|
|
|
|
If you are going to develop a COM component...
then ATL is an easier way...
the idl files and guids are generated automatically
MFC is basically for win32 program development using API's
if ur developing com components... go for ATL
|
|
|
|
|
have a look at this:
COM and COM+ programming primer
i dont remember the author's name
this will help with ATL and MFC
|
|
|
|
|
hello all,
i am using one of the third patry tool of Microsoft INET (Microsoft Internet Transfer Control) through app wizards for FTP Application. But the problem is most of the parameters are in VARIANT. I worked the same in VisualBasic it worked well and i got the result. When i ported my application to VC++, Its giving some error while using OpenURL() method. In VisualBasic all, 1st parameter of this method is Optional where we need to give the URL. i had given the URL separetly for that.
Could any one plz say me how to use this class? plz.
I did the same application using CInternetSession and CFTPConnection. I got it worked. But i want to use this method.
Plz say how to do.
Thank u all in advance.
regards,
Basheer.
|
|
|
|
|
You MUST provide a valid URL when calling OpenURL(yourURL, icString)
SkyWalker
|
|
|
|
|
But i am giving that URL through separate property. that is there we have SetRemoteHost() through that i am giving the URL such as ftp://.....
and SetUserName() for giving Username and SetPassword() for giving password.
Then why do i need to give the URL. if it is so how do i give?. is it like
ftp://username:password@ftpsite
that means this has to be converted to Variant to transfer this.
is it?. Could u plz check this.
Thanking u.
Basheer.
|
|
|
|
|
You pass the url as a string to the OpenURL() function.
Remember always this: OpenURL 's return value depends on the target of the URL. For example, if the target URL is the directory of the FTP server, the directory will be returned. On the other hand, if the target is a file, the file will be retrieved.
(and not speaking that the url must be a valid one )
|
|
|
|
|
... and check the above (I do not know why it appears under Anonymous, as I was already logged-in) by passing this :
"ftp://ftp.microsoft.com/disclaimer.txt"
SkyWalker
|
|
|
|
|
hey i am having problems displaying integer/long variables in form of exponents....plz help
thanks
|
|
|
|
|
what ... problems?
SkyWalker
|
|
|
|
|
cast them to float or double and then display them
"Do first things first, and second things not at all."
— Peter Drucker.
|
|
|
|
|
Hi,
For creating Restore point we use below structure,
typedef struct _RESTOREPTINFO {
DWORD dwEventType;
DWORD dwRestorePtType;
INT64 llSequenceNumber;
TCHAR szDescription[MAX_DESC];
} RESTOREPOINTINFO, *PRESTOREPOINTINFO
In it why is it necessary to specify 2nd param 'dwRestorePtType'
whatever I install or do... system shud take restore point...I think so...Do tell Ur comments... is there any specific reason???
coz if I dont set this parameter, system gives me error code-13 i.e DATA IS INVALID
thanks in advance
Supriya Tonape
-- modified at 2:30 Wednesday 19th October, 2005
|
|
|
|
|
Ussualy, an application passes a pointer to such an object to the SRSetRestorePoint() function and needs to know what action to take on certain events. For example, to cancel the creation of a restore point, you could call SRSetRestorePoint() with dwRestorePointType set to CANCELLED_OPERATION, dwEventType set to END_SYSTEM_CHANGE, and llSequenceNumber set to the sequence number of the restore point.
SkyWalker
|
|
|
|
|
I wanted to know why SRSetRestorePoint() does not work in Vista? Do we need to specify any other parameters?
SRSetRestorePoint() returns true in XP but false in Vista (I'm executing the same piece of code in the two m/cs). Please help!
|
|
|
|
|
How to get the size of a removable disc connected on the USB port
|
|
|
|
|
If you are referring to the drive's capacity, you can use the Win32_DiskDrive WMI class.
"Take only what you need and leave the land as you found it." - Native American Proverb
|
|
|
|
|
I'm running the code shown below, and it's just too slow. I'm reading 17k rows and 59 columns from a CSV file and it takes 3 minutes. My computer is not the fastest (5 year old Celeron processor) but still...
I got some great suggestions yesterday: One person mentioned that I should read larger chunks of data instead of one character at a time. Problem is, I don't know how.. Can anybody help?
Note: rawData and record are STL vectors.
rawData.reserve(numberRecords) ;
int counter=0 ;
do
{
counter += 1 ;
std::vector <std::string> record ;
record.reserve(numberVars) ;
for(int i=0; i<numbervars-1; i++)
="" {
="" char="" buff[100]="{0}" ;=""
="" data-="">getline(buff,sizeof(buff),',') ;
record.push_back(buff) ;
}
std::getline(*data,value) ;
record.push_back(value) ;
rawData.push_back(record) ;
std::vector < std::string >::iterator j ;
j=record.begin() ;
record.erase(j, j+numberVars) ;
} while (counter < numberRecords) ;
Thanks,
Hamlet
|
|
|
|
|
Alright buddy, u can use the read function to read a buffer into memory and then read byte by byte from there, check if u r reading past the buffer and if so, then only re read from the file the next chunk. And if u r really serious, u can try to implement these in a class like this:
class CMyFile : public ifstream
{
void *m_pvBuffer;
unsigned long m_ulBufferSize;
unsigned long m_ulSeekPosition;
public:
CMyFile(void);
~CMyFile(void);
CMyFile& operator>>(string& param_string);
};
use the read function, interpreting of buffer and various checks in the opertor>> function.
the above is only a general idea and by no means a complete solution.
"Do first things first, and second things not at all."
— Peter Drucker.
|
|
|
|
|
let's say i read a chunk wih read() and then parse the chunk for commas and end-of-line separators. what happens if the chunk stops between commas or lines?
hey do i really have to spoon feed u?
{
...
...
if(... )
{
...
}
no more questions please...
"Do first things first, and second things not at all."
— Peter Drucker.
|
|
|
|
|
I am developing an SNMP Agent. I want to use sockets to send/recieve data, for which I need the services of a socket. The code works fine, ie compiles correclty.
#include "Connector.h" // The file that defines of the CAsyncSocket derived class Connector
Connector Cn;
// Entry Point for the DLL
BOOL APIENTRY DllMain(...)
..
{
WSADATA wsaData;
long Events = FD_READ | FD_WRITE | FD_CONNECT | FD_CLOSE | FD_ACCEPT;
WSAStartup(MAKEWORD(1,1),&wsaData);
AfxSocketInit();
switch(ul_reason_for_call)
{
case DLL_PROCESS_ATTACH:
/* The problem lies here. If I don't use this line then the Agent will send traps correctly. But when I create this socket nothing happens. The Agent does not send traps. It kind of just stops working.
Cn.Create(128,SOCK_DGRAM,Events,"127.0.0.1");
break;
...
}
I dont seem to know what is the problem.
Please Reply as soon as possible as I am working on a project.
Thanks
|
|
|
|
|
Just a guess, could it happen beacuse you are calling WSAStartup() and AfxSocketInit() for every call of DllMain?
You might considder moving those function calls into DLL_PROCESS_ATTACH
|
|
|
|