|
Hi all, I am trying to hide the captoins of a tab control but cant seem to find any way to do this. Any kind of hints or pointers would be appreciated. Thanks.
- tareq
|
|
|
|
|
|
Thanks for your reply... but unfortunately this is not what i was looking for. This will still show the buttons there with no text on them... I just dont want to see those buttons there.
- tareq
|
|
|
|
|
Tareq Ahmed Siraj wrote:
This will still show the buttons there with no text on them
yes, that is what i understood in your "I am trying to hide the captions of a tab control...". For me, the caption is the text associated with the button...
well, what about ShowWindow(SW_HIDE); ?
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Sorry about the misunderstanding i've created. Let me be more specific. I havent done much programming with tab controls... I have a MFC tab control. I've got rid of the borders by setting the tab style to buttons. Now i have the tabs with buttons associated with them. Now i dont want even the buttons to be there. I want to control the tabs using SetCurSel()... no button clicks. Thanks in advance.
- tareq
|
|
|
|
|
if u want to hide the button use.....ShowWindow();
eg:
GetDlgItem(IDC_BUTTON1)->ShowWindow(FALSE);//TO HIDE
GetDlgItem(IDC_BUTTON1)->ShowWindow(TRUE);//TO SHOW
OR
if u have declared an object linkeded to thiz control using ddx,then just use......
object.ShowWindow(FALSE)
hope that helpz.....
cheerz.....
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
How do i get the button id for a specific tab page? Thanks.
- tareq
|
|
|
|
|
i believe teh buttonz have unique idz!you can get em from the property option of that button!
"faith, hope, love remain, these three.....; but the greatest of these is love" -1 Corinthians 13:13
|
|
|
|
|
See if MSDN article Q151662 is of any help.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Thanks for a lot for your reply... I'll go through it.
- tareq
|
|
|
|
|
I am writing a English-Vietnammese dictionary.I want program can get text on screen at cursor mouse's position.Can you help me?
|
|
|
|
|
there is no 'text' under the cursor, there are only pixels. to get text from pixels, you'll need some kind of OCR/pattern matching system to turn those pixels into text.
Image Toolkits | Image Processing | Cleek
|
|
|
|
|
See here.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,Everyone:
i need to transform a "wave format" buffers into "A-Law format" buffers, could you give me some hints?
i found a link:
http://sox.sourceforge.net/[^]
but it's so complicated for me... do we have some simple methods?
Thanks.
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
God Bless.
________________________________________
Many nights we've prayed with no proof anyone could hear, we were moving moutains long before we knew we could!
Yet now i'm standing here, although we know there's much to fear, hope seemed like summer bird too swiftly flown away ...
There can be miracles! When you believe, though hope is frail, it's hard to kill!
Who knows what miracles, you can achieve! When you believe, somehow you will ...
YOU WILL WHEN YOU BELIEVE
|
|
|
|
|
I am facing a critical problem when i place my control in ActiveX Cotainer.The problem is that the first time the control loads , it only shows the area in the rectangle (Previously in which Ellipse is drawn by default ) . Please help me out as to how to initialize the size of that rectangle in which the control is displayed ...
|
|
|
|
|
Hi,
I want to create run-time array for example I want to set the number
of elements in run-Time:
/**********************/
If i=0 then
CClass cls[j];
else
CClass cls[b];
/************************/
Best Wishes,
Thanks.
|
|
|
|
|
you will not be allowed to do this by the compiler. you'll have to allocate the memory for your array dynamically, on the heap :
CClass cls* = new CClass[j];
be sure that j is well defined, and non-negative !
another thing :
If i=0 Then must be traduced in C/C++ by
if (i == 0) { that means, be careful of the ( ) between the condition statement, and == for the equal operator (= is the affectation operator).
cheers,
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Heres your solution
CClass* cls;
if (i==0)
cls = new CClass[j];
else
cls = new CClass[b];
Rahim Rattani
Software Engineer,
Matrix Systems (Pvt) Ltd.,
Karachi - Pakistan
|
|
|
|
|
And to complement the previous responses, don't forget to free the memory after having used it:
if (cls)<br />
{<br />
delete[] cls;<br />
cls = NULL;<br />
}
|
|
|
|
|
yes, of course !
and to be more better, you can encapsulate this code into the destructor ~CClass() ...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
Hi all,
I have a problem. I need to start a long computing work when the user clicks a dialog button. During this time the button needs to be disabled. The following simple code doesn't work. Despite the fact that the button changes state from enable to disabled (grayed), it actually gets the mouse inputs. Some of you knows the reason? I wasn't able to disable this button and then I had to write a workaround.
Thanks,
Daniele Godi
///////////////////////////////////////////////////////////////
Sample code
void CMyDlg::OnBnClickedButton1()
{
// disable the button
m_ctrlButton1.EnableWindow(FALSE);
BeginWaitCursor();
DoSomeLongWork();
EndWaitCursor();
// workaround, I have to remove manually the mouse input from
// the message queue
if (::GetInputState())
{
MSG msg;
while ( ::PeekMessage( &msg, NULL, NULL, NULL, PM_NOREMOVE ) )
{
// found a mouse message, remove it
if ((msg.message >= WM_MOUSEFIRST) && (msg.message <= WM_MOUSELAST))
{
::PeekMessage( &msg, NULL, NULL, NULL, PM_REMOVE);
}
else
{
if ( !::AfxGetThread()->PumpMessage() )
{
// if FALSE exit both dialog and application
EndDialog(FALSE);
::PostQuitMessage( -1 );
return;
}
}
}
}
m_ctrlButton1.EnableWindow(TRUE);
return;
}
Daniele Godi
|
|
|
|
|
if you apply the EnableWindow() directly to a member object, you have to call UpdateData(FALSE) to update your controls with the changes done on the associated member object (and UpdateData(TRUE) for the opposite)...
otherwise, this single line also works :
((CButton*)GetDlgItem(IDC_MY_BUTTON))->EnableWindow(FALSE); I assume (of course) that IDC_MY_BUTTON is the ident of the button you want to change the state...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
I'm sorry, it desn't work.
Ciao...
Daniele
|
|
|
|
|