|
hi all,
i want to create a plugin for IE that does a specific work..e.g. google plugin. can i do so in vc++..i am not sure what is the right approach to start with..can anyone please help....
thanks..
Himanshu
|
|
|
|
|
|
hi laurent..
thanks for ur reply..i found the link on code project's ATL page... hope this will help me out at last...
cheers..
himanshu
|
|
|
|
|
Starting with an example situation.....some of you might know that when you create an ATL COM project using the VisualStudio new project wizard, the newly created resource (*.rc) file will contain a TEXTINCLUDE directive that includes the project's type library (*.tlb generated from MIDL compiling the *.idl file) INTO the resulting binary (EXE or DLL).
Now, my question involves the case when 2 or MORE type libraries are included in this fashion into the resulting binary file.
If you are using the API function 'LoadTypeLib', you can specify which of the included type libraries you want like this:
LoadTypeLib("C:\\MyServer.dll", ...) for the first, (or also "...\\1")<br />
LoadTypeLib("C:\\MyServer.dll\\2", ...) for the second,<br />
LoadTypeLib("C:\\MyServer.dll\\3", ...) for the third, and so on<br />
HOW CAN THIS BE DONE WITH THE '#import' directive?????????????
I can't believe microsoft would ignore the capability of generating com interface wrapper classes for secondary type libraries.
Is there an extractor tool that I'm unaware of that removes type libraries from 'dll's or 'exe's and saves them as 'tlb's.
I don't want to START with OleView, THEN find object, THEN copy Idl definition, (THEN find next object, THEN copy idl definition,...) THEN Midl compile, THEN FINALLY #import (besides this process is incomplete unless you ALREADY have a list of ALL the COM class objects that exist in the secondary type library).
HEEEEEEEEEEELLLLLP, i'm dieing here
thanks,
nebbish
Smart, Sexy, Sane. Pick two.
|
|
|
|
|
nebbish wrote:
Is there an extractor tool that I'm unaware of that removes type libraries from 'dll's or 'exe's and saves them as 'tlb's.
VC can do that. Open the EXE/DLL but pick Resources in the Open as combobox. From the resource editor you can save any resource as binary data (just name the file something.tlb and you're set).
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
hi everyone,
what message do you use for multiple selection in a list control? when i said multiple selection, i meant when you hold the ctrl key on the keyboard and click on multiple entries in the list control that you want to select.
thanks in advance.
|
|
|
|
|
LVN_ITEMCHANGING is sent before an item's state changes (so you can reject the change if you want). LVN_ITEMCHANGED is sent after the state changes. There's also LVN_MARQUEEBEGIN for when the user drags a rectangle in the list to select items.
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
I need to move just a single control in my view to keep it centered on the screen. I have tried overriding the OnHScroll() and adding code to MoveWindow() for my control to move it. I can't seem to keep it visible.
Here is the code sample:
<br />
void CMYView::OnHScroll(UINT nSBCode, UINT nPos, CScrollBar *pScrollBar)<br />
{<br />
CRect r;<br />
int nNewCalPos;<br />
<br />
if(pScrollBar) return;
<br />
switch(nSBCode)<br />
{<br />
case SB_LINERIGHT:<br />
m_nHPos += 204;<br />
if(m_nHPos > m_nMaxRange)<br />
{<br />
m_nHPos = m_nMaxRange;<br />
nNewCalPos = m_nMaxRange - 204;<br />
}<br />
break;<br />
case SB_LINELEFT:<br />
m_nHPos -= 204;<br />
if(m_nHPos < 0)<br />
{<br />
m_nHPos = 0;<br />
nNewCalPos = 150;<br />
}<br />
break;<br />
}<br />
<br />
CScrollView::OnHScroll(nSBCode, nPos, pScrollBar);<br />
<br />
m_cCalanderCtrl.GetMinReqRect(&r);<br />
m_cCalanderCtrl.MoveWindow(nNewCalPos, 0, ((r.right * 4) + 20), r.bottom, TRUE);<br />
}<br />
Any ideas?
Thanks,
-Eric
|
|
|
|
|
Hi --
Suppose I have a data set like:
1 2 3 4
4 5 6 9
1 5 9 6
in an external file. How do I read this external data set into a 3 by 4 array in visual c++.net. I do not have SQLClient.. Could I do this with dynamic arrays?
Thanks
|
|
|
|
|
Yes, you don't need SQL Server, in fact it would do nothing for you. Read my articles on iostreams and std::vector.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-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
|
|
|
|
|
where are the articles? here at this site?
(I'm new to this site)
Thanks
|
|
|
|
|
My apologies. There is a search box above, but here are some links:
http://www.codeproject.com/vcpp/stl/index.asp#General[^]
I was wrong, I've not done an article on iostreams. I will rectify that today. I do show how they are used in other articles though. The gist of it is this to read a file:
#include <fstream>
using std::ifstream;
ifstream a("c:\file.txt");
int i;
a >> i;
and this to write one
#include <fstream>
using std::ofstream;
ofstream a("c:\file.txt");
int i = 7;
a << i;
More to come later today, I promise.
Christian
No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002
C# will attract all comers, where VB is for IT Journalists and managers - Michael P Butler 05-12-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
|
|
|
|
|
thanks.. would you know how to do it with a comma separated file?
Have you ever used the TextReader function in the namespce System:IO. I think it's only for text strings..
Thanks --
|
|
|
|
|
For that, I would have to modestly point you to my article: CDataFile[^]
That should help. I will update it to write the file back out in the next release.
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
Suppose I receive raw data from a source. This source already placed it in memory for me and I only know the raw data doesn't exceed 10 megabytes. It's running on a computer with 512MB RAM or more.. What is more efficient if I want to write this raw data to a file :
- Create a buffer of xxx bytes
- Write the 10 MB to file at once
--
Alex Marbus
www.marbus.net
But then again, I could be wrong.
|
|
|
|
|
What format do you want the data in? ASCII or just a proprietary serialization?
- Nitron
"Those that say a task is impossible shouldn't interrupt the ones who are doing it." - Chinese Proverb
|
|
|
|
|
ASCII, actually it's always plain text (well, some Base64 encoding might be there but that's text after all )
--
Alex Marbus
www.marbus.net
But then again, I could be wrong.
|
|
|
|
|
I'd say just write the whole thing at once and let the OS's caching code worry about how best to write it out to disk.
--Mike--
Friday's GoogleFight results: Britney Spears 2,190,000 - Erica Weichers 23
1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Thanks, Mike.. that was actually the answer I wanted to hear
--
Alex Marbus
www.marbus.net
But then again, I could be wrong.
|
|
|
|
|
Is there a good way to tell whether some process has a given file open.
I am writing an application that allows the user to open a file in an arbitrary external editor. I start the editor in a spawned process with P_NOWAIT or P_DETACH flags, and want to figure out whether the editor has closed the file. Since the user can arbitrarily choose the editor, I can't make any assumptions about DDE or similar calls to the editor to query the status of the file.
The user may close the file in the editor without closing the editor, so I can't simply check whether the given PID has exited.
Thus, my question is: given a PID (process id) and a filename (full path), is there a Win32 API method of determining whether the process PID currently has the given file open?
Thanks,
Jonathan
Why couldn't Science, in the long run, serve
As well as one's uncleared lunch-table or
Mme X en Culottes de Matador? James Merrill
|
|
|
|
|
You can test if a file is open by trying to open it for exclusive access with no sharing. It the file exists but the open fails, another process has opened it.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Cool! Elegant solution. Thanks.
|
|
|
|
|
I have a small but annoying problem I'm hoping someone here can help me with. I've built a small shell context menu extension dll. When my item is invoked from the menu, I create my dialog box with progress bars , set up the list of files and send them off to the dialog, which then processes them. The wierd behaviour starts when I have two shell windows ( My Computer windows ), and I run some files from each window at the same time. The underlying process is built so that the second dialog will sit waiting, ready to go, while the first one finishes - that part is ok. What is strange is that as the dialog in the first window is processing, and updating it's progress bars, the progress bars in the other dialog are also being updated.
Any clues? Thanks in advance for any help.
|
|
|
|
|
Using VC++ 6.0 and MFC
I am dynamically creating child windows in a derivative of CScrollView. This is working really well.
How can I save the child window which has the focus when another application is activated so that this can be restored when the focus is returned to my application.
Example is when user switches to Explorer then back to my app using the buttons in the start bar.
I have tried a few methods but they do not seem to behave consistently. Any suggestions will be very welcome.
Sara
|
|
|
|
|
Hi,
If I draw a rectangle on a dialog using this code it draws a nice rectangle with black frame on NT but nothing on 2000, any idea ?
CRect rect;
CClientDC dc (dlg); //get our device context
dlg->GetClientRect (&rect); //get the pointer to our window
CBrush brush (RGB (192,192,192));
dc.SelectObject(&brush);
dc.Rectangle(20,30,40,70);
|
|
|
|