Guidance
指路人
g.yi.org
Guidance Forums / wxWidgets (wxWindows) in C++ / Using ZZip ZLib with wxWindows

Register 
注册
Search 搜索
首页 
Home Home
Software
Upload

  
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
Message1. Using ZZip ZLib with wxWindows
#3397
Posted by: econder 2004-02-19 23:46:41
Hello,

I'm am trying to integrate the ZZip compression library into my wxWindows program, but I'm having a great deal of difficulty doing this.

For my input file names, I am using a wxArrayString to store them, but the ZZip library asks for only "char" variables for the filenames. Is there any way that I can convert the wxStrings in the array to "char"?

Any help would be greatly appreciated.

Regards,
econder

Here is a piece of the ZZip code I'm trying to integrate:

__declspec (dllimport) int OpenArchive(actions action, 
									   char    *filename, 
									   info_s  *info);
This is from the header file. As you can see, I need a char variable for the filename. I hope this helps.

Message2. Re: Using ZZip ZLib with wxWindows
#3418
Posted by: upCASE 2004-02-26 15:21:16
Hi!
For wxString there is c_str(). So

wxString s;
s = "Hello.zip";
OpenArchive(?, s.c_str(), ?);

should do the job.

upCASE
-----------------------------------
If it was hard to write, it should be hard to read!- Do. Or do not. There is no try!
Forum List • Thread List • Refresh • New Topic • Search • Previous • Next First 1 Last
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Fri 2024-3-29  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0