|
I write this code in OnBtn1Click():
TRACE(".......state is %x........\n", m_btn1.GetState());
when I click the other buttons, if m_btn1 highlights, debugger will types".......state is 8........". And I just find, need not click the other buttons, if I switch to other application window, while m_btn1 highlights, debugger will type same message also.
It's strange.
|
|
|
|
|
Post the code of the message map of your dialog class (the part that starts with BEGIN_MESSAGE_MAP(CYourDialog, CDialog) and finishes with END_MESSAGE_MAP()
Post also the code for the OnBtn2Click handler function
|
|
|
|
|
BEGIN_MESSAGE_MAP(CMyDialog, CDialog)
ON_BN_CLICKED(IDC_BTN1, OnBtn1Click)
END_MESSAGE_MAP()
There is no code for m_btn2
I find something new, I am sure it because focus, when m_btn1 lost focus, if it hightlights, OnBtn1Click() is called. But I don't konw how to prevent it.
My code is very simple, you may create a dialog application and put 2 buttons on dialog, I think you will find the same thing.;)
|
|
|
|
|
What does the project's resource.h file look like? When was the last time you did a rebuild-all?
"Let us be thankful for the fools. But for them the rest of us could not succeed." - Mark Twain
"We will be known forever by the tracks we leave." - Native American Proverb
|
|
|
|
|
Why are you calling m_btn1.SetState() ? If you're wanting a button that is alternately on and off, use a checkbox with the push button style. Windows will then take care of the button state automatically.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
sorry my friends, I use a checkbox now, but same thing happens again.
Q:when the checkbox lost focus, if it's on state, it will become off state. while I want it to keep its on state until I press it again.
help me!
|
|
|
|
|
Hi,I have some trouble!Please help me!
When I run command promt(cmd.exe),I can open a text file by typing,example : C:\>type Text.txt
Then, it will open the Text.txt in that command prompt window!
How can I do that in MFC Application!Example,When I press a button,it'll open command prompt!And then,the command prompt will automatic open the specified Text file!
Please,Help me!!!
|
|
|
|
|
Use ShellExecute to start the command prompt.
Pass the command as a command line argument to the command prompt with the switch /k turned on.
for eg:
cmd /k type help.txt
or
cmd /k dir
Nibu thomas
Software Developer
|
|
|
|
|
Ok!I got it!
Thank A lot !!!
|
|
|
|
|
Hi All,
Can anyone suggest me a way to record audio lively from microphone using DirectShow?
Thanks,
Poornima
|
|
|
|
|
|
I've been trying to learn a bit of MDI , but I'm failing everytime. Anybody has links where I can learn MDI with a simple Example? I want to learn SDI with Multiple views too. Any help?
NULL
|
|
|
|
|
Search CP with the keyword MDI and see what happens.
Nibu thomas
Software Developer
|
|
|
|
|
Really poor response for the 'MDI' search . Did you search ? I actually needed a SIMPLE MFC MDI application.
NULL
|
|
|
|
|
|
Seriously I hate DOC/VIEW, MDI stuff
NULL
|
|
|
|
|
|
|
The link which is at the top, (developer.com) is excellent, and down to earth. Really superb , but it would have been better if he had continued deeper. Anyway it gave me a good basic idea about MDIs. Thanks again.
NULL
|
|
|
|
|
Hi
I tried to make a Native application with the help of following links:
http://www.codeproject.com/system/idd.asp AND
http://www.sysinternals.com/Information/NativeApplications.html
Here did settings and include library files for DDK.
and compile the program and compiled successfully, but when build the program it gives following error
Linking...<br />
LINK : error LNK2001: unresolved external symbol _DriverEntry@8<br />
hello.obj : error LNK2001: unresolved external symbol _NtTerminateProcess@8<br />
hello.obj : error LNK2001: unresolved external symbol _NtDisplayString@4<br />
Release/hello.exe : fatal error LNK1120: 3 unresolved externals<br />
Error executing link.exe.<br />
<br />
hello.exe - 4 error(s), 0 warning(s)<br />
So Please tell me that how to remove these errors.
Thanks
|
|
|
|
|
Have you linked to the necessary libraries?
Nibu thomas
Software Developer
|
|
|
|
|
Ya, have linked necessary libraris
ntoskrnl.lib hal.lib ,
Please help.
Thanks
|
|
|
|
|
rajeevktripathi wrote: Ya, have linked necessary libraris
ntoskrnl.lib hal.lib ,
You are missing something! Do check again for the required libraries.
Nibu thomas
Software Developer
|
|
|
|
|
hai everyone
i would like to know how can have different colors for the items present in a list control
|
|
|
|
|