|
I think you missed the forum.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I think this question depends to C#,Managed c++ and c++.
|
|
|
|
|
Well, if I need some help about writing C# code then I ask the C# forum. Am I wrong?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
No thats right because you are a professional member on the codeproject.
|
|
|
|
|
Hamid. wrote: because you are a professional member on the codeproject.
Well, you'll become soon, I suppose.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi 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 !
|
|
|
|
|
thammadi wrote: cs.style |= LVS_REPORT | LVS_NOCOLUMNHEADER | LVS_OWNERDRAWFIXED;
if you specify LVS_OWNERDRAWFIXED , you have to handle the DrawItem() function. In your case since your not handling the owner draw, remove the LVS_OWNERDRAWFIXED style.
|
|
|
|
|
I removed LVS_OWNERDRAWFIXED , even then the inserted item is not visible.
|
|
|
|
|
Whats the return value of ListView_InsertColumn and can you see items if you remove LVS_OWNERDRAWFIXED?
|
|
|
|
|
removed LVS_OWNERDRAWFIXED , items still not visible.
|
|
|
|
|
I got this working !
mistake was, I did not use memset(&lvItem,0,sizeof(LVITEM)); in the below code snippet
LVITEM lvItem;<br />
lvItem.mask = LVIF_TEXT | LVIF_PARAM;<br />
lvItem.iItem = 0;<br />
lvItem.pszText = "";<br />
ListView_InsertItem(m_hWnd, &lvItem);<br />
ListView_SetItemText(m_hWnd, 0, 1, "Properties")
|
|
|
|
|
Hi
whats the difference between createprocess and shell execute?
|
|
|
|
|
When you use of createPRocess it makes a new process and a thread for it and new process has a handle that you can use of it that this handle has PROCESS_ALL_ACCESS access with ShellExecute you can execute any command.
|
|
|
|
|
Documentation isn't (CreateProcess [^], ShellExecute [^]) satisfactory?
Roughly speaking the former gives you more control, the latter is more user friendly.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
CPallini wrote: Documentation isn't (CreateProcess [^], ShellExecute [^]) satisfactory?
I've always wondered how you get those links.
Nobody can give you wiser advice than yourself. - Cicero
.·´¯`·->Rajesh<-·´¯`·.
Visual C++ MVP
|
|
|
|
|
Rajesh R Subramanian wrote: how you get those links
Drugz help.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
Is there a way to only have the days (1-31) visible in the calendar Control?
Thanks,
jayjay
|
|
|
|
|
I guess you would need to write your own control for this...
or see if CMonthCalCtrl::GetMinReqRect suffice your needs
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hello
i programing the code && design the interfaces
then , connect the programing with db "store the results in db"
then connect the db with interface and appeare the results on edit boxes in the interface
now , we want excute the programing code when click specific button .so, we use this function :
ShellExecute(this->m_hWnd,"open","proto1.exe","","", SW_SHOW );
when we run the interface and click the button excute the programing code"proto1.exe"
but the result false . the results diffrent about the results that appere when excute the file separetly on console also the data base some time doesn't update .so, the results itrated
also , the same copy from proto1 that deal with db and interface when take it in other place provide the same false results . althogh , ather copy of ptoto1 that dosn't deal with db and interface work very good
note , in proto1 code read from 2 files and these files important to programing the code and the results depod on them
in interface , the user do prowse and select 2 files . these file appear in edit boxes then stored in 2 other static files"in each chose for user change the content of files" that the proto1 read from them
i hope knowing why the results appearing false and db does not change
|
|
|
|
|
Could you provide, please, an alternative question?
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Hi all,
first of all i am using WTL but since its similar to mfc i am posting it here. I was helped here before about NOTIFY_HANDLER for WTL so that the code can monitor everytime a change has been made to my treeview and created this function:
LRESULT CMainDlg::OnSelChange(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
pNMTreeView = (NMTREEVIEW*)pnmh;
Select = pNMTreeView->itemNew.hItem;
return 0;
}
I just want to know how I can make a version of this for a combobox change. What can i use for a combobox? If NMTREEVIEW is for treeview what is for combobox control? Select is a CTreeItem what can i use for that?
Is this still applicable:
NOTIFY_HANDLER( IDC_UPDATEDAY, TVN_SELCHANGED , OnSelChange )
Thanks,
Jayjay
|
|
|
|
|
monsieur_jj wrote: I just want to know how I can make a version of this for a combobox change. What can i use for a combobox? If NMTREEVIEW is for treeview what is for combobox control? Select is a CTreeItem what can i use for that?
Is this still applicable:
NOTIFY_HANDLER( IDC_UPDATEDAY, TVN_SELCHANGED , OnSelChange )
Selection change notification for a combo is CBN_SELCHANGE, CBN_SELENDOK. The latter is sent when selection change becomes permanent, and the former is sent when user is changing the selection using arrow keys/mouse but new selection is not yet permanent, also called if the selection becomes permanent (bit of live action).
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
modified on Thursday, July 3, 2008 11:47 PM
|
|
|
|
|
Nibu,
I tried that CBN_SELCHANGED however it doesnt call my OnSelChange if ever a selection change has occured. this is my code
NOTIFY_HANDLER( IDC_UPDATEDAY, CBN_SELCHANGE , OnSelChanges )
LRESULT CPrefDlg::OnSelChanges(int idCtrl, LPNMHDR pnmh, BOOL& bHandled)
{
pNMCombobox = (NMCOMBOBOXEX*)pnmh;
pNMCombobox->ceItem.iItem;
return 0;
}
It doesnt even go there. What seems to be the problem
is that right?
Thanks,
Jayjay
|
|
|
|
|
monsieur_jj wrote: What seems to be the problem
is that right?
monsieur_jj wrote: NOTIFY_HANDLER( IDC_UPDATEDAY, CBN_SELCHANGE , OnSelChanges )
Is IDC_UPDATEDAY id of the combo or the tree? From your OP it looks to me as the tree id.
Nibu babu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
Its an ID of a combo-box control
|
|
|
|