|
Hi everyone,
Where can I find a good tutorial on creating ActiveX controls using C++. With and without MFC (though, I guess that would be like pulling your own teeth). Also, any book recommendations would be great too!
Thanks,
Pankaj
//=================================================
Q: How many C++ programmers does it take to change a light bulb?
A: You're still thinking procedurally. A properly designed light bulb object would inherit a change method from a generic light bulb class, so all you'd have to do is send a light-bulb-change message.
|
|
|
|
|
pankajdaga wrote:
Q: How many C++ programmers does it take to change a light bulb?
None! Its a hardware problem....
Err, sorry I can't answer yout real question.
Roger Allen
Sonork 100.10016
If I had a quote, it would be a very good one.
|
|
|
|
|
When you have a member variable of type _Recordset, and first create it you do a createinstance. Now if later in the code, you do it again, like
HRESULT hr = m_pRecordset.CreateInstance (__uuidof (Recordset));
then in essence have you overwritten the object, as in deleted the old recordset and created a new one addressed by the same variable pRecordset?
Basically I want to clear out the contents of the variable (the old recordset )and fill it with the results of my new search. I dont know if this is obvious, but I am none too sure.
Thanks,
ns
|
|
|
|
|
Hmmmm. I will try and be simple here. CreateInstance is like new(). What it does is what it says. It creates an instance of the recordset object.
If you wish to refresh the contents of the recordset with new data then simply close the recordset and open it with a new sql. There are probably other ways too. But do not call CreateInstance again. That is not the right way to do it.
Calling CreateInstance again is not equivalent to deleting.
You can read up on CreateInstance on MSDN or in any COM book.
|
|
|
|
|
It worked to just close the recordset and reopen with a new command. I think if you dont close it and try to open it again with a different command, it bombs. I was looking for something like rs.clear() and .close() escaped me. I thank you very much!
ns
|
|
|
|
|
Hi, I'm learning DirectDraw. I have a problem:
I've created two surfaces using a COMPLEX surface, because I want to do some flipping. I'm using FULLSCREEN | EXCLUSIVE | NOWINDOWCHANGES mode.
The flipping occurs, but for split second, every once in a while, I see the desktop and everything on it. A flicker, if you wish to call it that...
The mouse cursor is always visible during my animation, although I'm in full screen. And the cursor seems to be "aware" of what's going on "behind" my application:
It changes its shape according to messages of other windows, and if I try to "drag" somewhere on my fullscreen application, it activates the window behind it (let's say, Microsoft Word) and starts highlighting text!!!
I've tried maximizing my MFC window before entering fullscreen. It doesn't help, since my own application window still responds, and I can see it when a flicker occurs.... The taskbar is also responding (I see it flickering when I move the cursor over it).
How do I REALLY get exclusive access to the display???????
/=/=/=/=
Deus
/=/=/=/=
|
|
|
|
|
I have a program that uses CArray <ccode, ccode=""> m_IL;
Everything compiles @ level 4
when I try to use .Add(code) - the CArray asserts with Assert valid , invalid vtable . Why ??????
Could someone please help!!!!!!
viva AMIGA
|
|
|
|
|
If you have declared it as CArray m_IL, then that's wrong. It is a template, you have to use it as e.g.:
CArray <type, type="" &=""> m_IL;
Otherwise, post your code here.
Martin
--------------------------------------------
C'mon we all know computers are experimental devices and should only be used for playing games.
Using them for alternative stuff like business, is clearly not using them for what they are intended.
Colin Davies
|
|
|
|
|
it is defined as CArray <ccode ,="" ccode=""> m_IL
viva AMIGA
|
|
|
|
|
Ahhh the html is picking up the <> its
CArray <CCode,CCode> m_IL
viva AMIGA
|
|
|
|
|
I've just found this function but I'm having a problem getting a response from the ftp server. Parameter 2 in the documentation says it should be set as
CmdResponseType eResponse = CmdRespRead
to get a response back from the server, but anyway I try to change it to this it won't compile because it doesn't recognise what CmdResponseType is or it doesn't recognise CmdRespRead.
Has anyone had experience of how to get around this? Thanks for listening again
ps, the function is this one that I'm trying to use. Thanks
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/vclib/html/vclrfCFtpConnectionCommand.asp
|
|
|
|
|
Sorry, forgot to mention that I'm using VS.Net to make this, so its that version of MFC thats being used.
So far all I've discovered that the CmdResponseType is defined as an enum in the afxinet.h file, but I can't for the life of me make any use of it at all
Thanks for any help I may get
|
|
|
|
|
Hi... I have a problem.
How to get the scrollbar of a CListCtrl and change its background color ?
|
|
|
|
|
Hi:
When my application start, it allocated some memory from private heap and freed them later,but windows didn't collect them.Windows report that those memory blocks were in use.So, yy question is:
How to : let system collect the memory that has already been freed by application
I am seeking...
For what?
Why did you ask me for what? I don't know!
|
|
|
|
|
you can try _heapmin
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
See my MemWatcher[^] tool.
/ravi
Let's put "civil" back into "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
I'm using a library and I need to redirect function calls in that library. What I mean is that in the library, there are calls to a function and I want the calls to be calls of another function. The problem is that I can't include that file, where those new functions are to the library and I can't modify that library very much.
So, I'm using extern and define in the files of the library to solve the problem and I'm able to make the library without compilation/linking errors. The problem is how to link/compile/include the library with my application? Now I keep getting LNK2001 errors telling me that the library doesn't find the definitions of those functions. I'm using makefile and in there I have linked the object file that contains the new functions to be used and also the library. That is apparently not enough. I even tried putting the object file before the library when linking.
-Janetta
|
|
|
|
|
Maybe you're misxing C and C++ styles of linking. Make sure the portion of library using the external function and the object code providing it are the same language. You can also use extern "C" in both parts if the languages are different.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
But of course that was the problem
Thanks!
-Janetta
|
|
|
|
|
Hi,
In application, i need write the some binary data into file.
But the data cannnot be represented by the data types, such as
unsigned char, unsigned short and so on.
My problem is:
i have 1 bit(value 1) for number of 45, 1 bit (value 0) for number of 40, and 1 bit(value 1) for number of 45, and finally 1 bit (value 0)for number of 2728. Now i want to write these single bit into a file. How can i define the buffer (in types) for dealing with above bits?
How to do this?
Thanks in advance!
|
|
|
|
|
I don't quite understand your question, but seems you'll have to use bitfields. Look for some tutorials on bitfields to get started.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
This is a simple question regarding registering a DLL that spurned from a current article about plugins:
http://www.codeproject.com/dll/PlugIn.asp
I thought that only COM DLLs needed registering with the OS. Regular DLLs
can be used as is, and registering is pointless. Am I completely wrong?
I wonder if someone would explain this to me as it has been bugging me for a while.
chin
Happy, Happy, Joy, Joy.
|
|
|
|
|
Rchin wrote:
Regular DLLs can be used as is, and registering is pointless. Am I completely wrong?
You're right. I've searched the article text, and there's no mention about 'registering' the plugin dlls. Did I miss something?
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
One of the article's response thread entitled 'Registering a dll in Windows 2000' got me thinking on a tangent about registering DLLs in general.
I just wanted someone to confirm (or deny) that the registration process for DLLs is only applicable to COM components with the DLL file extension.
One of the most frequently asked question around my office when installing a piece of software is 'Have you registered this/that DLL'. I am convinced that this is not a necessary practice for regular DLL libraries.
thanx for the reply.
chin
|
|
|
|
|
You are correct. Anything to do with COM typically should be registered. There are ways to deal with COM without registering, but it's more problems then it's worth.
COM files come in many flavors however: dll,ocx,exe. Actually, you could call the file anything you want. But it must export (some) the functions DllRegisterServer, DllCanUnloadNow, DllGetClassObject, DllUnregisterServer.
Regular DLL's can't be registered since they wouldn't have those functions.
Joel Lucsy (jjlucsy@ameritech.net)
|
|
|
|