|
Basically what I want is I am copying from background window to my application few text data. WHn I want to cut the data from background window I need to switch to it I want to do it with mouse, if mouse goes to title area immediatly my background application come forward. I will copy the etxt and paste to my application. problem is I can get the effect by ShowWindow(SW_MINIMIZE) but then i can see the window going to left bottom corner visibly. which is irritating on slow machines.
-- modified at 8:49 Monday 19th June, 2006
|
|
|
|
|
|
|
Try this:
CWnd * wnd = ....;
HWND hwnd = *wnd;
HWND hwnd = wnd->m_hWnd;
|
|
|
|
|
Viorel. wrote: HWND hwnd = *wnd
Does this really work ? Never seen it before...
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
|
|
|
|
|
Rage wrote: Does this really work?
Yes, it works thanks to a cast operator within CWnd : "operator HWND() const; ".
|
|
|
|
|
CWnd* pMyCwnd = new CWnd();
pMyCwnd->m_hWnd // This is the HWND of CWnd class
Too many plans make the health badly!!
|
|
|
|
|
you can use if you have a CWnd from m_hWnd
---------------
HWND hWnd=this->m_hWnd;
whitesky
|
|
|
|
|
|
Or you do this
CWnd *pWnd
HWND MyHandle = (HWND) pWnd
|
|
|
|
|
Dear All,
I am a newbie in Visual C++. I have a project to make. That project needs to communicate with the 5 tables in the Microsoft Access. Each table is a reference for the others.
Each record contains 4 fields. I would like to guide me how I could read that tables.
Until now I try to do it with the MFC . I start a new application with database support. The wizard find in a step which give me the option to choose one of the five tables. I do not know what I am doing wrong and I cannot select all of them. May be I made some mistake may be the MFC does not supported.
I am waiting hearing from you as soon as possible.
Thanks in advance for your time.
Best Regards,
Konstantinos.
konstantinos
|
|
|
|
|
Hi
Please refer CDaoDabase in MSDN Help
regards
KK
|
|
|
|
|
Dear All,
Thanks for your immediately response. I download the demo and I looked into the MSDN. Could you please advice me where I made the mistake? I attach the I have written. I take an error that CDatabase does not exit or undeclared variable.
Thanks for your time.
Best Regards,
Konstantinos.
void CIsup_semi_1Dlg::OnOK()
{
// TODO: Add extra validation here
CDatabase database; //error
CString testing,final_bytes[1000];
int bytes,final_decimal[1000],cbyte,counter=0;
char buffer[50];
unsigned short hbyte,lbyte,all_bytes[1000];
UpdateData(TRUE);m_input.MakeUpper ();
for (register i=0;i<=m_input.GetLength()-1;i++){
hbyte=m_input.GetAt(i);
|
|
|
|
|
See if this article helps at all.
"The largest fire starts but with the smallest spark." - David Crow
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
|
tantDear All,
Thanks for your immediately response. I download the demo and I looked into the MSDN. Could you please advice me where I made the mistake? I attach the I have written. I take an error that CDatabase does not exit or undeclared variable.
Thanks for your time.
Best Regards,
Konstantinos.
void CIsup_semi_1Dlg::OnOK()
{
// TODO: Add extra validation here
CDatabase database;
CString testing,final_bytes[1000];
int bytes,final_decimal[1000],cbyte,counter=0;
char buffer[50];
unsigned short hbyte,lbyte,all_bytes[1000];
UpdateData(TRUE);m_input.MakeUpper ();
for (register i=0;i<=m_input.GetLength()-1;i++){
hbyte=m_input.GetAt(i);
konstantinos
|
|
|
|
|
Do you include afxdb.h
whitesky
|
|
|
|
|
Hello to everyone,
I have developed a SDI MFC application. So what I want is when my mouse is hovering over the application window (any window.. main window, title, views anything), it should work properly, As the mouse moves out of application or windows , it should give some dialog box message that you are out of application area. now if mouse goes out of scope then it should not give so many dialog box messages.. only one is enough so that I wont be wasting time destryoying those messageboxes and go straight to application area. How can this be made?
row
|
|
|
|
|
if ur tracking the mouse leaving by checking the NC messages u should have to keep the flags to prevent multiple message box beign displayed...
Else
use TrackMouseEvent API
nave
|
|
|
|
|
I think TrackMouseEvent will be tracking only client area of the window .
(also which handler I would be keeping this function)
What I want is if the mouse is moving or clicking or hovering on any portion of the window, its ok, but when it completely goes out of application windows then it should give some kind of notification.
-- modified at 8:04 Monday 19th June, 2006
|
|
|
|
|
|
ROWALI wrote: I think TrackMouseEvent will be tracking only client area of the window .
no.
check the dwFlags of the TRACKMOUSEEVENT structure.There u can find TME_NONCLIENT
nave
|
|
|
|
|
Mine is a MFC SDI application.
So where can I keep this function? in Application class's OnIdle even or where?
|
|
|
|
|
Use global or class variables to determine if message is already on screen.
I guess I solve your problem?
|
|
|
|
|
Can you be more specific?
I dont get it.
|
|
|
|