|
you wrote "By subclassing and using OWNERDRAW can be one solution"
can u give me some light with the help of coding
you wrote Why do we have to worry about
i want to develop an application for touch screen so i need the scroll size same to fingure tip
malik
|
|
|
|
|
Ok, I didn't thought about it. Is a good reason
Sorry, I don't know how to do it, but This article[^] and This article[^] can maybe help you
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: By subclassing and using OWNERDRAW can be one solution
How? ASFAIK Owner draw allows only to draw the Client area of list control. Scroll bar lies in the non client area. So I think it is not possible with the owner draw.
|
|
|
|
|
Is it not possible to override and put a bigger user defined scrollbar over the other one? Then use it as you want?
On the other hand, I have given him the links to two articles, the XListCtrl and the ResizingControlBars of Hans Dietrich. I guess are the best examples to achieve it
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
Nelek wrote: Is it not possible to override and put a bigger user defined scrollbar over the other one?
Actaully we cannot overide. I check the link you suggested him. In that also they some how hide the original scroll bar and puts our own scroll bar.
When i tried, had a problem that some part of the last column gets under the vertical scroll bar. But this is not a problem if the text in the last column is a little less than the column width.
|
|
|
|
|
I think that this is easily avoidable setting the width of the column higher than the text that is going to contain with LV_COLUMN lvCol; i.e. lvCol.cx = nDesiredWidth; when inserting the items.
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
No no you didnt understand what I mean. Setting the width of the column is not the pblm here
try this.
Create a list control with a 250 pixel wide
insert a column with width 200 pixel.
Reduce the client area of list control by 100 pixel( using OnNcCalcSize() function)
You can see the effect. Now you can no more reseize the column using the mouse.
|
|
|
|
|
I didn't try the CListCtrl so far to find this issue In my application the CFormView that contains the CListCtrl must not be resized, so I have not that problem
Greetings.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
|
|
|
|
|
The width can be increased if you enable the flat scroll bar in the list control.
check the LVS_EX_FLATSB style,
FlatSB_EnableScrollBar()
FlatSB_SetScrollProp()
But MSDN says "Flat scroll bar APIs are implemented in Comctl32.dll versions 4.71 through 5.82. Comctl32.dll versions 6.00 and higher do not support flat scroll bars".
|
|
|
|
|
hi
thank u very much i have implimented ur approach,but i also want to color the scrollbar.I use function
FlatSB_setScrollProp(handle,BACKGROUNDMACRO,color,BOOL)
but color is not appear,Am i missing something,please reply
malik
|
|
|
|
|
rajneshmalik wrote: BACKGROUNDMACRO
Where is that flag?
U can chnage only the channel color of the scroll using FlatSB_SetScrollProp().
|
|
|
|
|
Hi,
I am new to Windows programming.
I am trying to uniquely select and double click an item in the list view (SysListView32) in third party software. This task is somewhat similar to MyProgram trying to double click an item in a ControlPanel-like list view.
To accomplish this I am sending a LVM_FINDITEM message to get the item index of the item to be double clicked.
LVFINDINFO lvfi;<br />
ZeroMemory(&lvfi, sizeof(LVFINDINFO));<br />
lvfi.flags = LVFI_STRING;<br />
lvfi.psz = (LPCTSTR)"Item Name";<br />
<br />
int itemIndex = ::SendMessage( aControlHWnd, LVM_FINDITEM, (WPARAM)(int)(iStart), (LPARAM)(const LVFINDINFO *)(&lvfi));
This send message is causing a runtime error. After going through some forums and message boards I found that this is due to one of the message parameter which is a pointer to a structure, as you cannot pass a pointer-to-memory to another process.
Now I would like to know how to custom marshal this message to the other process?
OR
Any alternative solution to uniquely select and double click an item in the list view.
Any idea or solution to this problem is greatly appreciated. Thanks in advance.
|
|
|
|
|
scody wrote: uniquely select and double click an item in the list view.
So you need to get the list view item when the user double clicks, right?
|
|
|
|
|
No, I need to double click a list view item. Sorry, if it is confusing.. For example, if I want to double click an item named "Item Name", I should be able to click it irrespective of wherever it is positioned in the list, so I called it uniquely(that’s an exaggeration!) select.
|
|
|
|
|
scody wrote: I need to double click a list view item.
Have you added the double clicked event on the listview?
After a list view item being double clicked, what will the program do next?
|
|
|
|
|
I dont have access to the code of the third party software where I am double clicking the item. I just want to invoke the item to perform some task, as if some user is double clicking the item. To cut short I am trying to test the GUI of the third party software.
|
|
|
|
|
I think one possible reason that this doesn't work is that your LVFINDINFO is declared within your application's memory, so other applications won't see this.
|
|
|
|
|
|
And this is possible without any elevated user rights?
Sorry I must leave, the "Security Breach"-Alarm jut got off.
Let's think the unthinkable, let's do the undoable, let's prepare to grapple with the ineffable itself, and see if we may not eff it after all. Douglas Adams, "Dirk Gently's Holistic Detective Agency"
|
|
|
|
|
Hello! everyone!
I had a problem want to be resolved in time!
I make an application in full screen. And I use some class derived from CStatic use to draw some characters and pictures. Now when I change some other window's z-order before this window and then change this window to top, only some part of the class derived from CStatic will be displayed, not all. I want to know how to display all window in this situation?
Thx!
John
|
|
|
|
|
So your problem is how to draw on your window even if other dialogs or windows are on top of it?
|
|
|
|
|
Yes. That's my meaning.
Thx!
|
|
|
|
|
How do you draw to your window? Do you use CDC?
|
|
|
|
|
yes. I use CDC to draw some bitmap file in window. The problem is: I take some other window on this window and then take them below. The area occured by other window is be drawn. The other area isn't be drawn and still be blank. That's all. I hope u and some others can tell me how to resolve it.
Thx!
|
|
|
|
|
I experienced the same thing before. What I did was I made the CDC handler for the window into a global variable. Try that first if it works.
|
|
|
|