|
U can handle the CWinApp:OnIdle function..
use Class Wizard to add that function...
Vrush
|
|
|
|
|
I have a Database Probelm . I am using ms-acess using the dao connectivity. Now when I use a command in dao to open the database , It gives me error as Unable to initialize dao/jet database engine.
Kindly suggest some solution for it.
Samir Sood
|
|
|
|
|
Do you need to start COM ( CoInitialise ) ???
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Do you mean it's suddenly stopped working, or it's never worked?
If it's just stopped, then open the database in access, and repair and compact it, which should fix your problems.
It could also be that you don't have the Jet Drivers installed. These will be installed automatically if you install Access or Excel (and should've been installed with VC++ too)
I think you can download them here
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Thank you very much . Actually the probelm was that that i did not have the jet 3.5 driver installed. Now I have installed it and it is working fine.
Thanks a Lot.
Samir Sood
|
|
|
|
|
Glad to be of help
--
Help me! I'm turning into a grapefruit!
|
|
|
|
|
Hi,
I want to do something (pop a message box for eg.), when the user clicks the caption window. Its a non client area.. and there are messages like WM_NCLBUTTONDOWN and WM_NCLBUTTONUP. So, do i have to wait for these two messages to happen in quick succession, to conclude that a mouse click happend? (???!!!). Can you help please?
|
|
|
|
|
|
No, he wants it in the non-client area.
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
|
Dave Matrix wrote:
So, do i have to wait for these two messages to happen in quick succession, to conclude that a mouse click happend?
Just handle OnNcLButtonDown. It's called when you click on the non-client area like say the caption. Once OnNcLButtonDown is called however, OnNcLButtonUp is not called. OnNcLButtonUp is called only when you drag the mouse into the non-client area and release the mouse there
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Does anyone have any tips on how to do a screen capture the same way windows does it when pressing the Print Screen key?
I don't mean simulating a key click programmatically and then retrieving the clipboard data, I mean doing it via GetDC() etc
Currently I do it using GetDC(NULL); and then BitBlt'n to my DC but this doesn't grab layered windows on Win2k/XP which have a partial transparency.
|
|
|
|
|
Hi,
Does anybody have any sample about Automation with Outlook 2000? I need something like:
1) get what messages are stored inside each folder,
2) delete a message
3) read a stored message
and so on...
Thank u very much,
Dirso
|
|
|
|
|
See Q241287 and Q220600 in Microsoft KnoledgeBase
Bye,
Orbital^
...the night is long ... but not long enought to do some real coding ...
|
|
|
|
|
Is there a routine already written and available to convert from a string (or CString object) to a date/time variable (such as a CTime object, SYSTEMTIME structure or FILETIME structure)?
|
|
|
|
|
Take a look at COleDateTime::ParseDateTime()
Dave
|
|
|
|
|
Hello,
I wrote a program that opens DIBs (bitmaps) and saves them as well.
I'd like to be able to snap image/screen cap them, similar to the way Window->new opens a new window with the information from the old window in it. (i.e. a Bitmap in one window will appear in the next if I click window->new.)
Does anyone know how I can get the DIB of that open window? Or where the code that Window->New uses is? I'd like to actually see the code for hwo it is done, so I can write my own window->new. Even if that sounds redudant, it's a good learning thing.
Not to be too pesky, but if anyone knows where the code FileOpen uses is is also, I'd like to know. I'd like to write my own File Open that does the same thing.
Thanks guys,
NickOne
|
|
|
|
|
FileOpen calls stuff from your Mainframe down to your Document class. File|New, if it copies the bitmap, would do it on the internal resource. Getting a DC to the screen and copying the bitmap is how you do a screen capture. Something like CWindowDC dc(NULL);
Christian
I am completely intolerant of stupidity. Stupidity is, of course, anything that doesn't conform to my way of thinking. - Jamie Hale - 29/05/2002
|
|
|
|
|
Hello,
MSDN says
void UpdateAllViews(
CView* pSender,
LPARAM lHint = 0L,
CObject* pHint = NULL );
Now this call is in my menuclick event in the doc cpp. Lets say a view class called CViewTwo generated the click. I want view1 to reflect the changes, but not sending class (the CViewTwo class). I think if I dont have a NULL argument, it excludes the update of pSender. I am not sure exactly what will go into CView* pSender. How do I get the pointer to my sending viewclass from the doc click event?
Thanks so much!
|
|
|
|
|
If your doc handles the click, there is no sending view.
You need to handle the click in the view, not the doc, to do what you're asking.
|
|
|
|
|
CDocument::GetFirstViewPosition
MSDN Says it better
Papa
Murex Co.
Papa Charchabil
|
|
|
|
|
jim is right
to do your task the calling should be in view
it can be done in following way
suppose your classes are
CMyDoc
CView1
CView2
now in CView2 class on handler of the click event u can do this
CMyDoc *pDoc=this->GetDocument();
pDoc->UpdateAllViews(this);//passing this as argument excludes the view from which the function is called
pDoc->UpdateAllViews(NULL);//updates all views attached to document including the view from which the function is called(in this case view2)
surbinsho
|
|
|
|
|
Thank you so much for the responses. It works well, but I do have to set the controls newvalues by coding the OnUpdate event of the view thats supposed to reflect the changes. I get the doc pointer both in the sending view (to set the new value for the doc variable , as well as in the receiving view where I get the doc pointer in order to access the newly changed value.
Thanks,
ns
|
|
|
|