|
i have done that n that is working properly.
i could do this coz of demo of i got 1 class ie CBmpMenu.
|
|
|
|
|
Hi all
I would like to stop executing the
std::getline( std::cin, aString )
function from another thread
when getline is blocked waiting for user input.
A possible solution is to put the function into another thread
and stop this last when I need.
Instead of using another thread, is there some global
function or OS function that is possible to call?
I imagine since std::cin should be running in a OS
thread, right?...maybe some signal?
Thanks for your help
ManuStone
|
|
|
|
|
|
|
could any1 tell me how to put a back ground picture in a mfc dialog?
|
|
|
|
|
See here[^]
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
|
Please let me how to change the font of parent node and also how to make it BOLD in tree control.
Thanks in Advance
|
|
|
|
|
There is no TVM_SETITEMFONT message, and TVITEM has no font member - so you're going to have to roll your sleeves and do it yourself.
Or, there are plenty of articles on codeproject to do with owner draw tree controls.
It's a shame, though - I'd think font is quite a good extension to a tree view item properties. But it's not up to me!
Good luck,
Iain.
|
|
|
|
|
You can change the font with custom draw. Handle NM_CUSTOMDRAW and select a new font into the DC that you get with the message. Bolding an item is built-in, set the TVIS_BOLD style on the node (or you can just select a bold font when you handle NM_CUSTOMDRAW ).
|
|
|
|
|
I am trying to build this custom control - one of the child windows is an edit control and at one point it gets the focus (you can type in it) but the cursor has disappeared... what could cause this and how can I fix this?
Thanks in advance
modified on Monday, December 8, 2008 9:43 AM
|
|
|
|
|
That's the default behaviour of the edit field, you can see the same behaviour in a lot of programs, when you start typing, it hides the mouse cursor. Just run notepad and start typing...
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
No - the cursor disappears and does not come back... I can ensure you it's not the default behaviour!
|
|
|
|
|
Doesn't come back even if you move the mouse?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
No it's most strange - I can select text (and it gets higlighted) but there is no way of knowing where the cursor is (and the edit box is enabled, typing works!) . The only thing that works is to give the focus to another control (with mouse or tab) and then come back to it... strangest thing I have seen in a while!
|
|
|
|
|
3 questions:
1. Is the edit box customized in any way or is it just the default edit box? So did you overwrite any message handlers like WM_SETCURSOR or maybe WM_CHAR?
2. Does the cursor disappear when you start typing only or when you move the mouse cursor over your edit or maybe TAB to it?
3. Does this happen if you don't use your own cursor?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Thanks for taking the time to answer by the way!
1) No it's a simple CEdit... I did override WM_KEYDOWN (with PreTranslateMessage in the parent window)... I am doing a custom control where you can view some html and view the source code... and switch with a custom tab control from one to the other. Hoping I make sense...
2) The cursor disappears when the user clicks on the tab control... it hides the other window, displays the edit, gives it focus and voila - you can type but you have no idea where you are
3) Not sure I understand... do you want me to change the cursor? I certainly have not changed it manually so far
|
|
|
|
|
Ah, i think i see the confusement here, when i hear cursor i think of the mouse cursor, while you are talking about the caret, right? The little blinking line that shows where you type...Are you sure the control receives the WM_SETFOCUS message when it gets the focus?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
of course you're right - it's called the caret and not the cursor... my mistake. Yes the control does get the focus: when I type, it gets updated...
The temporary fix I have done is to give the focus to the tab control and then with a timer give it back to the edit... madness but at least it works... most bizarre
|
|
|
|
|
I have seen this happening too but i can't remember anymore what the problem actually was... If you hit the ALT key, do you maybe see the focus rect appearing on the tab control? I have seen strange behaviour appearing when setting the focus in an unapropriate time. I think you could simply use PostMessage to overcome this, so no need for a timer. Try posting (not sending) WM_SETFOCUS to the edit when it has been shown, or maybe post a custom message (like WM_USER) to the tab control which will set the focus on the shown page when it receives it. (I'd try the later aproach)
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
|
|
|
|
|
Are you using CreateSolidCaret. Does your custom edit control use an offscreen memory buffer for drawing?
|
|
|
|
|
No (CreateSolidCaret) and no (memory buffer)... it's is a simple MFC CEdit with no customisation whatsoever... it's simply a child window of a CWnd derived control!
|
|
|
|
|
In your initial comment you stated, "I am trying to build this custom cursor" and later you clarified that you meant "caret" so I naturally assumed you were creating a custom "caret" but apparently not so just ignore my question.
I apologize for misunderstanding.
|
|
|
|
|
oh thanks for pointing this out - I meant custom control - gee not my day!
|
|
|
|
|
I am new to WinCE environment.I need to connect to MS Excel database on windows XP from winCE device... Please give me some idea on how to do it...
|
|
|
|