|
It seems that the focus stays on the control which had the focus before the click. Another strange thing about the CEdit Control if I strike TAB we do not go to the next control and we have a bip.
I am perfectly sure that the focus is not set to another object on sigle mouseclick
|
|
|
|
|
Hi everybody
I have to show a list of values in a list in different columns.
There is a simple way to show them right aligned?
Ex
YEAR PRICE BOYS GIRLS E.T.
1992/1993 200 5 4 7
1993/1994 3.000 27 45 126
Thanks in advance.
Best Regards
Dr. Pi
|
|
|
|
|
Sorry the example looked good in the editor but not in the final message
Dr. Pi
|
|
|
|
|
If you want the columns right aligned, specify LVCFMT_RIGHT for the nFormat parameter of the InsertColumn function. This will work nicely for all columns except the first one. For some reason, you can't right align the first column I don't think.
YourListControl.InsertColumn( 0, _T("Column0"), LVCFMT_RIGHT, 100 );
Chris Richardson
C/C++ Include Finder[^]
|
|
|
|
|
You can, but you have to set the style to right align after you have created the column.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|
|
I'm trying to make a Winamp plugin (Win32 DLL) and a text-only one will compile just fine. Whenever I add any resource script to it, however, I get this error:
Linking...<br />
.\Debug\script1.res : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt<br />
Error executing link.exe.<br />
|
|
|
|
|
I'm trying to find out if there's a way to leverage the "Searching" progress indicator in XP. When you search for files in Exporer displayed the Luna interface, you get a little wrap-around progress indicator with 3 gradient filled boxes. It basically uses a WM_TIMER message to update the box positions.
Spy++ tells me that this the window class is SA_Progress, but a Google search gives me only 1 newsgroup comment. I know it's trivial to implement, but I'd like to conform to the active theme colors and shapes, and the documentation for GetThemeColor isn't exactly definitive (or existant). Any suggestions? Thanks.
|
|
|
|
|
|
Check out CListCtrl::GetTopIndex and CListCtrl::GetCountPerPage. You should be able to calculate the last visible item this way. Cheers.
|
|
|
|
|
|
Hi,
I'm trying to turn a bitmap on and off (if it were a CWnd, I would use CWnd::ShowWindow(SH_HIDE) ) How can I do this?
Basically, here is what I will have:
I will have "layers" of bitmaps in one rectangular area. I am a little familiar with device contexts and will try to associate each layer with it's own device context.
When I want to Show/Hide a layer, I will operate on that specific device context.
Each layer will have a unique color used -- there is only one color used in drawing on that layer.
Are there any suggestions on how I can programmatically turn on/off a specific layer?
Thank you very much!
Johnny
|
|
|
|
|
|
If you have no more than 8 layers, just use an 8 bit deep
bitmap-- treat it as a paletted image. Generate the palette
on the fly depending on the colors of the layers, their
transparency, order, etc. Then blit to the display using the
generated palette. If you have more than 8 layers, then
you can do the same but your original bitmap will not be
compatible with gdi as is-- use it to construct a final
image and blit that to the display.
|
|
|
|
|
This is in the lines of what I was looking for. I'm adapting the Oscilloscope project in CP's
"http://www.codeproject.com/miscctrl/oscope.asp" by Mark C. Malburg
and he uses bit blit-ing.
I will be putting 5 (maybe 8 max) plots on the same grid. If the user wants to turn off a plot(s) then that is when I want to do my business.
Any more suggestions/help? Thanks all!
Johnny
|
|
|
|
|
Make sure when drawing into the layered bitmap,
to use the R2_MERGEPEN raster op so that when
drawing with a pen designed for one layer you
aren't obliterating the others.
|
|
|
|
|
|
Hello all,
I want to test the state of mouse buttons in inside MouseMove handler .
I suppose i must work with Wparam or Lparam but how ?
thank you in adavance
|
|
|
|
|
afx_msg void OnMouseMove( UINT nFlags, CPoint point );
is the prototype of the MouseMove handler in CWnd (MFC)
In this:
nFlags
Indicates whether various virtual keys are down. This parameter can be any combination of the following values:
MK_CONTROL Set if the CTRL key is down.
MK_LBUTTON Set if the left mouse button is down.
MK_MBUTTON Set if the middle mouse button is down.
MK_RBUTTON Set if the right mouse button is down.
MK_SHIFT Set if the SHIFT key is down.
if (nFlags & MK_LBUTTON)
{
// Left mouse button is down
}
if (nFlags & MK_MBUTTON)
{
// Middle mouse button is down
}
My article on a reference-counted smart pointer that supports polymorphic objects and raw pointers
modified 29-Aug-18 21:01pm.
|
|
|
|
|
O yes ! thx you !
it works great !
|
|
|
|
|
if (wParam & MK_LBUTTON) //left button down
if (wParam & MK_RBUTTON) //right button down
Joel Lucsy
|
|
|
|
|
Thx ! your solution is grat for PreTranslateMessage !
Thx again
|
|
|
|
|
Arf i have a problem ;(
Your solution works great when the view is derived from CView, but when is derived from CListCtrl it doesn't work !
You know why ?
Thx
|
|
|
|
|
I'm new to this. I want to be able to send a command from the client application to the server application. For example to call the one of the servers dialog box or menu item. Which calls do I need to do achieve this.
Thanks
|
|
|
|
|
Ok,
I don't know the official word for doing this, but in windows, if you have a box with text and the text spans further than what the box can display (i.e. on the taskbar at the bottom of the screen), if you hold the mouse over the box, a yellow box pops up displaying the full text. How would I implement this into a dialog control that i have? I have an input form with several static text boxes, which sometimes get overloaded because I fill them with more text than what the user can normally see.
Thanks,
Mike Mathers
|
|
|
|
|
Its called a tooltip. There are several classes available her on CP.
Note that for a static text control to have a tooltip, it must have a unique ID and have the Notify style set in its resources.
Roger Allen
Sonork 100.10016
Were you different as a kid? Did you ever say "Ooohhh, shiny red" even once? - Paul Watson 11-February-2003
|
|
|
|