What kind of controls are they(C1 & C2)? If you could be more specific what to do you want to achieve, its easier for people to help. Regards,
-- "Programming is an art that fights back!"
Have you tried GetLocaleInfo(LOCALE_ITIME)?
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
You may use the CListCtrl::GetTopIndex, 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]
this->CreateEx(WS_EX_TOPMOST,WS_CHILD | WS_VISIBLE |LVS_REPORT |LVS_NOCOLUMNHEADER|LBS_HASSTRINGS|LVS_EX_TRACKSELECT|WS_TABSTOP ,rect, pWnd,nID); this->SetWindowPos(&wndTop,0,0,0,0,SWP_NOSIZE|SWP_NOMOVE); // here I m setting this control on the top.
It's called profiling, a dynamic program analysis that every software engineer should know. See if it helps: CProfile - A simple class to do code profiling and tracing[^] /M
Chat in Europe :java: Now with 24% more Twitter
Dude, didn't some of us give the reply as well as the code to the exact same question you asked elsewhere? I too have given here. Why don't you try to work with them and not litter the forums with same questions.
...byte till it megahertz...
AbhiHcl wrote:
its nothing like that I hv not tried, but some where I stucked...
Then use the debugger to find out where.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
We don't do homework around here. You have been given enough hints of what to use and read up on. Try to get something wotking. If you then have problems, post your code and explain what does not work. Someone will try to help you out. Dave.
You should make greater use of the MSDN documentation. This page[^] explains the values in the DWORD and how they may be used to get the specific characters of your edit string.
It's time for a new signature.
Why don't use CDateTimeCtrl, which encapsulates the functionality of a date and time picker control. If its set to DTS_TIMEFORMAT it has a spin control and displays formatted time.
Well, then just paint a check mark (or whatever icon you'd like) in the beginning of the row if the item is selected. Edit: Another way of dealing with this is to use the font and change it to be underlined when hovered. That way the selection problem goes away.
home
See ItemFromPoint[^], as i already wrote.
> The problem with computers is that they do what you tell them to do and not what you want them to do. < > "It doesn't work, fix it" does not qualify as a bug report. < > Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
Have a look at my original reply: http://www.codeproject.com/Messages/3528108/Re-list-box.aspx[^] I gave you links to two good articles that should help you. It will take you a little while to read them, look at the code, try moving some of the code to your own program... Good luck, Iain.
I am one of "those foreigners coming over here and stealing our jobs". Yay me!
No, but here is the rough idea. 1. Create a new class derived from CListBox -> CHoverListBox. 2. Make it owner drawn (a window style). 3. Override DrawItem() and possibly OnMeasureItem(). You will need DrawItem since you will be changing the visual appearance of the control while hovering. 4. Add a message handler for WM_MOUSEMOVE, and in this handler figure out which item the cursor is over. Cooridnates of the mouse is supplied in screen coords, so you should convert them to client coords using CListBox::ScreenToClient(). Then use CListBox::GetItemRect() to find the hovered item. Set a flag for this item, and then call Invalidate(FALSE) to force a repaint. 5. Implement DrawItem() to look at the flag set, and paint the items accordingly. 6. Now you have a reusable class. 7. Write an article about what you did and post it on this site. Tip: Do not use CListBox::SetItemData() to set the flag, because the space is likely to be needed by the users of your control. Use a separate integer in your class instead.
home
When you use a control in a dialogue box AND describe it in the resource template you don't create it. You only use CWnd::Create (or overidden version) when you're creating the control outside of a dialogue box. So if you're using a dialogue box instead of calling Create set up the resource template and subclass the control using DDX_Control in DoDataExchange. Cheers, Ash PS: Just seen you response to Karsten, ignore this reply except for reference! PPS: It looks like you've already created the window when you called create. You're not calling it twice by mistake by any chance?