How to remove or hide the spin button by owner-draw tab control

Hi All,
    Same as the title, now I develop a CTabCtrlEx class derive from
CTabCtrl, I use the owner-draw method to give the tab control new looking,
but now the problem is I didn't want to show the spin button(UpDown Control)
with single line style, how can I do that. I have try to overriding the
OnSize, the code list below:

////////////////////////////////////////////////////////////////////////////
////
void CTabCtrlEx::OnSize(UINT nType, int cx, int cy)
{
 CTabCtrl::OnSize(nType, cx, cy);

 TCHAR classname[100];

 HWND hwndSpin = NULL:

 HWND hWndFind = ::GetWindow(m_hWnd, GW_HWNDFIRST);

 while(hWndFind)
 {
  ::GetClassName(hWndFind,classname,100);

  if(lstrcmp(_T("SysTabControl32"),classname) == 0)
   hWndFind = ::GetWindow(hWndFind,GW_CHILD);
  else if(lstrcmp(_T("msctls_updown32"),classname) == 0)
  {
    hwndSpin = hWndFind;
    break;
  }
  else
   hWndFind = ::GetWindow(hWndFind,GW_HWNDNEXT);
 };

 if(hwndSpin)
  ::ShowWindow(hwndSpin, SW_HIDE);

}
///////////////////////////////////////////////////////////////////////

but still have other problem, which one can give me a good way or some tips
and reference. thank you very much!

Best Regards
Simon
2003/09/6


0
zengsiyu
9/8/2003 3:55:17 AM
vc.mfc 33608 articles. 0 followers. Follow

0 Replies
834 Views

Similar Articles

[PageSpeed] 32

Reply:

Similar Artilces:

Hide Rows or Columns with +/- button above row/column label headin
Hi, on some excel files, I have seen a +/- button located between the toolbar and the cell label headings. The button hides/reveals rows or columns. How do I add this button for rows or columns of my choice? Thanks for your help. Data>Group and Outline. Gord Dibben MS Excel MVP On Wed, 18 Nov 2009 14:16:01 -0800, WA <WA@discussions.microsoft.com> wrote: >Hi, > >on some excel files, I have seen a +/- button located between the toolbar >and the cell label headings. The button hides/reveals rows or columns. How do >I add this button for ...

tabbing to pre-determined cells
Can I tell Excel where I want it to tab to as opposed to just tabbing in a regular progression? I have locked cells and when I tab I want it to go in a certain order. Thanks, Pat Pat, Take a look at http://xldynamic.com/source/xld.xlFAQ0008.html Excel FAQs - TAB To Selected Cells -- HTH Bob Phillips "Pat S" <Pat S@discussions.microsoft.com> wrote in message news:B16ED816-BC0A-44AE-842A-EE1C9E0FAC28@microsoft.com... > Can I tell Excel where I want it to tab to as opposed to just tabbing in a > regular progression? I have locked cells and when I tab I want it to g...

Trying to add button in isv.config on Contact Detail Toolbar
I've exported my isv.config file and added custom 'clone contact' button with visual studio 2005, very similar to how I did in 3.0, try to import it tells me either the file could not be uploaded, or this is not a valid Customization file. I'm using the same syntax I did in 3.0 - files for 3.0 and 4.0 are very similar and the button I'm adding is at the very bottom below. I'm placing it after the previous entity end-tag and before the <Entity name="contact" />. Any ideas? ....JavaScript="alert('test');" Client="Outlook...

Can't create OWNER-DRAW button using Create()
I have simple owner draw button derived from CButton with folowing functions : //-------------------------------------------------------------------------/ / BOOL CCustomButton::CreateNormal( CWnd *pParent, UINT nID ) { Create( _T(""), WS_CHILD | WS_VISIBLE , CRect(0,0,10,10), pParent, nID ); ModifyStyle( BS_TYPEMASK, BS_OWNERDRAW, SWP_FRAMECHANGED ); m_ToolTip.Create( this ); m_bCreated = TRUE; return TRUE; } //-------------------------------------------------------------------------- // void CCustomButton::PreSubclassWindow() { if ( !m_bCreated ) { ModifyStyle( BS_TYPE...

Query help to remove duplicates
I am a new access user and so far only know the basics. I have a excel sheet with approx. 40,000 rows of data. I would like to import the spreadsheet and run a query to remove the duplicate records with the earliest dates. e.g. Bob's Tire 2/5/06 - remove this one Bob's Tire 3/14/02- and remove this one Bob's Tire 1/1/08 Any suggestions on the best way to do this? I know how to run a basic duplicate query, but not to customize it by date. TIA, I know this will be much faster than trying to import a formula and sort it for this large of a spreadsheet in excel. It is probabl...

columns and tabs in excel
can I get the first two columns to be the same regardless of which tabs I click on? E.g. the first two tabs are for what will remain constant. Clicking on the tabs at the bottom will change what columns appear to the right of the first two columns. Tx ...

