|
Have you tried ZipArchive at
http://www.artpol-software.com/
?
There's a free library there that allows you to read and write ZIP files that's very easy to use, I don't know if that's any use to you.
Cheers,
KB
|
|
|
|
|
Have a look at zziplib. If you want to, you can even replace plain fopen with zzip_fopen and read the file like it was a plan C stream.
As for jar file, it completely depends if you're talking about the .jar extension that Sun "stole", or the more widely spread and later hijacked JAR archiver (the successor to ARJ). If the former, it's nothing more than a renamed .zip-file. For the latter, check the ARJ/JAR site and see if there is a free unpack lib.
++luck;
|
|
|
|
|
hi, thx u 3!
i need to access sun's java jar file first, than more...
what does "stole" mean here? is there any special?
includeh10
|
|
|
|
|
includeh10 wrote:
what does "stole" mean here?
The JAR archiver was on the field before Java even became hype (IIRC). A jar archive therefore had a well-defined meaning: an archive created by the JAR archiver.
Then Sun came along with Java. First they used the .zip extension (as one would expect, since Java class-collection archives are just zip-files).
Later Sun decided this wasn't any good. They wanted something that differentiated a Java .zip archive from any other .zip archive. What could be more obvious than taking a zip-file and changing the extension to .jar (Java ARchive)? Well, I can come to think of a gazillion better things to do - especially since they by this move overloaded even the meaning of "jar archive". This was a Bad Thing(tm).
Nowadays "a jar archive" can be either a JAR archiver archive (with .j extension) or a collection of Java classes in a zip-file (renamed to the .jar extension), and without explicit context or qualification there is no way to know which one people are talking about (hence my previous answer to your question).
So the meaning of "stole" in this context was to display that Sun hijacked an already existing TLA used in the same field (archives and archivers).
|
|
|
|
|
Hi everybody.
I'm writing a CD PLAYER, (with my own class), using the MCI COMMANDS
with the SendString function.
Everything goes well, but I have two problems.
First: How can I detect when an AudioCD is insert?.
Right now, I have a member function in my class called IsCDInsert()
and with a WM_TIMER message in my dialog, (the method wake up every second),
I can do that, but I think that this is not the right way.
Maybe the question could it be: How can I make my cd player the default player?.
Second: I have, (for example), a slider control in my dialog, and I like to control
the CD Volume with it. How can I link that control with the sistem volume function?.
I have see the MCIWndGetVolume() function, but I dont have a MCI window, and the
function waveOutSetVolume() but I think that it's only for wave files.
Well, thank you very much.
Sorry about my english.
Demian.
|
|
|
|
|
I'm creating an OLE container doc/view (MFC), which can embed Excel workbooks within it; I have a need for the VBA in Workbook_Open() to be executed when the document is opened, but am having a spot of difficulty with that.
Sometimes the VBA is executed, sometimes it isn't - really inconsistent. Has anyone managed to successfully do this, or could you point me in the right direction for making sure that the VBA is always executed?
Dylan
|
|
|
|
|
Hello all,
I'm working with HtmlView in VC7.
I have a problem to get all URL of multiframes web page.
I would like to get the URL of the page which have the focus.
You know how to do this?
thx in advance.
|
|
|
|
|
Well, it's only a try!
Getting all URLs of your web page isn't very complicated - for every frame the function OnBeforeNavigate2 gets called, providing the URL.
But determination on gaining focus should be a more advanced task.
When your document is loaded, you can get a pointer to all frames of your window by IHtmlWindow's get_frames function. Then you should implement a connection sink and connect to all IHtmlElementEvents2. Then you could react on it's onfocus event.
Connecting to the events could be done in the following way:
void CMyClass::ConnectEvents(IHTMLElement* pElem)
{
HRESULT hr;
IConnectionPointContainer* pCPC = NULL;
IConnectionPoint* pCP = NULL;
DWORD dwCookie;
hr = pElem->QueryInterface(IID_IConnectionPointContainer, (void**)&pCPC);
if (SUCCEEDED(hr))
{
hr = pCPC->FindConnectionPoint(DIID_HTMLElementEvents2, &pCP);
if (SUCCEEDED(hr))
{
hr = pCP->Advise(pUnk, &dwCookie);
if (SUCCEEDED(hr))
{
}
pCP->Release();
}
pCPC->Release();
}
}
pElem would be a frame element in your case.
Hope it helps ... and works;)
|
|
|
|
|
THX!!! are you lucky luke?
im'going to understand your code and try it.
i hope it's works
thx again !
|
|
|
|
|
hmm..
sorry i'm don't understand very well
to get a pointer on frames i do :
IDispatch *pDisp = GetHtmlDocument();
IHTMLDocument2 *pDocument = NULL;
pDisp->QueryInterface( IID_IHTMLDocument2, ( void** )&pDocument );
IHTMLFramesCollection2* pFrames;
pDocument->get_frames(&pFrames);
I don't understand what contains pFrames ?
and to pass IHTMLElement* pElem at ConnectEvents i do :
IHTMLElement* pBody = NULL;
pDocument->get_body (&pBody );
ConnectEvents(pBody);
it's right ?
i'm sorry to ask you so many questions but you are my only help.
|
|
|
|
|
jeremysay wrote:
to get a pointer on frames i do :
Yeah, that should work....
jeremysay wrote:
I don't understand what contains pFrame
pFrame contains a collection of all frames of your document. You can then extract the elements by using the item function that IHTMLFrameCollection2 supports. For details you should hava a look at MSDN.
jeremysay wrote:
and to pass IHTMLElement* pElem at ConnectEvents i do :
As you want to get informed about a frame gaining focus, I think IHTMLElement should be replaced by a pointer to a frame object. So once you have pointers to your frames (as mentioned above retrieved by 'item'), I think you should call ConnectEvents with a pointer to your frame.
jeremysay wrote:
i'm sorry to ask you so many questions but you are my only h
There's no reason to be sorry ... I think I'll learn nearly as much as you when trying to solve your problems ... it's everytime a new challenge;)
|
|
|
|
|
THX !
i try to work your soltion....
Schlaubi wrote:
think I'll learn nearly as much as you when trying to solve your problems ... it's everytime a new challenge
Don't panic I have many challenge for you
|
|
|
|
|
I Am Trying To Convert Any Square/Rectangle Bitmap Into An Irregular Shape Bitmap Using MFC .
Any Ideas .
|
|
|
|
|
It's not physically possible to do this. All bitmaps are a square array of bytes, compressed or otherwise. Can you imagine how much harder it would be to define an irregular path for a bitmap ?
You're probably confused by the fact that many applications use masks to draw bitmaps as irregular shapes. GDI+ handles this for you nicely, you can specify a range of colours not to draw and make the central colour in that range the colour you draw the outline area in. A range is good because if you use a lossy formay like jpg, the pixel values will wander a bit.
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
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
Hi Christian,
I Got The Feeling From Ur Mail That u have Not Got My Point.
u Wrote About Mask's I Am Familar With That Types Of Mask Creation Process And Use It in Our Packages.
But As u Know That We View a Bitmap on Screen As Rect/Square .
But i Have To Make it Look Round This Process Will Surely Have Some Data Loss We Are Ready For That.
if u Have Gone Through Some Graphical Packages Such Photoshop it Has Provision For Irregular Shape Bitmaps .
Regards
Praveen
|
|
|
|
|
All Photoshop does is hide the details from you. There ONLY way Windows can deal with a bitmap is as an array of scanlines, which may or may not be padded, depending on bit depth. They are always rectangular. End of story.
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
It'd probably be fairly easy to make a bot that'd post random stupid VB questions, and nobody would probably ever notice - benjymous - 21-Jan-2003
|
|
|
|
|
I was created toolbar using CToolbarctrl.I was used Loadimages for loading the Single Bitmap,having no of different bitmaps.Then I was used TBBUTTON structre.
b[0].iBitmap=0; ie means I was assigned index of the bitmap resource.
This program sucessfully run on WIN98.But while running the on WIN2000
Bitmaps are not appeared on the bitmap.what shall I do?Please tell me
changes?
|
|
|
|
|
Hi,
I work on a project composed with several libs including MFC's and resources on visual c++ V6.0
i have a toto.lib and toto.res that i link with others but i saw that all resources was present in toto.res AND in toto.lib. I would like to trash toto.res and use only resources included in toto.lib but the linker want absolutely toto.res. I can't find a way to link with toto.lib only and load resources from this static lib.
Any solution?
Thanks
|
|
|
|
|
If .lib your are talking about is surrogate created to link to some DLL then you have no choice.
If you are talking about true static lib there could be no resources in it, even though it can reference one.
Anonymous wrote:
load resources from this static lib
This statement is confusing - please clarify what is it you are trying to do?
|
|
|
|
|
Hi,
I have strange problem with my dialog based app.
I use modified PropertySheet/PropertyPages on main dialog
Base is StackDialog by Zoran M.Todorovic, found on codeguru or maybe on codeproject.
In some moment i realized that when I close application, no one get focus.
Alt+Tab combination don't work. Alt+Esc stil can to open start meny, and after that Alt+Tab work well.
Main dialog have added menu, tooltips...
I try to set focus to the previous application in ExitInstance
Question is
1. How to repair application to exit properly
2. How to find which app is behind my app, (in z-order)
e.g. how to force regular exit
thanks for every suggestion
|
|
|
|
|
Im trying to undefine a setting from a function one file
that calls another file where the actual #define is used.
the problem is much the same as this code.
I know you can fix this by putting the volume code
below main() but is their any way around this other than
moving the code ?
<br />
#define VOLUME_UNITS 1<br />
<br />
int volume ()<br />
{<br />
#ifdef VOLUME_UNITS<br />
return 10;<br />
#else<br />
return 20;<br />
#endif<br />
}<br />
<br />
int main(int argc, char* argv[])<br />
{<br />
int vol;<br />
#ifdef VOLUME_UNITS<br />
#undef VOLUME_UNITS<br />
vol = volume ();<br />
#define VOLUME_UNITS <br />
#else<br />
vol = volume ();<br />
#endif <br />
<br />
printf ("%d\n", vol);<br />
<br />
#ifdef VOLUME_UNITS<br />
vol = volume ();<br />
#endif <br />
<br />
return 1;<br />
}<br />
|
|
|
|
|
Little bit confused as to what you are trying to do, but just looking at the code, the #ifdef and #undef's in the main funtion don't really serve any purpose. Any #directive is dealt with by the compiler, not the linker or at runtime. I'm guessing by the bit of code that goes (code is paraphrased!):
#ifdef VOLUME_UNITS
#undef VOLUME_UNIT
vol = volume()
#define VOLUME_UNITS
...
#endif
... you are trying to turn off the VOLUME_UNITS for that particular execution of volume(), won't work - the evaluation of VOLUME_UNITS will only occur when compiled, not when volume() is executed. In effect, the code above is equivalent to:
main ()
{
int vol;
vol = volume ();
:
#ifdef VOLUME_UNITS
vol = volume ();
#endif
}
If you want something evaluated runtime then the only thing is to do it runtime (extra argument, an 'if' statement etc)! Alternatively, I may have misunderstood your question...
|
|
|
|
|
What segment of the SDK needs to be updated to get the gdi+ lib, dll and header files?
I need to know this as i wont have enough hd space for the full SDK platform upgrade. (Note I am assuming GDI+ is in one of the platform upgrades)
|
|
|
|
|
Is this a wise thing? I have a heap of little tables that would never have more than 100 or so entries so did not want to use a database like Access or MSDE.
I was thinking of using XML to store the data and DOM to access it, I basically need to be able to add/modify/delete records and do some simple queries, e.g. "give me all records where this element equals this value", this should all be possible using DOM?
|
|
|
|
|
yes, this is possible, but you won't be able to use automated queries, stored procedures... having less work in order to connect to the database (because there is not a database at all), but having more work in order to make it give you the right results because you'll need to make all the normal database stuff for yourself...
Hope this helps...
|
|
|
|