|
If you enable the "Auto HScroll" option in the combo box (in the resource editor) the edit box will scroll to the right, like a regular edit box.
Regards,
Alvaro
|
|
|
|
|
Thank you this helps. Sorry for bothering you with this DAU question. My mistake was that I took an extended Combobox which hasn't this option.
So now my app works fine. Thanks a lot!
|
|
|
|
|
Hi...
does anyone have a sample code in which insted of using CFileDialog, u create a customized dialog box wherein u have the standard list showing drive /directories / and etc??? I'm having problems with how to create a list showing the subfolders and existing files similar to when you have CFileDialog...
Thanks a million......
|
|
|
|
|
Hi..
i know that CreateDirectory (..) and RemoveDirectory (..) creates and removes directories respectively.. but how do i ensure that if i create a new directory, the contents within the directory and its subfolders (if it was existing) are deleted...
Thanks a LOT...
|
|
|
|
|
How disable the close button in the caption of the Dialog?
Thanks
|
|
|
|
|
What do you mean by "in the caption"
Would
GetDlgItem(ID_CLOSE)->EnableWindow(FALSE);
do?
A vast majority of our imports comes from outside the country.
George W. Bush
|
|
|
|
|
The heading is such bar, at the top of dialog in which the heading of dialog is written and on the right there is a button to close as [x]
What's the ID_CLOSE
|
|
|
|
|
I don't think it's possible unless you draw the caption and its buttons yourself in WM_NCPAINT.
Why do you need this functionality?
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
In some cases it is necessary for me to forbid for the user to make a cancellation, and button Close is equivalent to a cancellation!
|
|
|
|
|
Disabling the menu items in system menu disables the buttons on the Caption Bar.
The following code should do:
CMenu *pMenu= GetSystemMenu(FALSE);
pMenu->EnableMenuItem(SC_CLOSE,MF_BYCOMMAND|MF_DISABLED);
pMenu->RemoveMenu(SC_CLOSE,MF_BYCOMMAND);
Deepak Khajuria
|
|
|
|
|
Nice trick!
I've checked this on W2K - it's enough to call EnableMenuItem. Also, if for some reason it's OK to leave disabled item in the system menu, then MF_GRAYED instead of MF_DISABLED will be better - the menu item will actually look disabled.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
Great, it's work!
Thanks everybody for help!!!!
Best regards,
Eugene Pustovoyt
|
|
|
|
|
I'm glad you got it working, but you may consider that instead of disabling the Close button, you let the user press it but then show him a message box explaining why it's wrong to do so. Sometimes this is a more user-friendly way to go, since it doesn't leave the user wondering why he can't do something he's normally allowed to do (like closing windows), and then perhaps picking up the phone to ask Tech Support. If you tell him with a message box, he'll know right away.
Regards,
Alvaro
|
|
|
|
|
Very good remark, but I do not know as it is possible to handle the message from the button taking place outside of client parts of dialog!
Therefore I while shall leave as am! If you may prompt me how make that about what you wrote (it is desirable with an example of a code) I shall be very grateful to you.
|
|
|
|
|
When the user presses the Close button, the WM_CLOSE message is sent to the dialog box. Use the Class Wizard to add a handler (OnClose) for that message and you can write your code in there.
Regards,
Alvaro
|
|
|
|
|
Very good, this works fine.
This disables the main windows close button.
How can I disable the close button form a child window,
say a open document in a mdi application?
Thanks for you help
juergen
|
|
|
|
|
- How to let a MFC based program running on a machine that has not installed VC? (copy DLL is not allowed in this case)
- Can you show me a method?
- Regards,
Maer
|
|
|
|
|
use MFC as a statically linked library
Nish
|
|
|
|
|
- Thanks my pal!
- I am a beginner of this topic. Can you show me how to use MFC as a statically linked library?
- Can you show me an example?
- Regards,
Maer
|
|
|
|
|
Take Project-Settings and take the General tab
There will be a drop-down combo with the text "Microsoft Foundation Classes" above it.
Select "Use MFC in a Static Library" from the combo
Nish
|
|
|
|
|
- Thanks Nish pal!
- Your reply is the one I am looking for.
- Regards,
Maer
|
|
|
|
|
Hello everybody,
I create an application(.exe) but sometimes, when i closed it
i noticed that the processus(Myapplication.exe) is not destroyed by
windows NT.
Why?
Thanks for help.
S.
|
|
|
|
|
Have you over-ridden your main frame window's WM_CLOSE handler?
If so, post the code here....
Nish
|
|
|
|
|
Hi everyone. I am sure others have encountered this problem, it came up often at my previous job, but I don't think we ever figured it out completely. I have a dialog based app, which reads data from a DAO database. The data is read in both into edit boxes and list views. Specifically, a list of data is shown in a listview, and a dialog with edit boxes etc appears when you edit or add a new record. Sometimes, mysteriously, instead of the given text being fetched out and displayed in the text box or edit box, all that is displayed is a single black bar (an ASCII character below 32 I imagine). This seems to occur totally randomly, I cannot recreate it this on purpose, but it can occur randomly. it seems to happen more with entries in the middle of the list view. I ahve done a lto of debugging, and it seems data is always fetched out of the DB okay, but it just doesn't appear properly.
|
|
|
|
|
The black bars are undisplayable characters. This is not a bug in CEdit or anything, your data simply contains unprintable chars. These are probably carriage returns or similar.
Try using multiline list boxes, or scanning your data for 0x0D, 0x0A
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|