|
Great , glad i could help, thanks for the points.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Ok I know this is a bit of a cheat but my UI is split into 3rds with the idea being I can hide the bits of the UI.
Now I can slice off the right hand side easily enough as follows.
...
CRect rect;
GetWindowRect(rect);
...
rect.right += CONSOLE_SIZE;
MoveWindow(rect, 1);
...
The problem I am having is how do I cut the dialog's window down so that only the middle 3rd is displayed? I have had a look at CRgn with the SetWindowRgn but I am getting nowhere.
Any suggestions would be appreciated.
Many thanks
Alan
|
|
|
|
|
You could try making your dialog a child of another dialog. You'd have a popup dialog and inside its client area a child dialog with its controls, thus you can shift this child dialog inside the popup's client area to show the part you wish.
On a sidenote: i don't know what kind of controls you have on your dialog, but if you use the keyboard, you can tab around controls even if they are not visible because they are "outside" of the visible client area. So if you tab onto a button you can press it by using SPACE even though you don't see it.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
Code-o-mat wrote: ...but if you use the keyboard, you can tab around controls even if they are not visible...
Unless they are also disabled, then they get skipped over.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
Of course...also if they are hidden by ShowWindow(SW_HIDE), my point was, just by "not being seen" doesn't mean "not there at all"
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I take your point but there are no input controls on the area being hidden.
Put simply, as a user of the system you only get to see the bits you have permission to see. All, Left+Middle or Right+Middle.
Alan
|
|
|
|
|
All right, just trying to help.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I find the easiest way to make such a dialog is to add a hidden 1x1 static control to the dialog where the expansion will take place. In your case, you'd need two. Then when the "shrink" button is clicked, you'd shrink the dialog's left and right edges up to those hidden controls. When the "expand" button is clicked, you'd grow the dialog's left and right edges back to their original position.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
hmmm... sounds a very messy way of cutting off the left hand edge.
The object is to show All, Left+Middle or Right+Middle.
Alan
|
|
|
|
|
Spawn@Melmac wrote: hmmm... sounds a very messy way of cutting off the left hand edge.
Not messy at all. In fact it is very clean and quite common to grow/shrink dialogs in this fashion.
Spawn@Melmac wrote: The object is to show All, Left+Middle or Right+Middle.
Even though you initially stated, "...how do I cut the dialog's window down so that only the middle 3rd is displayed", what I described will work just fine for all seven possibilities.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I knew I had missed an option. Yes it is All, Left+Middle, Right+Middle or Middle.
Thank you for the suggestion.
Alan
|
|
|
|
|
Could it be easier to have a series of child dialogs to display/hide part of the main dialog and resize the main dialog accordingly ?
Watched code never compiles.
|
|
|
|
|
How to change the up and down arrow of DateTime Picker control. I hv created my own class which is derived from CDateTimeCtrl class. What I need is to change the look and fill of the control and also want to create the coontrol at run time.
Please help me how to work on that.
Thanks....
|
|
|
|
|
AbhiHcl wrote: How to change the up and down arrow of DateTime Picker control.
To what?
AbhiHcl wrote: What I need is to change the look and fill of the control...
To what?
AbhiHcl wrote: What I need is to...create the coontrol at run time.
Use the Create() method.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
I need to change the up and down arrow of the datetime picker control, I have to put some image there. and also need to some different color when any value is selected in the control.
|
|
|
|
|
AbhiHcl wrote: and also need to some different color when any value is selected in the control.
For this I'd look into WM_CTLCOLOR .
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
|
eat dll pickles.
Watched code never compiles.
|
|
|
|
|
sahilamrutkar wrote: add dailog box in dll
Sorry, we're out of dailogs. Would you like fruitcake instead?
|
|
|
|
|
Hi All,
How to sort the items inserted in the tree ctrl?
I have added items in the tree control now i want to sort the items
in alphabetical order.
How to do this?
|
|
|
|
|
use the sorting callback function of the CTreeCtrl ( CTreeCtrl::SortChildrenCB )
for example :
static int CALLBACK MyCompareProc(LPARAM lParam1, LPARAM lParam2, LPARAM )
{
return 0;
}
TVSORTCB tvs;
tvs.lpfnCompare = MyCompareProc; tvs.hParent = TVI_ROOT;
SortChildrenCB(&tvs);
Watched code never compiles.
|
|
|
|
|
|
I have located fast libraries for unions of 2 polygons.Now, how does one merge a group of simple polygons.
|
|
|
|
|
Two by two?
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
oh dear,
what i meant was I want a program which takes a group of
input simple polygons and merges them with the 2nd group
of simple polygons.
I have located 2 libraries (both use vatti's) algorithm
for clipping.
My polygons are without hoes,not self intersecting and only graze at edges(if at all).
I want to merge them to get the outer contour of the final merged polygon.
I presume that would be easier to do then the clip in the 2 heavy libraries.
|
|
|
|