|
Hello,
a friend would like to use ViM as default editor for the VisualC++ IDE ( i don't know why .. These UNIX guys....).
Is there a way to do that ?
Stephane
|
|
|
|
|
Hi,
I am writing a ticker. I am using a memDC to draw everything to a bitmap, then blit it to the real DC. My question is:
After drawing everything to the memDC then blitting to the real DC. I want to save the memDC as a bitmap.
I do the following now:
...
// Draw everything to the memDC, then blit it to the real DC.
memDC.CreateCompatibleDC(pDC);
memBmp.CreateCompatibleBitmap(pDC, m_rectClient.Width(),
m_rectClient.Height());
pOldBmp = memDC.SelectObject(&memBmp);
...
But when I try to look at the memBmp it has nothing in it. How do I save the memoryBitmap so I can use it the next time I scroll?????
Thanks in Advance
John Mancini
|
|
|
|
|
Does anyone know what a worker pointer is? A colleague of mine who is learning C/C++ was asked to demonsatrate a piece of code using worker pointers, but what is that?
|
|
|
|
|
I've heard of smart pointer, NULL pointers, and dangling pointers. But worker pointers? Nope. My guess is that they're just local pointers which are used when traversing an array or a linked list; sort of like "iterators".
Anyone else have an idea?
Alvaro
|
|
|
|
|
Here is a VB test app. It is not very complex or clever, but it works.
Dim WithEvents mcs As MCSClient
mcs.Initialize "MyString"
where MCSClient is a com object added to the VB environment by adding a reference. Not a component, but a reference.
I would like an equivalent VC app to this VB app. So I wrote some code like this.
I use the Wizard to generate a wrapper class over the same dll the VB referenced and in my header I define a variable of the wrapper type as such.
IMCSClient m_IMCSClient;
Then in my code I successfully create the dispatch like so.
if(((*(COleDispatchDriver*)(&m_IMCSClient))).m_lpDispatch==NULL){
if (!(m_IMCSClient.CreateDispatch("4E51E425-021E-11D2-B759-0020AFF84106", &oe))) {
}
}
I can also use the progid in creating the dispatch, either way works.
Here comes the problem, I want to perform the Initialze method. (Just like VB did.)
m_IMCSClient.Initialize("MyString);
When, this code excutes it will throw the following exception.
DISP_E_MEMBERNOTFOUND
I am not sure what it means.
Is anyone familar enough with VB to know what WithEvents means?
Can anyone suggest a different course of action.
|
|
|
|
|
Hi !
When you create the object in VB using "WithEvens" it means that the object can fire events. See VB documentation for more details.
You are trying to use the IDispatch interface but probably the object you are using supports dual interfaces. It's much easier from C++ and much faster. You can use the #import directive with the name of the DLL file you are using to import the type library information and the use the QueryInterface function.
Regards,
Alex Gorev,
Dundas Software.
==================
The original message was:
Here is a VB test app. It is not very complex or clever, but it works.
Dim WithEvents mcs As MCSClient mcs.Initialize "MyString"
where MCSClient is a com object added to the VB environment by adding a reference. Not a component, but a reference.
I would like an equivalent VC app to this VB app. So I wrote some code like this.
I use the Wizard to generate a wrapper class over the same dll the VB referenced and in my header I define a variable of the wrapper type as such.
IMCSClient m_IMCSClient;
Then in my code I successfully create the dispatch like so.
if(((*(COleDispatchDriver*)(&m_IMCSClient))).m_lpDispatch==NULL){ if (!(m_IMCSClient.CreateDispatch("4E51E425-021E-11D2-B759-0020AFF84106", &oe))) { } }
I can also use the progid in creating the dispatch, either way works.
Here comes the problem, I want to perform the Initialze method. (Just like VB did.) m_IMCSClient.Initialize("MyString);
When, this code excutes it will throw the following exception. DISP_E_MEMBERNOTFOUND
I am not sure what it means. Is anyone familar enough with VB to know what WithEvents means? Can anyone suggest a different course of action.
|
|
|
|
|
Hi there,
I am bringing up a Form in a VB ActiveX DLL in VC++ by using #import. If the Form in VB is Modal, everything works fine, but if I declared the Form Modeless, then I will get an very unhelpful error message --
"Unknown Error 0x800A016"
Any of your input will be greately appreciated. Thank you for your time!
Linda Yang
|
|
|
|
|
I would like to open a specified MS Access database, run a report (within Access) and print the report. Does anybody have an idea how to do it using Access2000.
thanks
|
|
|
|
|
==================
The original message was:
I would like to open a specified MS Access database, run a report (within Access) and print the report. Does anybody have an idea how to do it using Access2000. thanks
|
|
|
|
|
==================
The original message was:
I would like to open a specified MS Access database, run a report (within Access) and print the report. Does anybody have an idea how to do it using Access2000. thanks
http://www.codeguru.com/mfc_database/access_reports_class.shtml
|
|
|
|
|
Platform: VC++6.0 NT4.00 SP4
Hi
We are facing a problem. If a simple mfc app is created on english version of Windows NT and run on the Japanese Windows 95/98/NT4 machine, any dialogs/property sheets or windows are shown with increased height and width. These windows cover almost entire screen area. Can anyone suggest any solution?
|
|
|
|
|
MFC changes the dialog font to a font that supports DBCS characters. If the font remained as MS Sans Serif (as on English Windows), DBCS characters wouldn't display properly (you'd get mojibake).
The code for this is in CWnd::CreateDlgIndirect() in dlgcore.cpp.
--Mike--
==================
The original message was:
We are facing a problem. If a simple mfc app is created on english version of Windows NT and run on the Japanese Windows 95/98/NT4 machine, any dialogs/property sheets or windows are shown with increased height and width. These windows cover almost entire screen area. Can anyone suggest any solution?
|
|
|
|
|
We have the same problem here. The problem is using the resource for your GUI layouts the position gets all messed up. They way we are dealing with it is by dynamically moving all the windows/controls on initialization based on other windows next to it. For example, if you had a button in the middle of the screen, instead of just placing it the resource editor, we would inside of the OnInit we would calculate the window size, calculate the button size and the find the coordinates to move the button into the center. It is a pain in the a$$, but its the only way we can guarntee that everything is going to be where we want it. Good luck.
|
|
|
|
|
Design a different resource for japanese gui and load it as you detected in your application. It should solve the problem easier.
However I wonder If you could dipslay japanese character in CStatic run under English window nt version and set font to MS gothic. The reason is that I can display japanese characters correctly by setting font to MS gothic in MS access under English window nt version and english Access version. However there is something that MS handle to display japanese characters when font is setting to MS gothic. I try to put some text in Vb control and set font to MS gothic some control work and some don't
Any idea
|
|
|
|
|
I am looking for code which promotes a web site to search engines or which determines the position of a web site in a search engine. I would love to see and study some example code, so that in time, I could figure out how to actually promote a web site.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Erich J. Ruth
|
|
|
|
|
If you don't mind the zzz and yyy naming for the variables <g>
I think this link is what you are looking for
http://users.neca.com/vmis/addget.htm
==================
The original message was:
I am looking for code which promotes a web site to search engines or which determines the position of a web site in a search engine. I would love to see and study some example code, so that in time, I could figure out how to actually promote a web site.
Please, any response any one can give me will be greatly appreciated.
Sincerely, Erich J. Ruth
|
|
|
|
|
I have an application, that on startup displays a login window.
I would like to be able to somehow find out when that window appears, and then fill in the required fields, and close the window.
I am currently setting up a timer to periodically call a method to check (using FindWindow ) whether the window has appeared.
It works, but I was wondering if there is another better way of achieving this ? (some window creation message that I can trap, perhaps)
thanks for any input
|
|
|
|
|
Problem:
I want to create a class in the static lib that has an unknown base class . Unknown means it must be a CWnd or CView or a class derived from one of those. The reason is so I dont have to maintain the code in multiple classes as I want to use the class in a CView derived class and CWnd derived class, but another person needs to use it in a CBaseView derived class and a CBaseWnd derived class. The problem I have come across so far is the message map and the IMPLEMENT_DYNAMIC macros. Any Ideas? Open to sugestions for a better solution.
|
|
|
|
|
I have a RichEditCtrl that "initially" does not diplay text that is pasted into it (using my_RichEditCtrl->Paste() or by Shift-Insert,Ctrl- V). The text "is" displayed if you then obscure the window and cause a redraw.
What do I have to do to get the text to be made visible after the paste? Is it something to do with the configuration of the RE Ctrl, e.g in the Create call, or something I must do after the paste?.
Thank-you
Steve
|
|
|
|
|
I found that calling
m_pMyRichEditCtrl->RedrawWindow();
does the trick but why? What's going on? Are there others ways?
Steve
==================
The original message was:
I have a RichEditCtrl that "initially" does not diplay text that is pasted into it (using my_RichEditCtrl->Paste() or by Shift-Insert,Ctrl- V). The text "is" displayed if you then obscure the window and cause a redraw.
What do I have to do to get the text to be made visible after the paste? Is it something to do with the configuration of the RE Ctrl, e.g in the Create call, or something I must do after the paste?.
Thank-you
Steve
|
|
|
|
|
I still have a problem..
The processing behind the "Paste" button in my application is simply:
m_pMyRichEditCtrl->Paste();
m_pMyRichEditCtrl->RedrawWindow();
which solves the text not visible problem from the button but it does not solve the same problem when I paste using Ctrl-V. Any idea what else I need to do?
Thanks
Steve
==================
The original message was:
I found that calling m_pMyRichEditCtrl->RedrawWindow(); does the trick but why? What's going on? Are there others ways?
Steve
================== The original message was: I have a RichEditCtrl that "initially" does not diplay text that is pasted into it (using my_RichEditCtrl->Paste() or by Shift-Insert,Ctrl- V). The text "is" displayed if you then obscure the window and cause a redraw.
What do I have to do to get the text to be made visible after the paste? Is it something to do with the configuration of the RE Ctrl, e.g in the Create call, or something I must do after the paste?.
Thank-you
Steve
|
|
|
|
|
Make sure you have handler for Ctrl+V and it pointed to your function that does Paste(); RedrawWindow();
==================
The original message was:
I still have a problem.. The processing behind the "Paste" button in my application is simply: m_pMyRichEditCtrl->Paste(); m_pMyRichEditCtrl->RedrawWindow(); which solves the text not visible problem from the button but it does not solve the same problem when I paste using Ctrl-V. Any idea what else I need to do? Thanks Steve
================== The original message was: I found that calling m_pMyRichEditCtrl->RedrawWindow(); does the trick but why? What's going on? Are there others ways?
Steve
================== The original message was: I have a RichEditCtrl that "initially" does not diplay text that is pasted into it (using my_RichEditCtrl->Paste() or by Shift-Insert,Ctrl- V). The text "is" displayed if you then obscure the window and cause a redraw.
What do I have to do to get the text to be made visible after the paste? Is it something to do with the configuration of the RE Ctrl, e.g in the Create call, or something I must do after the paste?.
Thank-you
Steve
|
|
|
|
|
I'm having some frustrating issues and I'm hoping that
someone can help me. I have two apps created by VC++6.0
that have an Access database, they are data entry and data
search apps. The code internally is arranged, in the data
entry app, so that it is in edit mode for maybe a 1/10 of a
second as it copies local variables to the dataset and
updates it. However, while the entry app is being used the
data search app (when started up) get an error message that
says 'Couldn't Update; currently locked by user admin on
machine <machine name="">'. Now this just started recently, I
checked the mdb file itself under
[Tools->Options->Advanced] the 'Default Open Mode' is set to
Shared, and the 'Default Record Locking' is set to No
Locks. What would be causing this?? I really appreciate
any help someone might have with this.
|
|
|
|
|
Does anyone have experience with keyboard hooks?
I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus.
However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages.
What I think I need is some way to force the keyboard hook to the top of the message chain.
I would like to start a dialog with anyone that has worked with keyboard hooks before.
Thank you.
PMCGAHAN@UCSWORKS.COM
|
|
|
|
|
Are you using SetWindowsHookEx? If so can I see a snippet of the code you are using?
==================
The original message was:
Does anyone have experience with keyboard hooks?
I have created a keyboard hook and it works just fine provided the exe driving the dll displays a dialog box with an edit control and the edit control has focus.
However, if another app has focus, say Notepad.exe, then the keyboard hook never receives the messages.
What I think I need is some way to force the keyboard hook to the top of the message chain.
I would like to start a dialog with anyone that has worked with keyboard hooks before.
Thank you.
PMCGAHAN@UCSWORKS.COM
|
|
|
|