I have an application where I have this setup...
Main Window
- Six static child controls. Three are just labels. Three are used to show the current selection.
- Two Button controls
- One Status bar window control
- One "overlapped-type" window which sits on top of the main window and the static controls (Kinda Like MDI, except I am creating this overlapped window as a "regular" child. I am using this window to show reports and other "text-type" info using TextOut).
- All controls are created with CreateWindowEx; that is, they are not in a dialog.
The data items I am allowing the user to select are files, with paths; but especially when they are very long, these look terrible and I want to reduce the size of the displayed items, kind of like PathCompactEx does; or maybe just put in some "user-friendly" verbage.
What I do when the "Process" button is hit is retrieve the data items from the controls (GetDlgItemText) and use that as the input values for the "processing" function.
What I was thinking about doing was adding three hidden static or edit controls to the main window and using these to store the "real" value of the user-supplied data, and keeping the static controls as the "user-friendly" item names.
The questions which arise are...
1. Is the use of hidden edit controls like this considered "bad form?" I know I could use GLOBAL variables, but I hate GLOBALs (they confuse me, especially since PB's compilers do not flag duplicated LOCAL datanames at compile time). (Plus, every routine in the application gets an hWnd passed to it, meaning I can get any data tied to any window).
2. I said this was kind of like MDI; but I can't seem to get the caption bar on the child "overlapped-style" window to come up highlited. I know it is getting the focus, because my TrackPopupMenu is working as expected. (Or does that not necessarily mean the window is getting focus?).
Is there some special combination of style/extendedstyle I should be using? I want this window resizeable within the constraints of the parent window dimensions.
3. Also on this Child window, when I put a "minimize" box on it, it minimizes OK, but it minimizes "underneath" the status bar, and you have to resize the main window larger (vertically) to expose the minimized rectangle in order to click on the "restore" icon. Is this the normal behavior? Is there a message I can intercept to change the location to which the minimized icon will be located?
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
Main Window
- Six static child controls. Three are just labels. Three are used to show the current selection.
- Two Button controls
- One Status bar window control
- One "overlapped-type" window which sits on top of the main window and the static controls (Kinda Like MDI, except I am creating this overlapped window as a "regular" child. I am using this window to show reports and other "text-type" info using TextOut).
- All controls are created with CreateWindowEx; that is, they are not in a dialog.
The data items I am allowing the user to select are files, with paths; but especially when they are very long, these look terrible and I want to reduce the size of the displayed items, kind of like PathCompactEx does; or maybe just put in some "user-friendly" verbage.
What I do when the "Process" button is hit is retrieve the data items from the controls (GetDlgItemText) and use that as the input values for the "processing" function.
What I was thinking about doing was adding three hidden static or edit controls to the main window and using these to store the "real" value of the user-supplied data, and keeping the static controls as the "user-friendly" item names.
The questions which arise are...
1. Is the use of hidden edit controls like this considered "bad form?" I know I could use GLOBAL variables, but I hate GLOBALs (they confuse me, especially since PB's compilers do not flag duplicated LOCAL datanames at compile time). (Plus, every routine in the application gets an hWnd passed to it, meaning I can get any data tied to any window).
2. I said this was kind of like MDI; but I can't seem to get the caption bar on the child "overlapped-style" window to come up highlited. I know it is getting the focus, because my TrackPopupMenu is working as expected. (Or does that not necessarily mean the window is getting focus?).
Is there some special combination of style/extendedstyle I should be using? I want this window resizeable within the constraints of the parent window dimensions.
3. Also on this Child window, when I put a "minimize" box on it, it minimizes OK, but it minimizes "underneath" the status bar, and you have to resize the main window larger (vertically) to expose the minimized rectangle in order to click on the "restore" icon. Is this the normal behavior? Is there a message I can intercept to change the location to which the minimized icon will be located?
Thanks,
------------------
Michael Mattias
Racine WI USA
[email protected]
Comment