|
Hi all,
please tell me how can SetTimer on Modeless dialog box.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
The same way you set timer for a modal dialog...
|
|
|
|
|
i m trying same method but its not working in case of modeless dialog box.
use
SetTimer(1, 500, NULL);
void CTest_Dlg::OnTimer(UINT_PTR nIDEvent)
{
switch (nIDEvent)
{
case 1:
AfxMessageBox(_T("Timer"));
break;
}
CDialog::OnTimer(nIDEvent);
}
this working fine in modal dialog box.but OnTimer not call in case of modeless dialog box.
please help me for this.
thanks in advance.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
It should work fine.... hope your messagemap contains
ON_WM_TIMER() entry. pls check.
|
|
|
|
|
yes i have ON_WM_TIMER() in my message map.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Since your dialog is modless, who runs the message loop? another dialog?
Try this. Just after the dialog creation put a messagebox...and then check whether the timer is triggered or not...
|
|
|
|
|
I m already use AfxMessageBox in timer but its never popups.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
its ok. Keep that message bo as it is..
I asked you to add another messagebox just after the creation. this to check whether this is as problem of the message loop...
|
|
|
|
|
Why are you calling AfxMessageBox() from within the timer callback routine? I cannot think of any reason why that would ever be the right thing to do. If you are debugging, use something that does not block (e.g., TRACE() ).
"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
|
|
|
|
|
Just checking timer function called or not.
To accomplish great things, we must not only act, but also dream;
not only plan, but also believe.
|
|
|
|
|
Hi
I am looking for a good serialization design which can support multi-inheritance.
If anyone knows a good class, please me know.
Best regards,
modified on Monday, May 18, 2009 9:02 AM
|
|
|
|
|
|
i have the following problem, when i print the output to the CEditview window, the line is too long that it get broken and start a new line onspite of
i did not instruct the programm to break the line and complete it in a new line.what is wrong?
|
|
|
|
|
try adding autohscroll and horizontal scroll bar style to the edit view
|
|
|
|
|
can you give me the code please?
|
|
|
|
|
Overload the PreCreateWindow() funcion of the editview class, in that add WS_HSCROLL and ES_AUTOHSCROLL.
....::PreCreateWindow(..)
{
lpcs->style |= WS_HSCROLL|ES_AUTOHSCROLL;
.....
}
|
|
|
|
|
In the Test_View.cpp i h vae the code but it does not work
BOOL CTest_View::PreCreateWindow(CREATESTRUCT->cs)
{
cs.style |= WS_HSCROLL|ES_AUTOHSCROLL;
return CEditView::PreCreateWindow(cs);
}
|
|
|
|
|
Hi all,
I have a richedit control in my program (which is unicode compiled). This richedit control refuses to display the ALT+nnn codes. Instead some sort of random junk (boxes) appear after I let go of the alt key and press any other key. I load the "RICHED20.DLL" library. Another fact is that i can paste unicode characters in the control. It is only with the typing, that the control seems to have a problem. Any help will be appreciated. Thanks in advance.
|
|
|
|
|
I have written a program (C++/MFC) to obtain the correct time from a time server and set the system clock. Unfortunately, Vista & Win 7 with UAC enabled block this operation. How can I elevate the program's security privledge level so that I can set the clock? Is that the right approach? If not, how else might I go about it? I wouldn't have thought the system time would be that protected, but it obviously is. I am using a Code Project solution CSNTPClient class and the class function CSNTPClient::SetClientTime(CTime newTime) The solution on my own machine is to turn UAC off, but that's not practical or reasonable on other people's computers.
Thanks.
Ron
|
|
|
|
|
Source
send me
pencil80@nate.com
|
|
|
|
|
You want us to send you the source to the source in the zip that you've uploaded onto your own website?
|
|
|
|
|
Do you intend to learn recursions?
You forgot to mention the condition, when would this end!
You need to google first, if you have "It's urgent please" mentioned in your question.
_AnShUmAn_
|
|
|
|
|
|
Hi to All,
I have used the find() function of string lib in my program.
Now my problem is I need to search for case insensitive sub string.
Please help me to convert my code .
My code sample is.........
string::size_type loc=Myword.find("TaG"); //searching if tag/Tag/tAg...is present in the string
if(loc!= string::npos)
{
//tag is present
}
else
{
//"tag absent";
}
thanks in advance
HimangshuS
-----------------------------
I am a beginner
|
|
|
|
|
You have two options
Override your own string type that's case insensitive:
Clicky[^]
Or just make lower case copies of the string and substring, and use find with those.
|
|
|
|