|
Hi ,
Pressing Space bar does trigger the event.
The problem is Enter Key does not and the button does have focus.
Thanks,
Gayathri
|
|
|
|
|
GayathriNaveen wrote: The problem is Enter Key does not and the button does have focus.
Yeah it's happening here too. It's international .
But second time the button has focus it's working. Press tab and remove focus and then press Shift+Tab to shift back the focus. Now enter will work.
(Not the solution;P)
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
HI..
I am devloping an application for Window CE.NET device running on x86 board.I want to debug my program in my workstation(a window xp based pc)by conecting the target device through eVC++'s platform manager.HOW COULD I CONNECT THE TARGET DEVICE USING TCP/IP FOR WINDOW CE?
I have selected the startup server as manual server,then the platfom manager dialogg box gave some file names to be present in my target device and told to run a command line to run in my target device.I ahve searched for those files,ofcourse they are present there in my target device but that command line is not working in my target device.PLZ help me...
thanx in advance.
birajendu
CyberG India
Delhi
India
|
|
|
|
|
I derived a class from CAsyncSocket;
if i want to send data,
shall i use AsyncSelect(FD_WRITE) and send data in virtual function OnSend(int nErrorCode);
Or use Send(const void* lpBuf,int nBufLen,int nFlags = 0) directly
|
|
|
|
|
if you want ASync send then AsyncSelect(FD_WRITE) (only once)
followed by many Send to send as many data, if you dont want ASync Data Sending then AsyncSelect(FD_WRITE) is not required.
MSDN has very good doc on this, you should read that first.
-Prakash
|
|
|
|
|
How can I make a message when the number of charactors in the editbox reaches 3?
Thanks!
|
|
|
|
|
Handle the EN_CHANGE message sent by the editbox to it's parent window. Send a WM_GETTEXTLENGTH message to the editbox to check how many characters are in it.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote: WM_GETTEXTLENGTH
PJ Arends wrote: A question and An answer
He he funny.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Owner drawn wrote: An answer TO an Answer
Thats funny too.
-Prakash
|
|
|
|
|
|
I think you want to display a message box right?
So you can use EN_CHANGE handler for this purpose. And use GetWindowText(...)
to count the number of chars in the edit.
But this won't prevent the user from furthur inserting any chars in the edit.
But you can prevent this by subclassing the edit and handling WM_CHAR message. If the count in less than 3 then fine call the base class handler or else don't call it instead display a message box. This will prevent the user from inserting further chars.
Hope this is what you want.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
I'll assume you are using MFC, so if so you just need to write a function on the edit boxes EN_CHANGE event. The code insode the function would be something like this
{
// m_EditText is the CString that stores the edit text(whatever you called it)
if (strlen(m_EditText) > 3)
{
// Use other message box function and add correct handle if you know it
MessageBox(NULL, "My Text is to long", "Message Caption", 0);
}
}
I believe there are functions to get the size directly from the edit box in MFC but I don't like MFC so I tend to avoid it where possible.
-- modified at 23:05 Wednesday 4th January, 2006
|
|
|
|
|
Owner drawn wrote: But this won't prevent the user from furthur inserting any chars in the edit.
But you can prevent this by subclassing the edit and handling WM_CHAR message. If the count in less than 3 then fine call the base class handler or else don't call it instead display a message box. This will prevent the user from inserting further chars.
EM_LIMITTEXT
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
PJ Arends wrote: EM_LIMITTEXT
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
What I wanted was moving the focus of my keyboard to another place as soon as the number of charactors in the editbox reaches 3.
And I think what you told me can solve my problem.
Thanks a lot!
|
|
|
|
|
1, one window, can change the size, where use the SetWindowRgn()?
2, i want paint it gradient background, because the window can change the size, when the size is changed, i need redraw the background, how to do?
sorry, my english not good, can see and not can say.
|
|
|
|
|
HOW WHAT wrote: one window, can change the size, where use the SetWindowRgn()?
Hmm didn't get you.
HOW WHAT wrote: 2, i want paint it gradient background
You can use GradientFill function for this purpose.
HOW WHAT wrote: because the window can change the size, when the size is changed, i need redraw the background, how to do?
To redraw background on size change just handle WM_ERASEBKGND and return TRUE to indicate to the application that you have done the background drawing.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
thanks for your Reply.
1.i try in OnSize() used SetWindowRgn(),right? have other idea? my mean is the windows is small and SetWindowRgn it is small round, and the window is big SetWindowRgn it is big round.
2.Some time ago, i tried your method but when the window size change big, the background is confusion, the old background(1) still exist, other area redraw ok.
old size
|--------|-------|
| 1 | |
|--------| |
| |
| background |
|---------------| now size
BTW:i say the window can change the size , mean is the window flags had WS_MAXIMIZEBOX and WS_THICKFRAME
My english so bad, shame.
-- modified at 0:52 Thursday 5th January, 2006
|
|
|
|
|
Yeah it happens because the visible portion need not be painted again.
Try using CClientDC. This way you can paint the entire region.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Use METAFILE property.
rohini sharma
|
|
|
|
|
I would like to write a program which can browse the bitmap files in a predefined folder. I think I shall use a listbox. But how to display all the bitmap files image in the listbox instead of display the name of the files.
Please give me some suggestion!
|
|
|
|
|
An OwnerDrawn(not me;P) List Box.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Can you give me more hints about OwnerDrawn(not you) List Box.
Please help!
|
|
|
|
|
Articles galore in CP. Try one of them.
Love Forgives--Love Gives--Jesus is Love <marquee direction="up" height="50" scrolldelay="1" step="1" scrollamount="1" style="background-color:'#44ccff'">
--Owner Drawn
--Nothing special
--Defeat is temporary but surrender is permanent
--Never say quits
--Jesus is Lord
|
|
|
|
|
Use CImageList with ListBox?
Could you please give me more hints?
|
|
|
|