DeviceIoControl hangs after device removal
Hi, I'm faced with something weird when calling DeviceIoControl in a user application on my UMDF driver based on the osrusbfx2 driver. What happens is that if I unplug my usb device and a user application calls DeviceIoControl with a previously valid handle to my driver, the call hangs there. My driver is totally unmounted so normally, the pnp manager would know that the handle used by DeviceIoControl is not longer valid and the call would return a failure but instead it hangs. Is it something that is not done right in my driver that causes this? Should I manage in the user...

Drawing continuously(dynamically) in MFC .
Hi Folks, I have to develop an application in which I would like to paint the screen (view/dialog) as long as the application exists. I am recieving some data from the below layers and I should paint the screen accordingly. In betwwn user may click on the screen , can change the color of the line I have drawn etc. Correct me If I am wrong..If I draw my screen from OnPaint or OnDraw() my application would hang and I want to handle other events also so this option is ruled out. So what may be the solution , I have to remember what I have drawn using some data structure and tell Onpaint funct...

Text only in toolbar buttons
Hi! I would like to know how to set custom toolbar buttons to display text only and no picture? Thanks, Thierry Paradis Set the style property to msoButtonCaption -- HTH Bob Phillips (remove nothere from email address if mailing direct) "Thierry Paradis" <chezmoe200-5@yahoo.com> wrote in message news:euoWrjUPGHA.1180@TK2MSFTNGP09.phx.gbl... > Hi! > > I would like to know how to set custom toolbar buttons to display text only > and no picture? > > Thanks, > > Thierry Paradis > > set the style property of the control to msoButtonCap...

Again: Slow loading of a Visio 2003 drawing
Hi, I am having trouble with loading drawings in Visio 2003 on my laptop (Win XP). They mostly take up two to five minutes to load for a <1Mb drawing. I can have the drawing load quicker if I temporally shut down the McAfee scanner, or if I do NOT use Windows offline folders. Especially the mappings to the stencils, included in this drawing that are also on offline folders seem to take a lot of time. The problem is that I DO need the virus scanner, and I DO need offline folders, to make sure my files are constantly in sync with my colleagues that also use Visio 2003 on a laptop in the sam...

X400 removed (issues not sending internal mail)
first off i want to say thanks to joe for helping yesterday. I have a new issue. When i remove the x400 from a users profile. the use can not send e-mails internal.. they can recieve internel e-mails but not able to send. is there a setting in the profile im missing or is there a fix for this. I should be able to send and recieve e-mail internal with x400 removes exchange 5.5 on winnt server sp6a, outlook 2k, i know as long as MS is in the profile they should only be able to internal mail (send and recieve) and the ones with x400/MS/ccmail/smtp have internal and external. thanks i...

click a button on the toolbar (via VBA?)
hi there, I do have a plugin (Red Oxygen Outlook COM Add-In) installed on Outlook 2003. That plugin adds a button to the toolbar which allows me to send SMS trhough my local provider. Unfortunately, there is no programmatic (library) access to that plugin. The functionality is very primitive. I click the button and a form opens that allows me to enter a name for the receiver (that one will be checked against the directory or the Outlook contacts), a text to be sent and that's about it. There is no way I can see to fire up that form except to click on that button. I wonder if there...

Outlook Removal #2
I had Outlook 2000 on my system, in the process of upgrading Office 2003 Standard was put on the system. I cannot get Outlook 2003 to work and I continue to find remnants of Office 2000 on the system (even though there was an uninstall of Office 2000 performed). How do I completely remove all traces of Office 2000 from my system? ...

ITC / Cost button
I've got the ITC/Cost button on (1) company, but not on another. Was that something that was missed on the user setup? If so where does that get corrected? Thanks Could you be more specific as to how to navigate to the window with the expected button? What version of GP? Have you compared your security settings for the same user on both companies? Best regards, -- MG.- Mariano Gomez, MIS, MCP, PMP Maximum Global Business, LLC http://www.maximumglobalbusiness.com The Dynamics GP Blogster at http://dynamicsgpblogster.blogspot.com "Merle Schwickerath" wrote: > I'v...

