|
Hi,
Any one know "How to develope old db provider in vc++ by ATL" help me...
thanks
Thanks,
Anji.Manchikanti
|
|
|
|
|
I'm having a CRichEditView for a long time in my code and suddenly the backcolor when typing something in the view is black....??like a square black around each letter I'm typing??
I patched it by doing a charformat in the OninitialUpdate
CHARFORMAT2 cf2;
m_editCtrl->GetDefaultCharFormat(cf2);
cf2.dwEffects = 0;
cf2.crBackColor = ::GetSysColor(COLOR_WINDOW);
SetCharFormat (cf2);
but when I'm doing an undo the black backcolor coming back and with the letter BOLD and with the letter higher than when I setted it at star....????
I overloaded functions OneditUndo and OnEditRedo and by writing the same code.
It works but it's not really nice...
Is there anybody who had that same problem??
|
|
|
|
|
can anyone briefly explain me about .NET porting ?
What are the significant changes need to be done after porting a VB application to VB.NET?
|
|
|
|
|
ATL, WTL and STL are all template libraries in C++. Why did you ask this question here ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
I have a BHO vs c++ project working!
I can write code in the DISPID_BEFORENAVIGATE2 of the invoke, or use the IWebBrowser. What I want to do is add my own http header attribute to every request going from the browser.
How can I do that?
|
|
|
|
|
I develop a tree control, it is displaying the drives and folders. In WTL the following two handlers are not working simultanously.
REFLECTED_NOTIFY_CODE_HANDLER(TVN_ITEMEXPANDING, OnItemExpanding )
MESSAGE_HANDLER(WM_LBUTTONDOWN,OnLButtonDown)
If i write the OnLButtonDown handler OnItemExpanding is not woring.
But MFC both are working simultanously.
plz reply to me.
Thank you.
|
|
|
|
|
|
I have Made one Com Dll for doing communication with
serial port.
This Dll contains all the funtions for communication
with Serial port.
and i am having one application which is having
2 threads..
and
These 2 threads continously calling the functions
of dll.so is there any need of syn.in side the dll
for communcating with comport..
because
for example my first thread calling one fun. of dll
and if it transmits the data and now it is waiting
for response getting data from serial port.At the
same time if my second thread call the same fun.
of dll then what happnes it will be called after
finishes first or it is called and creates the
problem in getting response of app. funcaiton
calling..means i want to know that
syn. is this handle by automatically com dll or have to
give some extra provistion for this ??
|
|
|
|
|
I have Made one Com Dll for doing communication with
serial port.
This Dll contains all the funtions for communication
with Serial port.
and i am having one application which is having
2 threads..
and
These 2 threads continously calling the functions
of dll.so is there any need of syn.in side the dll
for communcating with comport..
because
for example my first thread calling one fun. of dll
and if it transmits the data and now it is waiting
for response getting data from serial port.At the
same time if my second thread call the same fun.
of dll then what happnes it will be called after
finishes first or it is called and creates the
problem in getting response of app. funcaiton
calling..means i want to know that
syn. is handle by automatically com dll or have to
give some extra provistion for this
|
|
|
|
|
It depends how you have CoCreated the com component in your appllication. If you are sharing single com object between two threads then you definetly need sync code in your application. And sharing com object between two threads needs special sync mechanism
But I guess if you have seperate com objects in each thread then you may not need any synchronization code.
|
|
|
|
|
|
It's just a simple macro
#define STDMETHOD(method) virtual HRESULT STDMETHODCALLTYPE method
What do you not understand about it?
|
|
|
|
|
If you're asking what is it used for, it's used for most methods when you write a COM interface definition. The "standard" methods have a return type of HRESULT and a calling convention of __stdcall .
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
I'm currently working on an imaging application. I use a subclassed file dialog to allow the user to import items into my app.
I want to be able to allow the user to select images / folders so they can recursively import the items from the subfolders.
I've inserted a handler into my code to deal with the open button clicked command with the intention of creating a list of the currently selected images / folders.
However whenever I try and access the list view the number of selected items is zero.
I've tried calling CListBox::GetSelCount() and CListBox::GetSelItems() , both with no success.
Has anyone been able to access the contents of the file list in a WTL file dialog?
|
|
|
|
|
Errrrm - CListViewCtrl rather CLIstBox?
Stuart Dootson
'Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p'
|
|
|
|
|
Hi
I have the following
class MyClass
{
private:
std::ofstream out;
public:
MyClass() {out.open("C:\\test.txt" , std::ios::out);}
template <typename T> MyClass& operator<<(const T& t)
{
out << t;
return *this;
}
};
and it works well...
MyClass myinstance;
myinstance << "Hello " << 2.4;
except...the logical way for a new line is std::endl so...
myinstance << "Hello" << std::endl;
but this throws a compiler error of
<br />
'class MyClass &__thiscall MyClass::operator <<(const T &)' : cannot use function template 'class std::basic_ostream<_Elem,_Traits> &__cdecl std::endl(class std::basic_ostream<_Elem,_Traits> &)' as a function argument<br />
Do I have to implement my own std::endl? Basically, I'm stuck...
Any info on this, much appreciated.
Cheers
Angel.
******************************************************
I once bought a book called 'Learn to read in 21 days'
Nigel Spoon - 1998
|
|
|
|
|
Your operator is missing some stuff that should be there - check out my article for info:
http://www.codeproject.com/vcpp/stl/iostreaminserters.asp[^]
To be honest, it's long enough since I did this sort of thing that I don't know if any of that will help, but it will improve your implimentation anyhow.
Don't forget that std::endl sends an endline AND flushes the stream. I don't know if this could cause your problem, but it's something that is often overlooked.
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Many thanks - excellent article as well. Some cut'n'pasting here I reckon to improve my implementation - thanks again!
*********************************************
The sooner you fall behind, the longer you have to catch up.
|
|
|
|
|
Note what the error message says about endl : cannot use function template 'class std::basic_ostream<_Elem,_Traits> &__cdecl std::endl(class std::basic_ostream<_Elem,_Traits> &)'
You're trying to pass a template to the function, not an instantiation of a template , which is not legal because a template all by itself isn't anything, it's just... well, a template.
--Mike--
Visual C++ MVP
LINKS~! Ericahist | 1ClickPicGrabber | CP SearchBar v2.0.2 | C++ Forum FAQ
Strange things are afoot at the U+004B U+20DD
|
|
|
|
|
How did I not see that ?
Christian Graus - Microsoft MVP - C++
|
|
|
|
|
Hi,
I am busy with developing an ActiveXControl for analysis of data from a Database.
One option shall be the visualization of data as a chart. Therefor I would like to use e.g. the ActiveX-ChartControl from MS (the MSChart Control).
How can I create during runtime an ActiveX Control like MSChart in an ActiveX Control?
Thanks,
Thomas
|
|
|
|
|
Hello,
I created an ActiveX (DLL file) with VC++ & ATL. Il works perfectly, but when I install it via a webpage, it appears that according to IE, this ActiveX has a "damaged" status.
I don't know exactly what "damaged" means, as the ActiveX runs perfectly, and that it has been numerically signed with a Verisign certificate.
Can somebody tell me what does "damaged" status mean, and what should I do to make this ActiveX have a normal status within Internet Explorer ?
Thank you.
|
|
|
|
|
one CDateSource instance ,can it use in multithread ?
if it can't ,how to resolve?
|
|
|
|
|
Hi
I am developing web service as well as a Winform client for transferring some data.
I just wand to know some of the exceptions during the transactions say for example
1. If web service as well as client is running in the same machine, if the IIS is not running means which exceptions will be thrown in the client side
2. If an error (say access violation or any other error) happened in the web service which exception will be thrown from the web service and how to catch in the client program
3.If the web service is running in the remote machine if the cline is unable to find the web service which exception will be thrown
4. If the web service is running in the remote machine and there is no network connection between the web service and the client , how it is possible to detect from the client side.
5.Each and every exception at run time is important for me for the cases like above.
Could any one provide some information or code sample regarding the same?
|
|
|
|
|
Hi,
I need to have a dipath message mapppin. In MFC there is BEGIN_DIPATCH_MAP whereas my program is in wtl how can i use the macro in it. Pls provide a solution or an alternate.
Regards
saravanan
|
|
|
|