|
Hi Sorry for not explaining the problem..
Actually i m havin an application in windows explorer view.
Left view contains a tree view with various items,
Upon clicking an item in treeview , a form view appears in right window.
In one of the form view i m using an list control ..
I m trying the insert the column name in OnshowWindow or in Oncreate() windows.
But both of them throws assertion error.
Kindly go through the below code..
m_listctrl.SetExtendedStyle(LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES);
CRect rect;
m_listctrl.GetClientRect(&rect);
int ctl=rect.Width()/10;
m_listctrl.InsertColumn(0,"ORDERNO",LVCFMT_LEFT,ctl);
m_listctrl.InsertColumn(1,"MOLDNO",LVCFMT_LEFT,ctl);
m_listctrl.InsertColumn(2,"OD TYPE",LVCFMT_LEFT,ctl);
m_listctrl.InsertColumn(3,"ESTAB DATE",LVCFMT_LEFT,ctl);
Is ther property of the form view or the list control to be changed??
Any solutions will be highly appreciated.
|
|
|
|
|
hellogany wrote: But both of them throws assertion error.
Please understand, we cannot see your screen and we cannot guess what errors you are getting.
It's time for a new signature.
|
|
|
|
|
Hi
This is the error i get
Debug Assertion Error
f:\rtm\vctools\vc7libs\ship\atlmfc\include\afxcmn2.inl
Line 113
|
|
|
|
|
Unfortunately I don't have this source with VC++ Express so I cannot guess what the issue is. I suggest you step through with the debugger to try and see what is causing the assertion. Check the value of variables, pointers etc when the assertion is thrown.
It's time for a new signature.
|
|
|
|
|
When i try to debug , its gettin error on the below line in afxcmn2.dll
AFXCMN_INLINE DWORD CListCtrl::SetExtendedStyle(DWORD dwNewStyle)
{ ASSERT(::IsWindow(m_hWnd)); return (DWORD) ::SendMessage(m_hWnd, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, (LPARAM) dwNewStyle); }
My Doubt is
Can we drag the list control icon from the tool box and put in form view right..
Is there Any diference btwn the way of using list control in dialog box and form view??
Any Propetries Need to Be changed ?
|
|
|
|
|
From the above I would guess that your list control has not been initialised properly and does not have a valid m_hWnd property. I have not used MFC for some time so I cannot comment on the last question. However, as I suggested earlier, it may be better to use a CListView as your client window, rather than trying to use a list control inside a CFormView .
It's time for a new signature.
|
|
|
|
|
Well i m also havinn other control such as button,combo box,date time picker etc.,
Thts y i m going to formview rather than listview
Thanks
Gany
|
|
|
|
|
As I said before it's a long time since I have used MFC, but it may be that you should use a ListBox rather than a ListView to contain your entries. Other than that, I'm afraid I have no suggestions.
It's time for a new signature.
|
|
|
|
|
thanks for ur suggestions
|
|
|
|
|
Hi,
I want a progress bar in marquee style but it does not appear in marquee.
How to do that?
|
|
|
|
|
|
ok I did but I am getting problem:
I added manifest file to create marquee progress bar, now I want to add manifest file for UAC So I tried to combine both in single manifest file.
It working in Vista and Win7 but not in XP.
If I click on exe in XP, system gets restart.
|
|
|
|
|
|
Hi Folk,
I wanna create an application which should be run as a windows service. Application should receive HTTP request from the third party application. HTTP request hold xml data, i wanna parsing that and store it into local file. For above the constrains what type of application should i create using win32 or mfc?. Plz.. get me out from this confession...
thanks in advance
suzuuu
modified on Thursday, April 22, 2010 1:32 AM
|
|
|
|
|
Nor the Win32 or MFC, I better suggests you to use C#.net. It will be much easier to do that with C#.net. Also you can use MFC, if you want to do it.
|
|
|
|
|
Okay... should i use socket to receive http request?
|
|
|
|
|
Are you want to create your own http server?
|
|
|
|
|
I have no idea about server! But, my need is just receive HTTP request and parse xml then store it into local file. That's all
|
|
|
|
|
As I get you want to create server. Simple open a socket and start listening on a specified port.
for test
open internet explorer. type http://127.0.0.1:5000
5000 is port number on which server is listening request. It is changable but should be same on both server and client.
On server read socket.
|
|
|
|
|
TQ manish... Is there any specific socket for HTTP in windows? OR is there are any specific format to play with HTTP request through socket?
|
|
|
|
|
There is no specific socket for http.
|
|
|
|
|
Thank you very much for your reply...
|
|
|
|
|
|
|
Dear all,
I have a problem when using ParseDisplayName function to get ITEMIDLIST of USB Memory device. The scenario is: I insert USB into PC and catch an event by [OnDeviceChange] function, then I use ParseDisplayName function to get ITEMIDLIST of inserted USB memory, but it is failed.
This phenomenon only occur in Widows XP Service Pack 2, in Windows XP Service Pack 3, it doesn't happen.
Here is a code I use to get ITEMIDLIST by ParseDisplayName function(the input path is valid).
....
LPITEMIDLIST l_pIDL;
LPSHELLFOLDER pDesktopFolder;
if( ::SHGetDesktopFolder( &pDesktopFolder ) != NOERROR )
{
return NULL;
}
OLECHAR ochPath[MAX_PATH];
ULONG chEaten;
HRESULT hRes;
::MultiByteToWideChar( CP_ACP, MB_PRECOMPOSED, W2A(p_strPath), -1, ochPath, MAX_PATH );
hRes = pDesktopFolder->ParseDisplayName( NULL, NULL, ochPath, &chEaten, &l_pIDL, &p_uAttribute);
if( hRes != NOERROR )
{
l_pIDL = NULL;
}
.....
One more thing is: if I try to call this function again, and it will success.
But I don't know why I need to call it twice in Windows XP Service Pack 2.
If anybody knows this phenomenon, please help me make it clearly.
I'm looking forward to receiving your reply as soon as possible.
Thanks in advance.
nobitanha
|
|
|
|