didn't remove Test Drive before installing Office for Mac
Hello all: Well, I [ stupidly] forgot to remove the Test Drive before installing the 2004 Office for Mac. When I had both, then I tried to uninstall the Test Drive. It wanted to remove both. So I just "dragged and dropped" the Test Drive (from Applications folder) into Trash (which I've since erased). Having a few problems. How can I remove *all* things related to MS Office for Mac (both real and test drive) and start fresh ! I'm not a techie but can make my way around the Terminal mode when necessary. Thanks so much. ~ Deborah In article <1181841050.481042.1418...

Access 2003: Getting a link or button in results
hello..kind of a tough one.. I need to be able to access a new form for each user in a result set. In order to make it intuitive i am looking to add a button or some hyperlink in the result table to that it will pop up the form when selected. So..if results of query from a table looks like: 1. UserName1 Data1 Data 2 2. UserName2 Data1 Data 2 UserName 1 or UserName2 should be a hyperlink or a button should be put in it's place to go to a new form....Is this even possible... -- Harry On Tue, 5 Jun 2007 ...

Can I run on 32bit domain controller?
Hi all, We have windows 2003 SP2 32bit Domain controller with windows 2003 functional level. I need to run exchange 2010 prep on the 32 bit schema master, can I run it since the exchange 2010 i only have 64bit? Is there a way to get around? thank you. Hello ed, According to this it should work, as long as you have 64bit machine in the same domain and site: http://technet.microsoft.com/en-us/library/bb125224.aspx "As the setup /PrepareSchema command must be run on a 64-bit computer in the same domain and in the same Active Directory site as the schema master."...

Wanted: Tips on Flicker-Free Draw Scrolling
Hello. An old project of mine draws stock charts on a picturebox called pctChart. On this pctChart, a routine called DrawChart is used to draw OHLC or Candlestick price bars. After the bars are drawn, the chart tools are drawn over them, such as lines, boxes, etc. This is done in RedrawTools. Currently, I can scroll this chart by either double-clicking the chart, holding down the mouse button on the second click, and dragging the mouse to a new location. After the mouse is let up, then the draw is redrawn in the new location. Or, I can press and hold the Left or Right arro...

Hide Imports under Workplace Sitemap
Hi All, I would like to hide Imports quick lauch under Workplace of Sitemap programmatically such as when first time opening CRM application, it should hide Imports based upon User's Roles. If I am an administrator user, then Imports will show, otherwise if I regular user, Imports will be hidden. Anyone has any ideas, please let me know. Thanks and Appreciations, -Toi Check the SDK for guidance on using the Privilege node in SiteMap. Should be able to check for rights to an entity that only admins would have. -- Matt Parks MVP - Dynamics CRM "Toi Day" <ToiDay@d...

Custom XLAM tab not showing up when excel is opened from word
I have two closely identical add-ins for word and excel; the word dotm is saved in the startup folder for word and the excel xlam is saved in the addins folder. They have been working fine for about a year and a half. I added some more functionality to them both by giving the ability to open an excel sheet from the custom ribbon tab and pre-populating it with information from the document that it was opened from. When the beginning document is excel, it works fine which makes sense. when the beginning document is word, however, the macro works correctly and opens the excel do...

Control a variable from multiple cells
I have an excel workbook with multiple worksheets. How do I create a cell on each of the pages such that if I change it on any one sheet, I will get that value in the cell I want on each individual worksheet? If that's not clear, let's say on sheet 1 I want A1 to be tied to A2 on sheet 2. If I change sheet1 A1 I want sheet2 A2 to change to the same value. Likewise if I change A2 on sheet 2 I want sheet1 A1 to take the same value. That is a circular reference. In this case it cannot be resolved. If you change A1 on sheet1, A2 on sheet2 changes to it (a1 on sheet1) and sheet1, A1...

Dynamic Controls on a Report
Hello all, Here is the code I have.. I am looking for a way from a dynamics table to have dynamics columns Private Sub Report_Open(Cancel As Integer) Dim Rst As Recordset, f As Field, i As Integer, x As Control Set Rst = CurrentDb.OpenRecordset("tblStand") For Each f In Rst.Fields If f.Name <> "DBH" And f.Name <> "Flag" Then i = 1 Do While i < 16 Me.Controls("txtSpc" & (i)).Value = f.Name Loop Rst.MoveNext End If Next Rst.Close 'txtSpc(i...

Tab Control 02-27-10
On a form. is there a way to get a tab control with a vertical scrollbar? If not, I'll have to use a sub-form (but I'd rather not). Thanks. bob In a word, "No." Sorry. One of the purposes of Tabbed Controls is to avoid having to scroll down a form. You could use a subform on the Tabbed page. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-forms/201002/1 Thanks. I want to have a small area of the form scroll-able...

Remove extra Double codes from CSV Files (vb Script Language)
On daily bases I have received files with double quotes comma separated, but in some records I found 2 times double quotes and some time different squence of double quotes placements. I just want to remove all unnecessary (extra) double quotes (see the following values where i want to remove extra double quotes. "0123x",""Company D-Val"","Class D, sector N","DD5894" "4894D",""Recycle" Rubbish, C class","Class D, Sector F, Block N","D870GH" "AB8679",""AB Ltd"...

change button's background color
I got some difficulties in changing a button's background color. Here is my code snippet. HBRUSH CPage2Dlg::OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor) { HBRUSH hbr = CPropertyPage::OnCtlColor(pDC, pWnd, nCtlColor); // TODO: Change any attributes of the DC here if (nCtlColor == CTLCOLOR_BTN) { if (GetDlgItem(IDC_COLOR)->GetSafeHwnd() == pWnd->GetSafeHwnd() ) { pDC->SetBkColor(m_color); } } // TODO: Return a different brush if the default is not desired return hbr; } m_color is a COLORREF value set by other function. I am confident its value is legal. Any ideas? T...