|
thats not really a programming question as you've phrased it, so you could be flamed for posting it here .. but since Im in a good mood ....
you could do that with WinZip, or 7-Zip (free) http://sourceforge.net/projects/sevenzip/[^]
There are freebie toold with source around that will let you do this, if you want to do it programatically
'g'
|
|
|
|
|
may be u can use winzip or winrar and pass the file as command line. You can
do it with shellexecute function or createprocess..
If u can Dream... U can do it
|
|
|
|
|
|
Then you obviously need to buy or find a tar library, I doubt you'd want to be writing one.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Your application is a windows application right ? or dos?
anyway there are apis for starting an application from your application. if it is dos there are functions like system(<command>) , in windows there are functions like winexec, createprocess,shellexecute.
So call the decompressing utitiles like winrar or winzip from ur app.
Also u can find the registread application for a file from registry (may some api are there). In that u can invoke that apps.
[IF you have winrar installed there is an exe named unrar , check it out . ]
If u can Dream... U can do it
|
|
|
|
|
and maybe you could speak english well as well ;P
|
|
|
|
|
???
I'm sorry if i am making any trouble to someone, I apology to them.
|
|
|
|
|
i was saying that to krishnadevank.
but for your part, you should try to understand the answers you got instead of asking someone to write a full for you because none will. we're not paid to deliver working code, but to help others to succeed in there goals.
search the msdn for ShellExecute(), and search Winzip documentation for using it by command line...
|
|
|
|
|
Again i'm sorry!
It was never my intention to expect from anyone to write a code for me, i was only looking for help from those who encounter with this before and maybe let me know how they solved this!
Thanks to all!
|
|
|
|
|
josip cagalj wrote: I need to open "*.tar" folder...
Is there anything special about this folder, or does it just happen to have a .tar extension? If not, there's really no need to open it. Just establish the FTP connection, and transfer the file(s) in that folder like you would any other.
"A good athlete is the result of a good and worthy opponent." - David Crow
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
hi
I want to get an outside border in a Rich Edit Control using PARAFORMAT2 structure with PFM_BORDER set at the click of a button. The code is written as:
OnBorder()
{
CRichEditCtrl& RCtrl=GetRichEditCtrl();
PARAFORMAT2 PF;
ZeroMemory(&PF,sizeof(PF));
::SendMessage(RCtrl.m_hWnd, EM_GETPARAFORMAT, 0, (LPARAM) &PF);
PF.dwMask=PFM_BORDER;
PF.wBorderSpace=2000;
PF.wBorderWidth=5000;
PF.wBorders=32|0|0;
PF.cbSize=sizeof(PF);
::SendMessage(RCtrl.m_hWnd, EM_SETPARAFORMAT, 0, (LPARAM)&PF);
}
But I dont get the border.
Please Suggest.
Barna
-- modified at 4:38 Wednesday 2nd May, 2007
Barna
|
|
|
|
|
I haven't tried this, but what happens if you specify a border style instead of "none";
// Outside borders, 3/4 point style
PF.wBorders=32|(1<<8)|0;
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks for your response. Tried with your solution. But the problem still remais. The border does not appear.
Thanks
Barna
Barna
|
|
|
|
|
I tested this a bit.
Seems the RichEdit control (2.0+) supports the paragraph borders but doesn't/can't display them.
If you copy text from your control into Word, you'll see the borders.
That's as much as I know at this point
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks again for your response. Yes I tested this too and found what you wrote. If you look at PARAFORMAT2 structure in MSDN it is written "The wBorderSpace, wBorderWidth, and wBorders members are included for compatibility with Microsoft Word; the rich edit control stores the values but does not use them to display text. To use this member, set the PFM_BORDER flag in the dwMask member."
But how do I display this border. The thing is that then should I have to write sepearte code to draw a border?
Another thing is that if it (PARAFORMAT2) does support wBorderSpace, wBorderWidth, and wBorders but does not display, then how do programmers use this feature or in what context does wBorderSpace, wBorderWidth, and wBorders helps programmers.
Barna
|
|
|
|
|
BarnaKol wrote: But how do I display this border. The thing is that then should I have to write sepearte code to draw a border?
When I searched for answers on this, I got the impression that it was added for version 2 of the
RichEdit control but not implemented. The paragraph border settings are in the text but the
control doesn't draw them. Somehow I assumed they would be drawn in later versions of the control
but that is not the case, as you've seen. I'm on XP SP2 so my RichEdit control should be version
4+.
I guess the control has all the features of Word these days, but we can't use them. We have to
use Word
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
am using CMyBclass(for eg) derived from CButton Class from MFC and using DrawItem method for drawing own child controls.Except radiobuttons everthing is perfect till the time....but the thing is i am getting the controls drawn on a window perfectly....now i am getting the problem in handling that....i.e.I need to handle the radio button events ....CHECKED and UNCHECKED.....
....for that i need a Handle of Parent window...
I have options of GetParent() method...I am using like this....
CWnd *p =GetParent(); from where i am getting the handle of that....i want the functionality of radiobuttons to be in my derived class so i am doingn that....
Can Any one find the solution of controlling the radio button in derived class so that event handling can be done in that only....
This is what i am trying to get that handle//....
CWnd *pChild = NULL;
for (pChild=GetWindow(GW_CHILD); pChild; pChild=GetWindow(GW_HWNDNEXT))
{
if (pChild == pBtn)
{
((CRadioButtonEx *)pChild)->SetCheckStatus(false);
((CRadioButtonEx *)pChild)->Invalidate(TRUE);
}
}
Basically m derived class should able to handle the Events associated with the radio buttons....
Can any one know the solution....
|
|
|
|
|
Hi,
In my project I have a dialog(let say CMyDialog) which contains
several controls(buttons,edit boxs etc...).
My problem is that I need to catch the WM_KEYDOWN message in my dialog,but
when the dialog becomes active and receives focus,the first control in the dialog receives the focus,and therefor,the dialog doesn't receives the WM_KEYDOWN messages.
Is there any way to set the focus to the dialog only,without passing
the focus to the First control in the dialog?
Thanks,
With best regards,
Eli
|
|
|
|
|
You need to handle PreTranslateMessage() instead.
|
|
|
|
|
two ways (that I know):
1. subclass the first control and handle the WM_SETFOCUS.
2. PreTranslateMessage in the dialog and handle the WM_SETFOCUS...
Hope this helps.
-- modified at 3:02 Wednesday 2nd May, 2007
Oooops! I've made a mistake... SEND WM_SetFocus (if needed) and HANDLE WM_KEYDOWN... in the pretranslatemessage.
|
|
|
|
|
Joan Murt wrote: 1. subclass the first control and handle the WM_SETFOCUS.
But what if there are plenty of controls? And the user may click on anything, any time; thus setting the focus on a random control.
Joan Murt wrote: 2. PreTranslateMessage in the dialog and handle the WM_SETFOCUS...
Why to handle WM_SETFOCUS within the PreTranslateMessage() ? Won't you rather be handling the key strokes within PreTranslateMessage() ? I know the OP asked how to set focus to the dialog. If you were to suggest him something for that reason, fine. Otherwise I think handling the key strokes directly is straight forward.
|
|
|
|
|
Oooops! my mistake... SEND WM_SetFocus and HANDLE WM_KEYDOWN...
thank you I'll modify it immediately...
|
|
|
|
|
Handling WM_KEYDOWN in PreTranslateMessage() will suffice. No need to do anything with WM_SETFOCUS
|
|
|
|
|
PreTranslateMessage() in the dialog will catch keystroke messages that go to a control??
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Mark Salsbery wrote: keystroke messages that go to a control
That message has to go through PreTranslateMessage() and so, the answer is yes. Just give it a try.
|
|
|
|