|
It's not simple. You actually can't change the captions n a true message box; they are fixed.
However, you can use a class called TcxMessageBox to do this, along with a lot of other message box customizations. It's on CP, somewhere.
|
|
|
|
|
|
Hi all, hope someone can help.
Using GetCurrentHWProfile() to obtain GUID string in simple app. #defining _WIN32_WINNT (0x0400)(and #include "windows.h")which ensures that the program works fine with NT and Win2k, but f() fails on a Win98 machine even though the f() is supposed to work with Win95 OSR2 and upwards.
Can't find any documentation in the MSDN - anybody know of further #defines that are necessary for this to work on a Win9x machine?
Sonork ID: 100.13715 - 3bananas4
I have detailed files
|
|
|
|
|
Hi,
I want to spawn a process and wait for it to finish. I'm doing this in a seperate thread, so the user can continue working. The problem is that the new process comes popping up in front of the application each time! Now I could spawn the process with _P_DETACH, so the process is invisible, but that way I can't wait for the process to finish. That is important, because when the process finishes, I build a texture of it's output image. Is this possible and if so how?
Thanks in advance,
Wybren van Keulen,
Funny Farm
|
|
|
|
|
Go to MSDN and check out CreateProcess and WaitForSingleObject .
Even a broken clock is right twice a day.
|
|
|
|
|
Hi All,
I've got a CDialogBar derived class which contains a rich edit control, I am using this as a message window for an MDI app. How can I modify the right click menu that is shown? Currently, my options are "Hide" and "Undock" or something like that. I would llike to add a CLear option to the message window.
Thanks,
Aaron
|
|
|
|
|
Hi All,
I've got a workspace style app (MDI), with a CDialogBar derived window containing a tree control on the left (for navigation, opening views, etc), and a CDialogBar derived window containing an edit control on the bottom (for messages), which sort of looks like the Visual Studio workspace. On exiting the application, I need to save the window position and state of the docking windows. How do I do this?
I guess can get a window rect with GetWindow?? soething or other, but how do I get the docked/undocked state of the window?
Thanks in advance,
Aaron
|
|
|
|
|
Have a look at
SetWindowPlacement/GetWindowPlacement for normal windows.
SaveBarState/LoadBarState for CControlbar windows.
Max.
|
|
|
|
|
Hey Thanks!
That worked pretty good, so far. I found the DOCKTOOL sample searching for that as well, which has helped.
So far, I am able to save the placement of the main frame, and restore the stae of the control bars.
But, what should I use to save/restore the size of the control bars? Ie, when I close the app, the message bar comes up with the correct state, but is not the correct size.
Can I use GetWindowPlacement for the control bars? Or do I need something like GetWindowRect/MoveWindow?
Thanks Again,
Aaron
|
|
|
|
|
AfxInitRichEdit();
I put this in the app class in an MFC MDI.
Now I have just a CDialog based app, and if I dont put it in, i dont get anything.....
Where should it go?
Appreciate your help,
ns
|
|
|
|
|
The dialog based application still should have a class derived from CWinApp...put the AfxInitRichEdit call in the app's InitInstance function
Gary Kirkham
A working Program is one that has only unobserved bugs
I thought I wanted a career, turns out I just wanted paychecks
|
|
|
|
|
I found the function...many thanks
Appreciate your help,
ns
|
|
|
|
|
I have a CEdit with multiline and hScroll and VScroll but the contents arent wrapping automatically . How to get this to happen? Do I have to use a richedit control if I want to wrap contents? Surely there must be a way to wrap stuff around in a plane old CEdit...?
Appreciate your help,
ns
|
|
|
|
|
Have you tried the styles ES_MULTILINE, and ES_AUTOVSCROLL?
Those two alone should do the trick.
Chris Meech
"what makes CP different is the people and sense of community, things people will only discover if they join up and join in." Christian Graus Nov 14, 2002.
"AAAAAAAAAHHHHHH!!!!! Those leaks are driving me crazy! How does one finds a memory leak in a garbage collected environment ??! Daniel Turini Nov. 2, 2002.
|
|
|
|
|
|
This is, I think an M$ feature! it is documened in the MSDN, here is a code snippet of mine from an old prog, in OnVScroll method
SCROLLINFO info;<br />
info.cbSize = sizeof(SCROLLINFO);<br />
info.fMask = SIF_TRACKPOS; <br />
<br />
GetScrollInfo(SB_VERT, &info);
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
I should have mentioned this for the case where:=
SB_THUMBTRACK == nSBCode
If I have seen further it is by standing on the shoulders of Giants. - Isaac Newton 1676
|
|
|
|
|
When I use the SetScrollSizes() function of a CScrollView, it accepts a 32-bit integer... ok... but when I scroll the scrollbar over 32767(Seems to be about there), the scrollbar warps back to the beginning and stays there... why? Is that the limit it can have?
Only tested it with vertical scrollbar, btw.
|
|
|
|
|
I am aware of programs like Grid Control that allow you to deal with cells. However, I want to write my own source code that creates tables and that allows the user to edit the contents of a table. Simply, I need to create some excel-like cells. Can anyone tell me what windows functions I can use for that?
none
|
|
|
|
|
Yes, it's called Elbow Grease.
One of these[^] articles can get you started.
Even a broken clock is right twice a day.
|
|
|
|
|
How can we handle the default pop-up menu (rbuttonclk) option in case of CEdit control.
I have a CFormView with some dialog controls.
When I do right mouse button click on the selected text of CEdit control it shows default popup menu(Undo/Cut/Copy/Paste/Select All Menu). I want to handle this operation through Main menu.
How should I proceed in this case. How can I know the text is selected(for copy), or clipboard is already having some copied text(for paste)?
Thanks in advance,
- Vijay
|
|
|
|
|
"Cut/Copy/Paste" are already in the main menu (Edit).
Examine the members of CEdit to get the selected text.
See MSDN GetClipboardData for clipboard operations.
|
|
|
|
|
there is a common sense for this sort of questions.
menu command goes to WM_COMMAND, override the message, click menu-item u want to handle, to see what the menu id is, then "case the_id" to handle it.
includeh10
|
|
|
|
|
In my MFC MDI project I've got two views V1 and V2.
V1 spawns two modeless CDialogs. C1 and C2
Now I do a switchview and V2 is showing in the mainframe.
C1 and C2 remain floating on top of V2.
I want V2 to be on top of C1 and C2.
Now I switchview back to V1.
Now I want C1 and C2 to be back on top of V1.
What functions will do my first requirement?
What must I do to the already spawned C1 and C2 when I go back to V1, to make them pop up?
Appreciate your help,
ns
|
|
|
|
|
ns wrote:
Now I do a switchview and V2 is showing in the mainframe.
C1 and C2 remain floating on top of V2.
I want V2 to be on top of C1 and C2.
You can have C1 and C2 behind the MAINFRAME, that is the Application window, but not between MainFrame and View.
Simply send them a message to set themselves to the last place in the Z-Order (or better, hide them?).
ns wrote:
Now I switchview back to V1.
Now I want C1 and C2 to be back on top of V1.
This is the normal behaviour of dialogs, sitting atop of their parent window.
Probably you have to send them a message to tell them to undo the first step.
--
"My opinions may have changed, but not the fact that I am right."
Found in the sig of Herbert Kaminski
|
|
|
|