|
I need to do the Zip/Unzip using the Unzip32.dll & Zip32.dll from VC++ SDK/MFC
Any one can suggest ideas..
Regards,
Prabhu
PRABHDURAI
|
|
|
|
|
|
Hi..
I am creating an ActiveX control..and I have to set the Threading Model to both
'afxRegApartmentThreading' and 'afxRegFreeThreading' in the function
'AfxOleRegisterControlClass' in VC++ 6.0
But, the compiler gives an error...."'afxRegFreeThreading' : undeclared identifier"...
I have checked in MSDN...this 'afxRegFreeThreading' is a valid parameter..
Whats wrong here?
...A Programmer may or may not be the master of the programming language grammar...
|
|
|
|
|
Hi All,
Actually i have made a worker thread n i want that thread should execute 2 times simultaneosly if a button is pressed. Only the thing i knw is multi-threading will be used...
How to do it?
I have done very basic progmming in threads
Can anybody help me in this.
thanxs in advance
|
|
|
|
|
Answer to your question :
Create the two threads by calling Afx begin thread twice.
Note before :
1. Both the threads should not share any data / resources.
2. if they share, its quite not possible to run them simultaneously(you can use synchronising techniques, but you will loose the "simultaneous" effect.)
regards,
haribabu
|
|
|
|
|
Hi Neha,
Here is the example of multi threading
{
HANDLE hr;
hr = CreateThread(NULL,0,(unsigned long (__stdcall *)(void *))WorkerThreadProc,param list,0,0);
}
//Thread function for starting 2 process.
UINT WorkerThreadProc(LPVOID Param)
{
// Process
}
|
|
|
|
|
Hi,
In my one application I ma having a MFC CDateTimeCtrl control. The requirement is that, the format of date and time of this control and the users local date and time should be same. Means if users format is 24hr clock my control should also display the time in 24hr format. I have following two questions regarding this.
1] How I can know that user changed the format of his time? (I can find the time change by ON_WM_TIMECHANGE message but what if user changed only format and not the time?)
2] How to get the current format of users local date and time?
Regards,
Hemant kulkarni
|
|
|
|
|
consider using COleDateTime.
COleDateTime::Format
CString Format( DWORD dwFlags = 0, LCID lcid = LANG_USER_DEFAULT );
haribabu
|
|
|
|
|
I want to devlop a project in VC++ through which i can get list of all hardware's
drivers & components as mike,monitor,printer,fax... list that is connected with that perticular system.I don't have much idea about this,but i worked on VC++.
So if somebody send me some dummy project on this or any link,plz forward me as soon as possible.
Thanks & Regards
Pankaj
|
|
|
|
|
|
Hi
I wanted to make CListCtrl editabe :
void CTestListCtrlDlg::OnDblclkList(NMHDR* pNMHDR, LRESULT* pResult)
{
POSITION pos = m_ctlList.GetFirstSelectedItemPosition();
m_ctlList.EditLabel(m_ctlList.GetNextSelectedItem(pos));
*pResult = 0;
}
void CTestListCtrlDlg::OnEndlabeleditList(NMHDR* pNMHDR, LRESULT* pResult)
{
LV_DISPINFO* pDispInfo = (LV_DISPINFO*)pNMHDR;
if(pDispInfo->item.mask == 1)
m_ctlList.SetItemText(pDispInfo->item.iItem, pDispInfo->item.iSubItem, pDispInfo->item.pszText);
*pResult = 0;
}
Everything is ok but after double click the edit box is placed at the first column in the selected row (but not selected column)! but I want it in user selected column.
Please help
|
|
|
|
|
I believe the listview control only provides built-in functionality for editing the label
(the column with the icon in report view).
|
|
|
|
|
Hi
I have to work with a MFC based application for File Transfer in VC++. I used CString and CSocket Datatypes. But they are not accessible. Compilation error is the result. I am using VC 6.0.
These are the errors...
'CString' : undeclared identifier
'CSocket' : undeclared identifier
No explicit classes were used by me. These Datatypes were used within a function. Whether this will cause any error?.
From some site I got information to include a header file afxsocket.h and call AfxSocketInit(NULL) on init() function. That also caused me with 2 more errors as; afxsocket.h cannot be opened and that AfxSocketInit(NULL) is an undeclared identifier. So I removed that.
pls tell me. what is the requirement?. Why does this happen?.
Regards and Thanks...
|
|
|
|
|
What type of project option you have selected while creating it ?It should be, "MFC AppWizard".
|
|
|
|
|
Yes. I selected MFC AppWizard(exe) option only.
|
|
|
|
|
For CSocket afxsock.h need to be included.
But there should not be any error for CString . As its declared in afx.h and included by afxwin.h .
|
|
|
|
|
If u are using MFC based appliction than i dont think so that error occur...but u may include Afx.h & AfxSock.h...may be it will work
Yes U Can ...If U Can ,Dream it , U can do it ...ICAN
|
|
|
|
|
Did you inlcude afxsock.h
|
|
|
|
|
Are you sure your program is MFC but see here[^] if helpfuls
|
|
|
|
|
Hi all,
Thank You all For Your Valuable Help. It worked.
Vichitra M
|
|
|
|
|
How it worked suddenly
|
|
|
|
|
Hi Anil,
I had to include afxsock.h header file. Actually, I was not aware of that file.
Vichitra M
|
|
|
|
|
Hi,
I want to derive a class in my project in which i am taking strings at runtime & want to format it in (BOLD,ITALIC,TAB,NEW LINE,COLOR)etc.
after first string ,the other string can be taken & required to be formated.
at the end all the strings are appended & whole text should be displayed
on richedit control with each string having its own format.
i.e if i am having RichText class & rs is object of it then
i should be able to do following ...
RichText rs;
rs << rs.Bold(rs.LoadString(IDS_SUMMARY_SRCTITLE))
<< rs.Newline
<< rs.Italic(rs.LoadString(IDS_SUMMARY_SRCTITLE))
<< rs.LoadString(IDS_SUMMARY_SOURCE) // string table
<< rs.Tab;
& then display it in rich edit by ..
m_richedit.SetWindowText(rs.str());
If anybody knows how to do it Please Help me for it.
Thanks,
swapnil.
|
|
|
|
|
I think you asked like this question and did you see my link;)
|
|
|
|
|
now i want to append the string in formatted text.
Thanks,
Swapnil.
|
|
|
|