|
Thanks alot - actually you answerd 2.b. in your answer - so i have all i needed !!!
Thank you,
Ariel.
|
|
|
|
|
How could I hide scrollbar (not disable) in CScrollView?
|
|
|
|
|
change the window style specifying NOT WS_VSCROLL or NOT WS_HSCROLL
either do it in the CreateWindow() function or apply it afterwards in response to some event the user may generate
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Is there a way a CListCtrl in ReportView mode will select all the row when selecting one and not only the first iSubItem ???
Waht i mean is that when selecting rows in Report view mode only the first column of this row is selected. I want to be able to select all the row (all the SubItems) in the same click on the row.
Can this be done ?
Thanks in advance,
Ariel.
|
|
|
|
|
Yes, you can select the whole row.
DWORD dwStyle = pList->SendMessage( LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0 );
dwStyle = dwStyle | LVS_EX_FULLROWSELECT;
pList->SendMessage( LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle );
Daniel
"das leid schlaft in der maschine" -Einstürzende Neubauten
|
|
|
|
|
Hi there,
Thanks alot you saved me alot of time till i would have figured this out.
Thanks Again,
Ariel.
|
|
|
|
|
You can do it Daniel's way or,
// Set the listview style. Add features that you like.
List.SetExtendedStyle
(
m_fList.GetExtendedStyle()
| LVS_EX_FULLROWSELECT // Select all items when clicked
| LVS_EX_GRIDLINES // Draw gridlines. I like them.
| LVS_EX_TRACKSELECT // Hover if you wish etc.
);
Probably both the same. The secret is the Extended Style business. I'm just passing on what I was told on this site. And it works too.
|
|
|
|
|
Hi there,
First, Thanks alot for the answer it was really helpful and it have a nice view this way.
The only thing i don't understand whats the : "| LVS_EX_TRACKSELECT // Hover" ?
If you can tell me that too i'll be very thankfull,
Ariel.
|
|
|
|
|
Look up "Extended list view styles" in the Visual Studio help index. You can do a lot of interesting things in a list view control.
LVS_EX_TRACKSELECT
Version 4.70. Enables hot-track selection in a list view control. Hot track selection means that an item is automatically selected when the cursor remains over the item for a certain period of time. The delay can be changed from the default system setting with a LVM_SETHOVERTIME message. This style applies to all styles of list view control. You can check whether or not hot-track selection is enabled by calling SystemParametersInfo.
|
|
|
|
|
Thats Great - Thank you very much i really apritiate all the help.
Ariel.
|
|
|
|
|
It's so important. Someone HELP !!!
|
|
|
|
|
Welcome to hell. You'll find most of the MSDN documentation on ActiveX controls is geared to VB. Apparently we VC people are smart enough to work it out for ourselves. Sadly, I know this from using FlexGrid, not DataGrid, so I don't know how much help I can offer, but the online help says
If a cell's text is too long to be displayed in the cell, the text wraps to the next line within the same cell. To display the wrapped text, you must increase the cell's Column object's Width property and/or the DataGrid control's RowHeight property. At design time, you can change the column width interactively by resizing the column or by changing the column's width in the Column object's property page.
Actually, it's pretty easy if you have a look around. Make sure you include "Column.h" and "Columns.h" ( but I bet you already did anyhow )
Then, do this:
// Grab the columns
CColumns cols = m_DataGrid.GetColumns();
VARIANT v;
v.vt = VT_I4;
v.lVal = 0; // this is the column I want
CColumn col = cols.GetItem(v);
// Now you have a column, you can call any of the methods in CColumns on it.
col.SetWidth(100);
I just created a dummy project and this definately works.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
How do i change the font and the size of the text in a button???
Thank you.
|
|
|
|
|
By doing this
m_Button.SetFont(CFont*,true);
There is a GetFont as well, so you can set one button to have the same font as another using ( example from my code )
m_BPPLabel.SetFont(m_Ext->GetFont(),true);
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I tried researching these issues, but haven't found much to help me. So, I'm reluctantly asking here (*sigh* sorry lauren )
1. I have a bunch of textout->string stuff in my CMyView::OnPrint. The results are fine on machines with small font settings on their display properties. My question is, how do you compensate for those who have large fonts on? I have an idea on how to do it, but I'd rather hear other opinions.
2. I have a CFormView (SDI) view that displays a second dialog when the user double-clicks on a control in the parent window. There are text boxes that the user enters numbers into, and I have added a class that just accepts numbers and not text. On "OK" the data gets spilled into the control in the view, but I get an assertion error, and the debugger points this line in wincore.cpp:
void CWnd::GetWindowText(CString& rString) const
{
-> ASSERT(::IsWindow(m_hWnd));
.
.
.
}
I think I understand what's happening here, but how to fix it is where I need a point in the right direction.
Thanks in advance.
|
|
|
|
|
not sure about 2, but here's how i handle 1:
CPoint textSize;
textSize.y = fontPixels;
pDC->DPtoLP(&textSize, 1);
HFONT useFont = ::CreateFont( textSize.y, ....
i just specify the font size in pixels...
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Ok - I'll try 2... or at least a suggestion for 2...
The call stack will certainly help you here - alt+7 - you'll see where the call to the dead window was made if you track back a bit. I guess the dialog and its controls are gone before the call to GetWindowText, but I think its best to let you track it down rather than speculate on the circumstances.
|
|
|
|
|
It's simple - you can't call getwindowtext after you have destroyed the window. Instead, create variables to hold the data inside the dialog, then set them in OnOK and grab those variables from the calling class.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
rofl ... point taken
i would have answered both points as they have been
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Can someone suggest a method to use the internetsetoption of Wininet for setting the timeout properties of a wininet http connection handle
|
|
|
|
|
I am writing a CSocket server/client application and have found problems with sending data. The server recieves the CSocket, creates the CSocketFile, and initiliazes the CArchive appropriately. The program then reads a string from the archive, attempts to write it to a list control, and then calls the Close member function of CSocket. The Server program hangs after initializing the Archive and repaints slowly. If I close the client app however, the server resumes normal functions and displays the string appropriately. Am I calling the close function in the wrong place? Any other ideas? Thanks for any help.
Brad Chase
|
|
|
|
|
brad ... in the networking section of code project there a few examples of chat applications that use sockets ... might be good to check them over and see if you can spot what you're doing that they're not ... or visa versa
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
A few thoughts...
If you are doing a real C/S project, then leave MFC out of the server side part. If you are doing something trivial, it is not a problem.
That said, try to use CAsyncSocket instead, and wait for data to arrive, instead of jumping though so many hoops.
Also, try debugging the problem: Break the program when you start seeing the spin-like behavior.
-=- James.
|
|
|
|
|
Help:How to use VC++ to actualize the registration number's location of a car's digital image?
PLease help me,my Email: zx8@sina.com
Thank you very much.
|
|
|
|
|
as far as i know the automated speeding ticket type gizmos work in two parts ... a speed detector that detects your speed (geee i'm good huh?) and a camera that snaps your license plate ... the trick to most systems like this is that the camera is in a known position relative to the speed detector gizmo ... now given that most vehicles have a license plate in roughly the same area it isn't total rocket science to figure out where in the picture to look for a rectangular shaped object (an edge detection algorithm will help here) ... once you have the area of the plate it isnt then much more rocket science to have a stab at the contents of the area using a neural network to do the ocr ... we all know these systems work 'cos we all had tickets before no?
sheesh
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|