|
zouchao1112 wrote: I draw figure A in OnPaint() and figure B in DrawItem(),
Why?
zouchao1112 wrote: If I delete the WM_PAINT message handler, B is presented.
Naturally, someone has to send the draw item message, since you have overridden WM_PAINT you are the one who should do it.
|
|
|
|
|
Hi all,
How can I change the height of the header in list control having report view?
Thank you.
- NS -
|
|
|
|
|
NS17 wrote: How can I change the height of the header in list control having report view?
Doesn't sub classing of header control help?
|
|
|
|
|
But my problem is if I reduce the height the list control items will not be shifted to up. So there will be blank space between header control and first list item.
- NS -
|
|
|
|
|
NS17 wrote: But my problem is if I reduce the height the list control items will not be shifted to up. So there will be blank space between header control and first list item.
This[^] thread has some suggestions you can try them.
|
|
|
|
|
What if you set a big font to the list control?
nave
|
|
|
|
|
I can't change the font size for this.
-- modified at 3:10 Thursday 5th April, 2007
- NS -
|
|
|
|
|
|
Thank you. I think it will help me...
- NS -
|
|
|
|
|
Hi,
i have a problem like you, but not for the header control, i need to change the list's row high,
sometimes i need to set a new high for the row in runtime, mean, any time over a buttonklick to set
new row hight for some rows, not for all, lets say, rows wit specified text should have row high 0(invisible), did you ever work on them?
tnanks
termal
|
|
|
|
|
Mm... I had to do such a thing before. At that time I did simply create a new control from CWnd...
- NS -
|
|
|
|
|
Hi all.
I have ToolBar and I wont to see it in my dialog.
How I can add this toolbar to my dialog window?
|
|
|
|
|
You will get a lot of samples for this in CP.
see this[^]
- NS -
|
|
|
|
|
|
david bagaturia wrote: How I can add this toolbar to my dialog window?
Use RepositionBars .
|
|
|
|
|
|
Hi,
i created 2 projects. i was able to run the projects sucessfully.
than i replaced the source and header files of one project with newer version.
compilation is sucessfull.
but when i run --LINK : fatal error LNK1104: can't open File 'fskaren.lib' .
where fskaren is one of the project name.
building of fskaren is sucessfull.
please guide me
Help Ever Hurt Never
|
|
|
|
|
sonavi wrote: but when i run --LINK : fatal error LNK1104: can't open File 'fskaren.lib' .
where fskaren is one of the project name.
building of fskaren is sucessfull.
Have you mentioned the library's path in Additional library path.
Goto Project Settings->Link->Input->Additional library path .
|
|
|
|
|
Hello all,
I am having a list control(Report style),in that list control i have number of item. When i select a particular row and click on a button particular thread is started and if i select a different row and press the button same thread is started again.....following the same process i can start any number of same thread.
Now my problem is to end the particular selected thread.
i start thread using this line of code
pThread = (CMyThread*) AfxBeginThread( RUNTIME_CLASS CMyThread),THREAD_PRIORITY_NORMAL,NULL,CREATE_SUSPENDED,NULL);
and when i use this line of code to stop a thread it stops the last thread which is executing...
pThread->PostThreadMessage(WM_QUIT, NULL, NULL);
Can anybody solve my problem
Thanks in advance..
|
|
|
|
|
You need to keep the pThread corresponding to each row in list control. List control allows you to keep a usedefine DWORD value corresponding to each row using the funtion CListCtrl::SetItemData()
Suppose you started a thread for item 1 and you got a pointer pThread of type CWinThread. Keep that pointer in the 1 st row
m_list.SetItemData( 1, (DWORD)pThread);
So when you want to terminate the thread corresponding to the row 1 just use
CWinThread *pThread= (CWinThread*)m_List.GetItemData( 1 );<br />
if( 0 != pThread )<br />
pThread->PostThreadMessage(WM_QUIT, NULL, NULL);
nave
|
|
|
|
|
how to create right button click pop menu for list view control. i have to display a popup menu when the user right clicks the mouse in list view. how to do this. pls help me.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
|
handle the NM_RCLICK message of the list ctrl. In that function, load the menu and pop it up
void MyDlg::OnRclickList1(NMHDR* pNMHDR, LRESULT* pResult) <br />
{<br />
CMenu PopUpMenu;<br />
PopUpMenu.LoadMenu( IDR_MENU1 );<br />
CPoint pt;<br />
pt = GetCurrentMessage()->pt;<br />
PopUpMenu.GetSubMenu( 0 )->TrackPopupMenu( TPM_LEFTALIGN, pt.x, pt.y, this, 0 );<br />
*pResult = 0;<br />
}
nave
|
|
|
|
|
ok i have to use the options in windows explorer. ie when we rightclick in explorer it popups a menu with view, arrange by icons etc. i have to show like this. whether is there any options to use this directily form windows or we have to create of our own
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
deeps_cute wrote: whether is there any options to use this directily form windows or we have to create of our own
You have to implement it by your self.
deeps_cute wrote: when we rightclick in explorer it popups a menu with view, arrange by icons etc.
When you click on such menu whats actually happing is sorting a column in an order. List control partially help you doing this. Check the LVM_SORTITEMSEX message.
nave
|
|
|
|