|
my friends :
the problem here '\"'
|
|
|
|
|
i need to do an operation twice,so i do a button click twice..but i get this error..in win core.cpp.what should be done???
ASSERT(pWnd->m_hWnd == NULL); // only do once
Raja
|
|
|
|
|
Please post the 'offending' code.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
|
|
|
|
|
Can you Post code written for OnButton Ckick.
-@SuDhIrKuMaR@-
|
|
|
|
|
Can you show your code and is this question depends to your previous question?
|
|
|
|
|
And me too - "Please show the code snippet of Button click handler"
Regards,
Jijo.
_____________________________________________________
http://weseetips.com[ ^] Visual C++ tips and tricks. Updated daily.
|
|
|
|
|
Mohanraj D wrote: ASSERT(pWnd->m_hWnd == NULL); // only do once
Posting some code will help, but anyway! Looks like you are recreating a window that has already been created. You need to call DestroyWindow before recreating a window.
An ASSERT is provided just to warn you about an invalid action.
Nibu thomas
Microsoft MVP for VC++
Code must be written to be read, not by the compiler, but by another human being.
Programming Blog: http://nibuthomas.wordpress.com
|
|
|
|
|
how to prevent multiple clicks over a button??i need the button click to be done only once and after the operations inside the button are complete i need to enable the button,what should be done??
Raja
|
|
|
|
|
If you think its not your answer more info is helpful when you clicked button you can check your situation if its not you can insert EnableWindow(0).
|
|
|
|
|
After click disable the button in button handler itself. After completing enable the button.
-@SuDhIrKuMaR@-
|
|
|
|
|
It was reply to me or to asker?
|
|
|
|
|
Call myButton.EnableWindow (FALSE); as first line in the called function, and with TRUE in the last line before returning.
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
i have a series of dialogs to be displayed in sequence but in a particular button click i have given the code to display the next dialog but it displays the previous dialog!!!!!y is that so???the code is and test2 is the next dialog
void test1main::OnBnClickedOk()
{
test2 onclick_ok;
onclick_ok.DoModal();
}
Raja
|
|
|
|
|
You want to show Dialog3 but you see Dialog2 when run this code?
|
|
|
|
|
yes...i want dialog3 to be displayed from dialog2 but dialog1 is displaying
Raja
|
|
|
|
|
How did you declare dialogs?
|
|
|
|
|
Check for Dialog IDD if they matching change them.
-@SuDhIrKuMaR@-
|
|
|
|
|
Can anyone advise with this?
I am tring to write a MFC dialog application that displays a window that says "Hello" when the program is run, and has an OK button and a Cancel button. The screen will close when either of the buttons are clicked. Im not sure how to do this on Visual C++ 2008.
|
|
|
|
|
You can use of MessageBox and you can set for it Ok,Cancel Or yes/no.
|
|
|
|
|
You want Yes and NO on the message box you are displaying.
-@SuDhIrKuMaR@-
|
|
|
|
|
I'm tring to write a recursive function that takes as a parameter a non-negative integer and generates the following pattern of stars if the integer is 4.
*
* *
* * *
* * * *
* * *
* *
*
#include <iostream>
#include <iomanip>
#include<fstream>
using namespace std;
int func(int x);
int main(int argc, char *argv[])
{
func(4);
system("PAUSE");
return 0;
}
int func(int x)
{
int i;
if (x>=0)
func(x-1);
for (i=1; i<=x; i++)
{
cout<<"* ";
}
cout << endl;
return 1;
}
Above code gives me
*
* *
* * *
* * * *
Below code gives me
* * * *
* * *
* *
*
#include <iostream>
#include <iomanip>
#include<fstream>
using namespace std;
int func(int x);
int main(int argc, char *argv[])
{
func(0);
system("PAUSE");
return 0;
}
int func(int x)
{
int i;
if (x<=3)
func(x+1);
for (i=1; i<=x; i++)
{
cout<<"* ";
}
cout << endl;
return 1;
}
How do I put these codes together to get
*
* *
* * *
* * * *
* * *
* *
*
|
|
|
|
|
codedecode wrote: How do I put these codes together ...
How about just calling both methods?
/ravi
|
|
|
|
|
Then it won't be a recursion, just a double call
Regards.
--------
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
“The First Rule of Program Optimization: Don't do it. The Second Rule of Program Optimization (for experts only!): Don't do it yet.” - Michael A. Jackson
Rating helpfull answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
Nelek wrote: Then it won't be a recursion,
He's already implemented each call using recursion.
So it's a matter of calling each recursive method sequentially (which could also be done recursively, if the instructor insists on being pendantic).
/ravi
|
|
|
|
|
Please forgive me, I am new to coding. What do you mean by call both methods?
|
|
|
|