|
I think what you need is to show the tooltips on the controls of the dialog?
Right?
Use CToolTipCtrl.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
_AnShUmAn_ wrote: Right?
Not entirely. The "balloon" message is displayed regardless of the mouse's position. It is displayed only when the password control has focus.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Adding tooltip is simple. Just google for it...
OnFocusing the edit box get the key state using GetKeyState(VK_CAPITAL) .
The retun value will be 1 if CAPSLOCK is on see detailed return values below.
. If the high-order bit is 1, the key is down; otherwise, it is up.
. If the low-order bit is 1, the key is toggled. A key, such as the CAPS LOCK key, is toggled if it is turned on. The key is off and untoggled if the low-order bit is 0. A toggle key's indicator light (if any) on the keyboard will be on when the key is toggled, and off when the key is untoggled.
Check MSDN for more information
|
|
|
|
|
hi sir iam sorry this is not my question
but as you tell GetKeyState(VK_CAPITAL) is for tool tip
but sir where i can declare it if I MAKE AN DIALOG AND ON WHICH A EDIT BOX IS THERE
Ashish Dogra
MCA
Noida
|
|
|
|
|
ON_EN_SETFOCUS handler of the dialog class
e.g
BEG_MESSAGE_MAP()
ON_EN_SETFOCUS(IDC_EDIT1, OnSetfocusEdit1)
END_MESSAGE_MAP
void CSampleDlgDlg::OnSetfocusEdit1()
{
}
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
-- modified at 10:41 Tuesday 27th June, 2006
|
|
|
|
|
|
I all
I have the following scheme on two classes:
template <typename T> class MyClass {
public:
class MySubClass {
public:
~MySubClass( void );
};
}; And I tryed:
template <typename T> MyClass<T>::MySubClass::~MySubClass( void )
{
}
And also:
template <typename T> class MyClass {
public:
template <typename T> class MySubClass {
public:
~MySubClass( void );
};
}; With:
template <typename T> MyClass<T>::MySubClass<T>::~MySubClass( void )
{
}
But I get the message "error C2039: '__dtor' : is not a member of 'tBaseArray<T>'" for the 1st case and that same message plus "error C2935: '<Unknown>' : template-class-id redefined as a global function" for the 2nd case.
I tryed googling for __dtor, and it seems to be a function to enable using delete on a class, but I don't understand why I get this error neither how to bypass it.
Can anybody help?? =)
best regards
hint_54
|
|
|
|
|
Its working fine with my VC++ 7 compiler
template <typename T> class MyClass {
public:
class MySubClass {
public:
~MySubClass( void );
};
};
template <typename T> MyClass<T>::MySubClass::~MySubClass( void )
{
}
i created the instance as follows
MyClass<int> t;
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
That's exactly what I wanted.. But it's not working with VC++ 6 =$
thx
hint_54
|
|
|
|
|
VC6's template support was not complete, especially when dealing with complex classes like your example. Sometimes, you just have to say it ain't gonna work in 6.
BTW, "dtor" is the abbreviation for "destructor" (along with "ctor" for "constructor")
--Mike--
Visual C++ MVP
LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ
VB > soccer
|
|
|
|
|
How to get device context from the runtime class used in multithreading application. For the application I am using single document interface.
Is there any easy way to get device context whenever and whereever you want?
The way of Creating device context with CreateDC seems to be worse than creating
another application. Where to get driver file name which drivers are installed by windows automatically.
|| ART OF LIVING ||
|
|
|
|
|
A CDC* is passed to the view's OnDraw() method. The view's OnPaint() method creates a local CDC -derived object. Where else are you needing it?
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
In multithreading application we do pass RUNTIME CLASS.
In that runtime class we write the all the stuff which the thread is suppose to do.
Now my thread is going to draw something on document. My question is how to
achieve device context for the same purpose, and where to achieve
Moreover my application is crashing as I am not getting device context at the point
where I start using device context
|| ART OF LIVING ||
-- modified at 9:43 Tuesday 27th June, 2006
|
|
|
|
|
shivditya wrote: Now my thread is going to draw something on document.
How? The document is not something that can be drawn on. You can only draw on CWnd -derived objects (e.g., CView ).
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Friend sorry Its Single document interface application,CView is there.
|| ART OF LIVING ||
|
|
|
|
|
Of course. It stands to reason that if you have a document, you will also have a view. What makes no sense is that you wanted to draw on the document.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Actually I dint get your question.
It is possible to get device context by passing Window handle to ::GetDC function.
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
I tried all the stuff but how to get handle of SDI window from the class instance which is used inside runtimeclass which is being called by SDI using
AfxBeginThread
void CMy5CYLINDERView::support()
{
for(int ii = 0;ii < 1;ii++)
{
x[ii] = AfxBeginThread(RUNTIME_CLASS(SHIV)); //SHIV is my RunTime class.
}
}
//FOllowing is constructor which is using another simulate class instance engine.
SHIV::SHIV()
{
engine.getdata(0);
engine.nextpos();
}
//And this nextpos method requires DC to draw
void simulate::nextpos()
{
CWnd* cc;
cc = (CWnd*)GetWindow(();
CDC* pDC = cc->GetDC();
CBrush bluebrush,old,white;
white.CreateSolidBrush(RGB(200,
|| ART OF LIVING ||
|
|
|
|
|
shivditya wrote: CWnd* cc;
cc = (CWnd*)GetWindow(();
CDC* pDC = cc->GetDC();
CBrush bluebrush,old,white;
white.CreateSolidBrush(RGB(200,
which windows DC you want? MainFrame? Try AfxGetMainWnd() instead of GetWindow
SaRath.
"It is your attitude, not your aptitude, that determines your altitude - Zig Ziglar."
My Blog | Understanding State Pattern in C++
|
|
|
|
|
See AfxGetApp()->m_pMainWnd->GetDC()
whitesky
|
|
|
|
|
Thanks A Lot
Your suggestion worked very very well.
Yours faithfully
Aditya
|| ART OF LIVING ||
|
|
|
|
|
This is something you can check with Spy++, but i'll expect at least something like WM_CLOSE or/and WM_DESTROY or/and WM_NOTIFY.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
hi all
plz tell me how can i made animated a text or picture on a dialog box
i have made a dialog based application in which i want to show some data as animated
plz help
Ashish Dogra
|
|
|
|
|
Use GetDC() to get the DC of the dialog and use that to draw on the dialog.
TextOut to output the text.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
where i use getdc() in oninitdialog on on paint
plz tell me an example for this
Ashish Dogra
MCA
Noida
-- modified at 9:17 Tuesday 27th June, 2006
|
|
|
|