|
Of course ... thx Michael
|
|
|
|
|
I have an MDI application. I have created an accelerator associated with the VK_DELETE key.
I would like to disable the translation of this accelerator in some views but not in others. How can i do it?
Thanks in advance,
Jose.
|
|
|
|
|
The only way I've done that is to put code at the start of the function the accelerator calls that simply returns if it is not wanted. You can probably create multiple accelerator lists and load the one you want at startup, but I've not done it myself so cannot offer any further advice on that method.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
While we interact with database using DAO technology i faced the following error.
I created database in Ms Access 2000
But in VC++ i couldn't open it by creating an object to CDaoDatabase class.
A error comes Stating that, Unrecognized data format
And How to get rid of this difficult.
|
|
|
|
|
While we interact with database using DAO technology i faced the following error.
I created database in Ms Access 2000
But in VC++ i couldn't open it by creating an object to CDaoDatabase class.
A error comes that Stating that, Un recognizing data format
And How to get rid of this difficult.
|
|
|
|
|
While we interact with database using DAO technology i faced the following error.
I created database in Ms Access 2000
But in VC++ i couldn't open it by creating an object to CDaoDatabase class.
A error comes that Stating that, Un recognizing data format
And How to get rid of this difficult.
|
|
|
|
|
Most likely the DAO classes you are working with are for an older version of the database. You can try searching to see if any neewer versions are available. Alternatively, you may also be able to have Access 2000 save your database in an older format, so that it can be opened by the DAO classes you are trying to use.
Chris
|
|
|
|
|
I have a dockwindow that I have setup in the MainFrame.h/cpp files
the one line in the MainFrame.cpp:
m_wndSTCBar.AddView("Database", RUNTIME_CLASS(CClassView));
(This creates a Tree structure in the DockWindow)
this goes to a CClassView.h/cpp File which reference a database, but at this point the database is not fully loaded and cause an error.
I want to call this line from the View.cpp file
But I don't know how, or if there is a better way to do this??
Thanks in advance.
|
|
|
|
|
Make sure mainfrm.h is included in your view and then
CMainFrame* pMain = (CMainFrame*)AfxGetMainWnd();
will give you a pointer you can use to call whatever you like, assuming it is public, or you've declared your view to be a friend of the class.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hi !
I need the GetRandomRgn API which is documented in MSDN library, but when I use this function, the compiler throws me an error because it doesn't know it.
So I searched the definition of this function in wingdi.h but I didn't find it !
What could I do ?
Thanks for any help...
Emmanuel Derriey.
|
|
|
|
|
Looks like someone at MS goofed. Just add your own prototype for it:
extern "C" int WINAPI GetRandomRgn(HDC, HRGN, INT);
--Mike--
http://home.inreach.com/mdunn/
"Didn't I tell you? I've got a brain the size of a planet."
--Marvin the paranoid android
|
|
|
|
|
Install the latest platform SDK to update your header/lib files.
|
|
|
|
|
Hi !
I have a problem with the draw of rectangle API under Windows 2000 (same pb with Polygon).
The problem is that the rectangle draws outside the window in which I do the draw. I've done a little example to show simply the pb.
I have a view :
void CMyView::OnDraw(CDC *pDC)
{
pDC->Rectangle(100, 100, 300, 200);
}
void CMyView::OnLButtonDown(...)
{
CView::OnLButtonDown(...);
Invalidate(); // To send a draw...
}
When I click in my view whereas the rectangle is not completly visible (width of view < 300 or height < 200) the rectangle draws outside my view ! This phenomenon appears only if I click IN the rectangle area ; elsewhere, It works fine. If I simulate a rectangle with LineTo, it works fine too.
I have the pb ONLY under Win 2000 (not with NT 4.0 neither 95/98). I work with VC++ 6.0 SP3.
Thanks for any help...
Emmanuel Derriey.
|
|
|
|
|
Can any body help me on this,
When we start windows, i want to launch my application as a system tray icon.
|
|
|
|
|
Hi experts
could u suugest some good resources to learn NNTP
thanx
adithya
|
|
|
|
|
Hi,
I'm a C++ programmer, and i need to know what is partial specialisation. Whats its significance with VC++ (like whether VC supports this feature, if not why there is a need for vc to have this feature). Any other C++ (or language) implementations support this.
Thanks in advance.
Kannan
|
|
|
|
|
Template Specialization can be thought of as Template overloading. You can declare a template, and then specialize the templates for specific cases (much like overloading a function allows you to specify what code gets called for different arguments).
There are two types of specialization, Explicit specialization and Partial Specialzation.
Explicit specialization is when you specialize all template parameters. For instance:
template<class t=""> class blah;
template<> class blah<char>;
The second line is an explicit specialization. If you create a template with a char type then it uses the code in the second declaration.
Partial Template Specialization is when you do not specialize all arugments. For instance:
template<class t1,="" class="" t2,="" int="" i=""> class A;
template<class t1,="" class="" t2,="" int="" i=""> class A<t1, t2*,="" i="">;
In this example, the second declartion is a partial template specialization because it only specializes the second parameter (by making it a T2 pointer instead of a T2). You can also partial specialize a template with different parameters, such as:
template<class t1,="" class="" t2,="" int="" i=""> class A;
template<class t,="" int="" i=""> class A<t, t*,="" i="">;
In this case, you are specifying only 2 parameters for the specialization, but using the first argument again as a pointer in the second.
VC++ does not support PTS, and it will not support it in VC7 either (sadly).
|
|
|
|
|
Doh! HTML strikes again. Don't be confused, some of Erik's stuff between angle-brackets doesn't get rendered. View the source to see them. Just thought I'd let you know.
(Have to admit, I stared at the examples thinking "huh" for a while myself, hehehe.)
|
|
|
|
|
Ooops... I need to fix this... I'm not sure how. How does one escape out <'s in HTML?
|
|
|
|
|
To put literal "<" and ">" characters in HTML (or XML), you type "<" and ">", respectively. To type a literal "&" character, you must type "&".
|
|
|
|
|
Template Specialization can be thought of as Template overloading. You can declare a template, and then specialize the templates for specific cases (much like overloading a function allows you to specify what code gets called for different arguments).
There are two types of specialization, Explicit specialization and Partial Specialzation.
Explicit specialization is when you specialize all template parameters. For instance:
template<class T> class blah;
template<> class blah<char>;
The second line is an explicit specialization. If you create a template with a char type then it uses the code in the second declaration.
Partial Template Specialization is when you do not specialize all arugments. For instance:
template<class T1, class T2, int I> class A;
template<class T1, class T2, int I> class A<T1, T2*, I>;
In this example, the second declartion is a partial template specialization because it only specializes the second parameter (by making it a T2 pointer instead of a T2). You can also partial specialize a template with different parameters, such as:
template<class T1, class T2, int I> class A;
template<class T, int I> class A<T, T*, I>;
In this case, you are specifying only 2 parameters for the specialization, but using the first argument again as a pointer in the second.
VC++ does not support PTS, and it will not support it in VC7 either (sadly).
|
|
|
|
|
G'day,
I'm thinking of porting one of our apps from DAO to ODBC for database access. I understand the correlation between CDaoDatabase/CDatabase and CDaoRecordset/CRecordset, but was wondering if there are any ODBC equivalents to the DAO CDaoTableDef and related classes?
When opening a database, my apps always check that the database's schema is complete and up to date. The apps create any new tables/fields that are required before proceeding.
I'd like to be able to do the same thing with the ODBC version, but the only obvious solution I see is sending raw SQL to the data source via the ODBC API. This is OK, but I was wondering if any of you ODBC gurus out there have a more elegant solution.
Actually, in an ideal world, I'd like my apps to support both DAO (speedy single-user performance) and ODBC (multi-user client/server), but I guess that's too much to hope for.
Any advice would be appreciated.
TIA
Steve
|
|
|
|
|
Hi,
Use ATL's OLE DB Provider, Consumer Templates. This will satisfy all yr requirements. Or use OLEDB
MFC class instead. These stuffs r esay to use and also gives fast and reliable services than that of other
MFC stuffs.
|
|
|
|
|
Thanks for that Mathan.
I was browsing the MSDN help & MS web sites last night and ended up printing off a zillion topics on DB access. I'm just puring my way through the pros and cons of the various options today. I'll check out the OLEDB stuff later.
Thanks again,
Steve
--------------------------------------
Steve Driessens
|
|
|
|
|
I am trying to create a webbased text editor using MFC ActiveX.
To do this, I created an MFC activeX file with all the default options.
Then, I created a new class using the Wizard, which subclasses RichEditCtrl.
I included the header file of this class to my main ActiveX file(i.e. xxxCtl.h
file ) , created a member variable for the RichEditCtrl class inside my xxxCtl.h
file and then, used its Create method, to create an instance of it within
my ActiveX's OnCreate method.
i.e.
in my header, I got
CRichEditor x;
in my ActiveX cpp, I got
CMainCtrl::OnCreate()
{
...
x.Create(.......);
}
That's all fine as I get one big honking Edit box.
But now, I want to add menus and stuff and can't figure out a way to do that.
Anyone out there would know about this? Typically, menus are part of the
CMainFrame, but since this is an AcitveX and has no frame, I am not sure
where I could create it!
I would really appreciate the feedback!
thanks
|
|
|
|