|
I made no reference to the Add button.
When I remove an item from a list, I expect the "next" item in the list to be selected, but the Remove button to retain focus. That way I can click the Remove button quickly from the keyboard. If there are no more items in the list, the Remove button should be disabled and the focus should go to some other control (e.g., the listbox or the Add button).
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
You did refer to the Add button, when you quoted me:
[d3m0n] wrote:
I tried adding a m_pbtnAdd->SetFocus() to the OnBtnRemove function, but it makes no difference.
Why would you put focus on a control that has been disabled?
So I was just saying that the Add button is not disabled
However I do agree with what you say about the focus remaining on the Remove button until there are no more items left in the listbox. I will try and implement this. Good idea.
Cheers
d3m0n
|
|
|
|
|
You're right. The indirect reference was my bad.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi,
Does anybody know how to receive an SMS on PocketPC in C++?
Thanks
Good coding...
|
|
|
|
|
I'm designing a system that will interoperate with a Unix system. The Unix system is responsible for getting information to a Windows Service that I'll write. So far, we've whittled our choices down to two obvious options: sockets and file-drop-off.
Both scenarios have their advantanges and disadvanages. I'm leaning towards th file drop off as time is of the essense and it's much easier to simply set up a filesystem event to fire on a new file being created than to create a sockets server. I also believe that security is easier with files as Windows security will inherently be used as opposed to having a port open for anyone to try and use.
Anyway, opinions are greatly appreciated.....
Cheers,
Tom Archer - Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
|
It's Sound something like NMS (Network Management software) .
My personel choice will be Sockets, But would like to know how are you implementing File-Drop-Off method?.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
I'm just starting this project today and the client wants to use one of these techniques. The file-drop-off technique would be either setting a time and looking for a file in the drop-off folder or creating an event with the OS to tell the app when a new file has been dropped (I know this works with .NET, but have never tried it with native code.)
Cheers,
Tom Archer - Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
|
Tom Archer wrote:
The file-drop-off technique would be either setting a time and looking for a file in the drop-off folder or creating an event with the OS to tell the app when a new file has been dropped
For that you have to constantly watch the DROPOFF folder for file.Directory operation always be slower then that of Sockets.
Secondly, you will got instant notification for data arrival and data request in case of Sockets.
But I would like to mention in End, Every thing depends upon client !
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Agreed with respect to split second response. However, the advantages of file-drop-off are easier implementation and security. Especially with the latter, it's much better to tell the client that security is inherent with their Windows security model as opposed to telling them that they'll have to leave a port open for our modules to talk to one another.
Cheers,
Tom Archer - Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
|
Tom Archer wrote:
the advantages of file-drop-off are easier implementation and security.
But You are atleast sharing a common folder to implement FILE-DROP-OFF feature!. this can bring trouble in long run when you implement it on site!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
Tom Archer wrote:
I know this works with .NET, but have never tried it with native code
It's a bit different but not too difficult. The main difference is that the FindFirstChangeNotification() function returns a handle that can be waited on with WaitForSingleObject() or WaitForMultipleObjects(). When the handle is signalled, you call ReadDirectoryChanges() to get the changes that have been made. Generally you would run this in a separate thread and signal your main thread when a change has been made.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Thanks for the info, Ryan. We're going to implement a sockets server, but this info is good to know.
Cheers,
Tom Archer - Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
|
Tom Archer wrote:
We're going to implement a sockets server
It's Nice to know that you are implementing Socket server!
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
|
|
|
|
|
The file drop-off will probably be easier to implement at this stage than a sockets-based system, although it then limits communication to unidirectional - are you certain you won't need to talk back to the Unix system in the future? If so, sockets might be easier in the long term.
Another option is to setup a web server on the Unix system and connect to it from your service. That way you can use the Win32 Internet functions to make life simple, and the security is built in to the webserver already. The only problem with that is that the server generally can't signal the client when new data is available.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
I met with my new team today. It's definitely gotta be sockets as the server is going to make dozens of requests within the context of a logical "conversation" and it would be seriously kludgy for us to continually interact via files (as I also have to return information regarding the work performed on Windows).
Cheers,
Tom Archer - Archer Consulting Group
"So look up ahead at times to come, despair is not for us. We have a world and more to see, while this remains behind." - James N. Rowe
|
|
|
|
|
I use edit box in my dialog, I run my project, I type some characters to edit box and press Enter, my program close.
How can I use Enter key for my work ?
What Windows Message to use Enter key ?
Thanks in advance
|
|
|
|
|
did you well think to set your edit as MultiLine ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I need to use a single line but I want to process Enter key or the Enter key is disable.
Thanks in advance
|
|
|
|
|
hum, you mean to have a default button which is enable or disable depending on the content of your editbox ??
use EnableWindow() to Enable/disable your button
use SetDefID() to tell the dialog which button would be the default one (that would be clicked if Enter is pressed)
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Right click on your Edit Box and in the properties dialog box mark the "WantReturn" and "Multiline" checkboxes.
m0n0
|
|
|
|
|
I use only a line, but I like to disable the Enter key.
|
|
|
|
|
Overload the OnOk message handler , do next :
void CYourDlg::OnOK()
{
//CDialog::OnOK();
}
the problem is that OK is set to default button and when you press Enter , automatically OnOk event handler is called.
Note that if you have only deleted the Ok button ,without doing what i wrote above , it does not solve the problem.
In this case you will have to drop any button make it "Default Button" and "Invisible", .
m0n0
|
|
|
|
|
Giorgi Moniava wrote:
n this case you will have to drop any button make it "Default Button" and "Invisible"
bad coding...
moreover, if you have to change the default button programatically (when the code executes), how will you do ? - i doublt you can like this...
use CDialog::SetDefID() instead into OnInitDialog()
CDialog::SetDefID()
this->SetDefID(IDC_BUTTON1);
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Can you tell me the better way of doing this ??
when the OK button is already deleted
m0n0
|
|
|
|
|
Giorgi Moniava wrote:
Can you tell me the better way of doing this ??
when the OK button is already deleted
already posted, re-read my message
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|