Solved

floating windows with tab controls

Posted on 1997-05-22
5
253 Views
Last Modified: 2013-11-19
I have to realize a floating window containing a tab control
whose pages only appear by clicking over the tabs and disappear by clicking over a "minimize" button, leaving visible only the tabs.
Could you send me a sample code to realize that?

Many thanks in advance.
0
Comment
Question by:reti72
  • 2
  • 2
5 Comments
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1301708
Just use a property sheet and respond to the SetActive message by expanding the page to the full size and respond to the "minimize" button by shrinking the current page.
0
 

Author Comment

by:reti72
ID: 1301709
I'd like to use a form view with a tab control, instead of
a property sheet.
This is because I've to perform drag&drop between my form
view and other views in the application (I'm using MDI).
Is it possible to do that with a property sheet?

If you send me some sample code I'll grade your answer 'A'.

Many thanks.
0
 
LVL 10

Expert Comment

by:RONSLOW
ID: 1301710
You can easily have a property sheet as a form (I believe) - I'll need to look up some code on exactly how to do it

You originally said you wanted a floating windows, rather than an MDI child?  What is it you really want here?  How do you want your use interface to work?

What are you going to be dragging and dropping?

0
 

Author Comment

by:reti72
ID: 1301711
The window I have to do accepts icon's drag&drop from another
view of my application.
I want this window displayed as a tab control with three pages.
In that pages I'd like to put something like CDragListBox to
accept drag&drop.

Many thanks for your time.

0
 
LVL 3

Accepted Solution

by:
byang earned 120 total points
ID: 1301712
Try this, if you can dynamically change the tab control's style, it should work.

  //tcwnd is the control's handle

  //to show only tabs:
  tcstyle=::GetWindowLong(tcwnd,GWL_STYLE);
  tcstyle &= (~TCS_BUTTONS);
  ::SetWindowLong(tcwnd,GWL_STYLE,tcstyle);
  //now change your floating parent window size and repaint

  //to expand tab control:
  tcstyle=::GetWindowLong(tcwnd,GWL_STYLE);
  tcstyle |= TCS_BUTTONS;
  ::SetWindowLong(tcwnd,GWL_STYLE,tcstyle);
  //now change your floating parent window size and repaint

0

Featured Post

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error on moodle after upgrade 3 130
maxBlock challenge 30 128
Smart Camera scanning and reading information 3 106
Unix Command -- Challenging  question 7 88
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question