|
zahid_ash wrote: How can I zip only a file without zipping it inside a folder.
Isn't link i given to you last post related to Zip file is not working!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Thanks for the reply
It is working, but it ZIPs the file in a zip folder like file ABC.doc is zipped as ABC.doc in folder "ABC.zip" - Thanks again for the link
I want to know about to ZIP a file without ZiPPing it in a folder . Am i think a right idea may be my idea to zip in this way is not correct.
Or would it be come in compression category . Please guide / corect me
Thanks
Regards.
|
|
|
|
|
zahid_ash wrote: t is working, but it ZIPs the file in a zip folder like file ABC.doc is zipped as ABC.doc in folder "ABC.zip" - Thanks again for the linkI want to know about to ZIP a file without ZiPPing it in a folder . Am i think a right idea may be my idea to zip in this way is not correct.
First Tell me Which wrapper class are you using, secondly you can pass the name of doc file itself instead of passing the folder name while creating zip file!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I am a bit confused to use which one as wrapper class.
Could you please tell me the which is the right one - Thanks
Regards.
|
|
|
|
|
zahid_ash wrote: Could you please tell me the which is the right one - Thanks
both of the wrapper classes are good,you can use any of them( which ever you find easy to use)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
i need loop for my randomised number...so that all the list of randomised number can be listed in editbox...i onli getting the last randomised number..
<code>
void CConeverterDlg::OnEnter()
{
// TODO: Add your control notification handler code here
CString str;
// char str[13];
cEdit.GetWindowText (str);
//AfxMessageBox(myStr);
//tmStart = time(0);
CTime time=CTime::GetCurrentTime ();
CString strtime= time.Format ("%Y%m%d%H%M%S");
cEdit3.SetWindowText (strtime+"\n");
//cEdit2.SetWindowText (strttime+"\n");//;(str)
//cEdit2.SetWindowText (strttime+"\n");
string line(str);
//line.c_str (),100);
//fin.open("data.txt");
// cout << str<<endl;
for (int i=0; i<500; ++i)
{
random_shuffle(line.begin(), line.end());
// File << "Randomised: " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " : " << line << endl;
// File << " "<< endl;
// File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl;
// File << " "<< endl;
CString cStr(line.c_str ());
cEdit2.SetWindowText ( cStr + "\n");
cEdit2.SetWindowText ("Randomised: "+ cStr + "\n");
UpdateData (FALSE);
//tmEnd = time(0);
}
CTime time1=CTime::GetCurrentTime ();
CString strtti= time1.Format ("%Y%m%d%H%M%S");
cEdit1.SetWindowText (str);
cEdit1.SetWindowText (strtti+"\n");
//cout << tmEnd-tmStart << " seconds " << endl;
}
</code>
|
|
|
|
|
makaveli_07 wrote: for (int i=0; i<500; ++i) { random_shuffle(line.begin(), line.end()); // File << "Randomised: " << line << endl; // File << " : " << line << endl; // File << " : " << line << endl; // File << " : " << line << endl; // File << " "<< endl; // File << "Single Row: " << s << " " << s << " " << s <<" " << s << endl; // File << " "<< endl; CString cStr(line.c_str ());cEdit2.SetWindowText ( cStr + "\n"); cEdit2.SetWindowText ("Randomised: "+ cStr + "\n"); UpdateData (FALSE); //tmEnd = time(0); }
Please check this modified version of loop!
CString cStr;
for (int i=0; i<500; ++i)
{
random_shuffle(line.begin(), line.end());
cStr+=CString("Randomised: ")+CString(line.c_str ())+CString("\n");
}
cEdit2.SetWindowText ( cStr + "\n");
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi guys this is Rocky.
I m usin windows 2005 pocket pc SDK.
I want to save a msg in the drafs section on pocket pc.
plz guys help me out.
Thnx in advance .
Best Regards
Rocky Marrone
Rocky Marrone
|
|
|
|
|
Hi Guys this is Rocky.
I got stuck in a problem plz help me out.
i m using windows 2005 pocket pc SDK and 2005 emulators also.
I want to retrieve the full contact list of Outlook express which is stored in Microsoft's Windows Address Book.
Please guys help me out.
Thnx in advance.
Best Regards
Rocky Marrone
Rocky Marrone
|
|
|
|
|
hi Friends,
i want how to Load Dll Dynamically in win32 Application.
pls GUide ....
swathi
|
|
|
|
|
Hi,
Check this link
http://en.wikipedia.org/wiki/Dynamic_link_library
|
|
|
|
|
HINSTANCE hdll = ::LoadLibraryA(_T("your dll"));
Get function pointer=GetProcAddress(hdll,"your function");
FreeLibrary(hdll);
whitesky
|
|
|
|
|
|
Use LoadLibrary function
and use GetProcAddress function to get the address of the methods
The GetProcAddress API sucess only if the Dll exports the function as follows
__cdecl __declspec(dllexport) returntype function name (parameters,...);
because C++ Mangles the function names due to that GetProcAddress fails,to avoid that use C style definition of the function
Knock out 'T' from CAN'T ,
You 'CAN' if you think you 'CAN'
-- modified at 7:12 Thursday 18th May, 2006
|
|
|
|
|
HMODULE hModule = LoadLibrary("path of dll");
Get the function pointer(typedef return type
ex:- typedef int (*funptr) ("arguments");
funptr f1 = GetProcAddress(hModule,"function name");
f1("arguments");
r u from AP??
Regards,
Prashanth.v
|
|
|
|
|
1.Include the exported .h file(this file should contain the method declarations that u want to use) of the Dll file into your current application.
2.Copy and paste the .dll and .lib file into u r application \debug or \release folder.
3.Go to Tools->options->Directories and include the .lib and .h file paths.
Now u can call the methods of the dll as normal methods.
Appu..
"If you judge people, you have no time to love them."
|
|
|
|
|
It is a activex control,i want to use it to judge whether size of screen changed.
|
|
|
|
|
chybin wrote: It is a activex control,i want to use it to judge whether size of screen changed.
Handle WM_DISPLAYCHANGE Message!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
I cant find WM_DISPLAYCHANGE Message,this control have no message! I use VC++ 7.0.
|
|
|
|
|
chybin wrote: I cant find WM_DISPLAYCHANGE Message,this control have no message! I use VC++ 7.0.
you have manually add that in your application
i.e.
OnMessage(WM_DISPLAYCHANGE,OnDisplayChange)
Function Decalaration
LRESULT YOURCLASS:OnDisplayChange(WPARAM wParam,LPARAM lParam)
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hi,
I have a timer which was working proeprly before adding threads, now i have added thread funtion after that timer is not displayed on the dialog window can anyone tell me what is the cause .....
-------------------------------------------
BOOL CStatusDlg::OnInitDialog()
{
CDialog::OnInitDialog();
HANDLE hr;
hr = CreateThread(NULL,0,(unsigned long (__stdcall *)(void *))WorkerThreadProc,this,0,0);
return TRUE;
}
---------------------------------------------------
UINT WorkerThreadProc(LPVOID Param)
{
CStatusDlg* status = (CStatusDlg *)Param;
time(&lStartTime);
SetTimer(NULL,ELAPSED_TIMER, 1000, NULL);
INDX.startIndex();
return true;
}
------------------------------------------------------
void CStatusDlg::OnTimer(UINT nIDEvent)
{
// TODO: Add your message handler code here and/or call default
if(nIDEvent == ELAPSED_TIMER)
{
time(&lStopTime);
cteElapsedTime = CTimeSpan(lStopTime-lStartTime);
CString csElapsedTime;
csElapsedTime.Format("%02d:%02d:%02d",
cteElapsedTime.GetHours(),
cteElapsedTime.GetMinutes(),
cteElapsedTime.GetSeconds());
if(IsWindowVisible())
{
m_TIME.SetWindowText(csElapsedTime);
}
}
CDialog::OnTimer(nIDEvent);
}
-----------------------------------------------------------------
Regards,
Vinay Charan.
|
|
|
|
|
I think the thread does not know to which dialog the timer belongs.
try change:
SetTimer(NULL,ELAPSED_TIMER, 1000, NULL);
to:
status->SetTimer(NULL,ELAPSED_TIMER, 1000, NULL);
Michel Wassink
We must make user friendly software. Where are friendly users?
|
|
|
|
|
Hi Michel Wassink,
I tryed as u said i am getting below error
status->SetTimer(NULL,ELAPSED_TIMER, 1000, NULL);
error C2660: 'SetTimer' : function does not take 4 parameters
Error executing cl.exe.
|
|
|
|
|
Sorry, my fault.
choose between:
status->SetTimer(ELAPSED_TIMER, 1000, NULL);
or
SetTimer(status->m_hWnd,ELAPSED_TIMER, 1000, NULL);
Michel Wassink
We must make user friendly software. Where are friendly users?
|
|
|
|
|
Hi Michel Wassink,
It's working fine thank you very much..
I have one more problem with timer can u please tell me how to stop the timer???
timer which i have added does not stop.
|
|
|
|