I got this working ! mistake was, I did not use memset(&lvItem,0,sizeof(LVITEM));
in the below code snippet LVITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM; lvItem.iItem = 0; lvItem.pszText = ""; ListView_InsertItem(m_hWnd, &lvItem); ListView_SetItemText(m_hWnd, 0, 1, "Properties")
:-D
thammadi
Posts
-
Items not visible in ActiveX ListCtrl -
Items not visible in ActiveX ListCtrlremoved
LVS_OWNERDRAWFIXED
, items still not visible. -
Items not visible in ActiveX ListCtrlI removed
LVS_OWNERDRAWFIXED
, even then the inserted item is not visible. -
Items not visible in ActiveX ListCtrlHi All, I have an activex control subclassed from SysListView32. I wanted it to appear and work like the property grid the we see in VS 2003/2005. I was able to get the look right. The problem is even though I added items using ListView_InsertItem, these items are not visible on the list control. In PreCreateWindow, I am setting the style like this: cs.style |= LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_OWNERDRAWFIXED; In OnCreate, I am adding the columns and a single item like this: ListView_InsertColumn(m_hWnd, 0, "Empty"); ListView_InsertColumn(m_hWnd, 1, "Property Name"); ListView_InsertColumn(m_hWnd, 2, "Property Value"); LVITEM lvItem; lvItem.mask = LVIF_TEXT | LVIF_PARAM; lvItem.iItem = 0; lvItem.pszText = ""; ListView_InsertItem(m_hWnd, &lvItem); ListView_SetItemText(m_hWnd, 0, 1, "Properties") I also used OnCustomDraw, OnEraseBkgnd & MeasureItem methods to archive my look and feel. Please help !
-
How to implement font size change feature of Office 2007?For user selection trigger in combo box, check out this code project link: http://www.codeproject.com/KB/combobox/xtipcombobox.aspx[^] This article talks about Tooltips but you can use the same trigger functionality for your requirement. Hope this helps.
-
closing MessageboxThere is no timeout option for a MessageBox API. I would suggest use a dialog box, make it generic enough to be used. Use timer inside the dialog box. something like this: Call SetTimer(1, 10000, NULL) in CMsgBoxDlg::OnInitDialog() method. //10000 for 10 secs In timer method: void CMsgBoxDlg::OnTimer(UINT nIDEvent) { // TODO: Add your message handler code here and/or call default CDialog::OnOK(); CDialog::OnTimer(nIDEvent); } Add a public member function to accept message box string and caption. Use static control to display the provided string on the dialog box with a 'Ok' button. Hope this helps Thammadi
-
how to run the MS-media palyer component..I created a test application and I am using GetControls() method, which returns an object of class CWMPControls. This class has all the control methods like play, pause, stop etc. As I said earlier I am using WMP ver 11. I am not sure if the above class is defined for earlier versions of the WMP control. Try to upgrade your WMP to 11 and check it out. If it doesn't work out.. I'll share my test source code then.. Thammadi
-
how to run the MS-media palyer component..vasu_sri wrote:
i have mp3,avi and picture files . i have to show that files into my application like preview so..
Your requirement can be met by using Windows Media Player component for playing audio/video files. Follow the below steps: Create a dialog box application. Select Project->Add to Project->Components and Controls. Select Registered ActiveX Controls folder Select Windows Media Player component When you select, a confirm classes dialog box appears. Click "OK" Go to your dialog resource. Windows Media Player icon would be displayed on the controls selection view. drag drop the control onto your dlg box. Add a member variable for the control in the class wizard. Use 'SetURL' and GetControls() methods of the media player object for controlling the audio/video files (like play, pause, stop etc.) E.g m_MPlayer.SetUrl("D:\\Songs\\Xyz.mp3"); m_MPlayer.GetControls().play(); FYI: I am using Windows Media Player Ver 11 Hope this helps! :) Thammadi
-
Unwanted reuse of existing VC++ 6.0 instanceEven I am interested in knowing how :) Thammadi
-
MFC/Win32 Printing - setting page/paper size ?Check the following code project article http://www.codeproject.com/printing/printerorientation.asp I hope it helps
-
Opening a drive...need helpLook at following code project article http://www.codeproject.com/w2k/usbdisks.asp?df=100 I hope it helps.
-
pls help meHi, I tested the same code without crash. After 'if', are there anymore statements? Thammadi
-
usb devive nameprathuraj wrote:
how to get GUID or device name for usb device
Can you be specific with your requirement? Thammadi
-
dll [modified]In you client application, add this string (#include "yourATLDLL.rc") in View->Resource Includes->Compile-time directives edit box. Next, in Project Settings->Resources tab, under "Additional resource include directories:" edit box, add (..\foldername) where your "ATLDLL.rc" file is located. Hope this helps. Thammadi