|
-
January 19th, 2016, 11:32 PM
#1
Using Slider Control in client area
Hi ,
I want to use Slider Control in Client Area to set some parameters.
How to do this ? I have used it in Dialog Box Only.
Thanking you ..
New_2012
-
January 20th, 2016, 04:53 AM
#2
Re: Using Slider Control in client area
Just set the size of the control equal the client size of the dialog.
Victor Nijegorodov
-
January 20th, 2016, 11:42 PM
#3
Re: Using Slider Control in client area
Thank you VictorN Sir ..
I need to use Slider Control in my main program in client area.
I have used it in dialog only using resource editor.
Now I dont know whether I can use it in main program without dialog.
I need to set temperature of furnace. I have implemented UP DOWN Arrow Keys
But wish to give Edit Control or Slider Control .
How to do this ?
-
January 21st, 2016, 03:44 AM
#4
Re: Using Slider Control in client area
What do you mean by "main program"?
And what is the type of your application: dialog based, SDI, MDI, something else?
Are you using MFC?
Victor Nijegorodov
-
January 22nd, 2016, 01:54 AM
#5
Re: Using Slider Control in client area
Thank you VictorN sir ..
My application is MFC APP Wizard SDI application. It is not dialog based.
I have divided screen in two parts .
In one part I display Temp Controller Status.
In other area I need to set Temp . I am doing that with Up Dn Arrow keys.
But just I thought of having Slider Bar Control to set the temp.
I have used it only in dialogs.
so how to do it ?
-
January 22nd, 2016, 03:12 AM
#6
Re: Using Slider Control in client area
 Originally Posted by new_2012
Now I dont know whether I can use it in main program without dialog.
Any control is just a window. Any window can be made be a child of another window under condition you do it right. For example, a dialog can be embedded into another dialog or overlapped window. So answering your question: You can. And now you know it.
 Originally Posted by new_2012
How to do this ?
CreateWindow or CreateWindowEx.
P.S. The best way, imho, to avoid asking trivial questions on the forums is purchasing a decent reading on Programming Windows.
Best regards,
Igor
-
January 22nd, 2016, 03:32 AM
#7
Re: Using Slider Control in client area
 Originally Posted by new_2012
Thank you VictorN sir ..
My application is MFC APP Wizard SDI application. It is not dialog based.
In SDI you can use CFormView derived class. It is just (or almost) the same as a dialog:a dialog template where you can place the child controls
Victor Nijegorodov
-
January 24th, 2016, 07:42 AM
#8
Re: Using Slider Control in client area
As Victor already said, if you have a form view (which is based on a dialog resource), you can easily put a slider as well as any other type of controls in its client area.
Otherwise, put it in a dialog bar (also based on a dialog resource), which can be docked in the view's parent frame.
Here is attached a demo project that uses slider controls for resizing thumbnail images and shadows in a view: http://codexpert.ro/blog/2015/07/03/...wing-with-mfc/
It's an SDI application but it's easy to put dialog bars also in MDI clild frames, in the same way.
.
Last edited by ovidiucucu; January 24th, 2016 at 10:22 AM.
-
January 24th, 2016, 11:54 PM
#9
Re: Using Slider Control in client area
Thank you Igor vartanov sir , VictorN Sir and ovidiucucu sir.
I will do it .. will go through the project and books.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|