|
You want when you click 1 it insert to edit and run wm_keydwon,right?
|
|
|
|
|
Yes, when i clicked 1 it goes to keyboard.cpp,ther i wrote
void CKBoard::OnLButtonUp(UINT nFlags, CPoint point)
{
case 51 :
ActiveView->PostMessage(WM_KEYDOWN,49,0); break;
}
It executes the line and then it goes to OnkeyDown() in that particular dialog,their i wrote..
void CFaceDlg::OnKeyDown(UINT nChar, UINT nRepCnt, UINT nFlags)
{
case 49:
case 97:
sSktNumValue += "1";
break;
}
This is coding..when i debugged this coding the control after executing WM_KEYDOWN...It should go to Onkeydown() in that dialog..But the control goes to OnKEyDown() in te particular view where the dialog exist...So i wrote the codings of Dialog OnKeyDown() in to THat view class OnKeyDown() function.
Thats im asking is there anyway to get value which i pressed in keyboard go to dialog OnKeyDown or the control goes as it is View class OnKeyDown()but the final value should entered in that particular Dialog edit box...
Pls give any solution..
Anu
|
|
|
|
|
WM_CHAR isnt good for you
|
|
|
|
|
Hello! I am new to c++.
I am now trying to create a GUI based program using Microsoft Visual C++ 2005 Express Edition.
I have a question. I want that when I click the exit button, the whole program that I created will exit. Can anybody tell me how to do that?
|
|
|
|
|
Try ::PostQuitMessage(0); .
|
|
|
|
|
Robert Edward Caldecott wrote: ForumVisual C++ / MFC
Subject:Re: Exit the program.
Sender:Robert Edward Caldecott
Date:6:22 8 Aug '06
Try ::PostQuitMessage(0);.
Thanks for your reply. But, your code doesn't work.
|
|
|
|
|
|
|
See SendMessage(WM_CLOSE);
|
|
|
|
|
what type of application is urs?
I mean Dialog base or sdi etc?
nave
|
|
|
|
|
Hi,
if CForm View then Use ::PostQuitMessage(0);
if Dialog then use ::OnOK().
Good Luck.
Uday kiran
|
|
|
|
|
Hi,
I have included
using std namespace;
#include "vector.h"
in C++ compiler. The same file i'm opened in MSVC and compiled it ends with following error
error C2871: 'std' : does not exist or is not a namespace
fatal error C1083: Cannot open include file: 'vector.h': No such file or directory.
Just quick will do be great...
Rgds
vivek.s
|
|
|
|
|
vivek.s.vivek wrote: using std namespace;
Should be
using namespace std;
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
actually tried with using namespace std; (I have mistakenly specified in
the previous message). still showing an error
error C2871: 'std' : does not exist or is not a namespace
You only have to do a very few things right in your life so long as you don't do too many things wrong.
Vivek.S
|
|
|
|
|
vivek.s.vivek wrote: 'std' : does not exist or is not a namespace
Try doing this way :
#include "vector"
#include "iostream"
using namespace std;
What is the type of application and your IDE?
-- modified at 5:35 Tuesday 8th August, 2006
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
It is #include <vector> without the .h.
And you need to put the using std namespace; line after the include.
-- modified at 5:22 Tuesday 8th August, 2006
Oops, sorry, I read the line too fast. Of course, it is using namespace std;
|
|
|
|
|
Are you sure you have vector file in your computer
From the MSDN:
<br />
Fatal Error C1083<br />
Cannot open filetype file: 'file': message
|
|
|
|
|
hey all,
I am using CNTGraph class that was found in the codeproject website.
I can plot a graph that I want.
But there are 2things I want to do:
1. I want to replot the graph everytime I recieve a new set of data points.
How do I do it? Is there a 'clear' or 'delete graph points' function that can be used to clear the previous plotted points before a new set of data is plotted.
2.Also, how do I set the scale on X-axis and Yaxis?
say, I want the scale of the X-axis in terms of 2units.ie., X-axis range (I use SetRange()) is (0,10). but the scale has to be like 0 2 4 6 8 10? Is there a function to do this?
Can anyone help me?
|
|
|
|
|
thathvamsi wrote: Can anyone help me?
Ask on the forum at the bottom of the articles, you'll perhaps have an answer from the author.
|
|
|
|
|
Hello...
I already had create hex editor program using visual c++.the problem is i dont know how to save my word which i'm edit through editbox control to hex editor file before...can u give some example code that can help me..to develop this program.
krie junior
|
|
|
|
|
krie wrote: i dont know how to save my word...
To where/what?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Is it possible to call a constructor without an existing object?
Class A
{
int b;
A(){b=0;}
}
From the class above when i call the constructor without an object of type A, the compiler does not complain even if there is no space for the variable "b" yet..
Moreover it is also possible to write a line of code like the one below:
const A & ref=A(); //without calling new A();
Is it all about something special to .NET 2003
Thanks in advance..
|
|
|
|
|
quantum17 wrote: From the class above when i call the constructor without an object of type A
How are you doing this ? If you mean doing this:
A Test = A();
Then this line actually creates an instance of the class.
quantum17 wrote: const A & ref=A(); //without calling new A();
The same here.
It's not because you don't create your object dynamically (with new) that your constructor is not called. It's called in BOTH cases.
|
|
|
|
|
Writing A() means "create a new object of type A and call its default constructor". Note that this:
const A& ref=A(); is wrong because the A object is destructed once the statement is executed, so the reference is no longer valid.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
|
|
|
|
|
I have created a tiff file from using CxImage. I have DivaServer card which is capable of sending fax from one system to another system using phone connections. Its documentation has a sample which sends fax when we giving it a tiff file.
We can create a tiff file through our windows print dialog which is displyed when we click on menu file->print and check the check box "Print to file" and press print button.
And i can also create a tiff file now using CxImage class.
The problem i am facing now is the sample is sending and receiving the tiff file creted from file->print--"print to file" option correctly. But tiff file created from CxImage is not being sent and received correctly. Sample is showing a log "ERROR"&"ABORTED".
All I can findout is the formats of the two tiff files are different from ont another.How to resolve this. I want my tiff file generated like this or from any other source is to be sent and received correctly.
If anybody have any idea or suggesion please help me.
KIRAN PINJARLA
|
|
|
|