|
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
|
|
|
|
|
|
The code is exactly the same I have provided on my first query. (Except for the workaround)
I work with MS Visual Studio .NET 2003
The application is MFC based.
The Dlg-box is modal
Build a empty application and add an handler to the OK button on the about box, then
1 - at the beginnig of the handling function disable the button that the user pressed using the wrapper class m_ctrlButtonOK.EnableWindow(FALSE) (same as GetDlgItem(ID)->EnableWindow(FALSE))
2 - perform a long work
::MessageBeep(MB_OK);
::Sleep(10000);
works fine...
3 - at the end of the function call m_ctrlButtonOK.EnableWindow(TRUE)
If you click on the OK button while it is disabled, you will see that after the work the handler function get called once again.
Thank you and ciao...
Daniele
|
|
|
|
|
Dear all, I found the solution and I like to share it with you.
I took the idea from an article I have found on your site,
http://www.codeproject.com/cpp/cppforumfaq.asp#ui_workerthread
I implemented this code within the button handler and... wonder!, it works.
OnButtonClicked()
{
m_crtlButton->Enable(FALSE);
while (Do_A_Bit_Of_Work())
{
MSG msk;
while(PeekMessage(&msg, NULL, NULL, PM_NOREMOVE)
{
AfxGetApp()->PumpMessage();
}
}
m_crtlButton->Enable(TRUE);
return;
}
Ciao and thanks for your kind help.
Daniele
|
|
|
|
|
Hi,
why don't u check LockWindowUpdate() and unLockWindowUpdate().
Lokesh
|
|
|
|
|
I'm sorry, it desn't work.
Ciao...
Daniele
|
|
|
|
|
Hi, All
I want to implement a signature mechanism. My application can
verify the validity of DLL for preventing others replace my dll.
This is just like CSP signature mechanism.
Thank you in advance for your help.
Owen.
|
|
|
|
|
Hi,
You can verify for the dll using its signatures stored in its headers. eg u can use TimeDateStamp of ur dll, or size of code base.. or u can set MinorImageVersion of the DLL when u build the data and verify the same...
u can check for size of headers sections so on...
better refer this article before u continue....
ms-help://MS.MSDNQTR.2004JAN.1033/dndebug/html/msdn_peeringpe.htm in MSDN
all the best...
gP_t_gr8
|
|
|
|