|
If you look in winuser.h, you'll see the ALTTABINFO declaration is wrapped in an #if (WINVER >= 0x0500) block. You'll need to #define WINVER 0x0500 before your #include statements.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
I need to change the MSysObjects attributes to read only thru VC.
I will be able to read tables info if I could do that. By default, MSysObjects cannot be read. I can change the setting thru Access 2000 but I want to do it thru VC.
Help!
Ammar
|
|
|
|
|
Is there a function that will tell me if
Day Light Savings is turned on and if an OS is
running in summer or winter
Warm Regardz
|
|
|
|
|
I think the CRT variable _daylight indicates whether daylight savings time is in effect. The docs aren't exactly crystal clear, though.
--Mike--
http://home.inreach.com/mdunn/
The Signature, back by popular demand: Buffy. Pajamas.
|
|
|
|
|
Thanks for the speedy response Mike,
Yes you are right !
but its now proving a devil to test for
I'll implement it anyway as its several months before DST comes into effect here, To see if it works correctly.
Regardz
Colin
|
|
|
|
|
I am looking for a fast algorithm for outputing the co-ordinates of points along an ellipse, given the bounding rectangle.
Basically as the Ellipse drawing function only that it outputs the co-ordinates of the pixels rather than drawing them.
Any suggestions would be gratefully received.
Happy programming!!
|
|
|
|
|
This is just quick and dirty code (written straight in an untested). This code assumes the definition of things like point2d (it's a floating point 2d point) and pi. The maths is pretty simple trigonometry, so if you have any trouble go to the library. Here goes:
<br />
point2d *GetEllipsePoints(float height, float width, point2d center, long divisions)<br />
{<br />
point2d *theList = new point2d[divisions];<br />
<br />
for (long i = 0; i < divisions; i++)<br />
{<br />
theList[i].x = cos(((float)i/(float)divisions) * pi / 180.0f)*width*0.5;<br />
theList[i].y = sin(((float)i/(float)divisions) * pi / 180.0f)*height*0.5;<br />
}<br />
<br />
return theList;<br />
}<br />
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I am getting linker error for CM_Locate_DevNode() &
CM_Reenumerate_DevNode()functions
as undefined functions.
I have included cfgmgr32.h & i am linking with cfgmgr32.lib.
Can anyone tell me,why is it so??
TIA
Neha
|
|
|
|
|
Hi All,
I want to generate a .LIB file from a .DLL. What is the tool that is available in VC++ to do this?
Thanks
regards,
YHTay
|
|
|
|
|
How do I start programming a Visual Basic Add-In? I tried the following:
#import "C:\\Program Files\\Microsoft Visual Basic\\VB98\\VB6EXT.OLB"
The compiler failed when it tried to define the 'CommandBarsPtr' type.
Any ideas?
Thanks in advance
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
How do I start programming a Visual Basic Add-In? I tried the following:
#import "C:\\Program Files\\Microsoft Visual Basic\\VB98\\VB6EXT.OLB"
The compiler failed when it tried to define the 'CommandBarsPtr' type.
Any ideas?
Thanks in advance
Jamie Nordmeyer
Portland, Oregon, USA
|
|
|
|
|
I'm wondering if it's at all possible to determine the hard drive location of a program from within that program. Any help would be greatly appreciated!
-Sparticus
|
|
|
|
|
char appPath[MAX_PATH+1];
DWORD res = GetModuleFileName(AfxGetInstanceHandle(), appPath, MAX_PATH);
-c
------------------------------
Smaller Animals Software, Inc.
http://www.smalleranimals.com
|
|
|
|
|
Greetings,
I am trying to get the length of the avi source file, and to play it in the time line at that length,
but for some reason I am always getting a "0" returned for the media length. Any suggestions on how
to retreive these?
I am under Windows 2000, and I am using directx 8.0 sdk with visual C++ 6.0.
The code I am having trouble with is marked below as "// PROBLEM AREA!!!!"
// ------------------------------------------------------------------
// Code from Directx 8.0 sdk help file.
// <article:> (Constructing a Timeline)
// ------------------------------------------------------------------
void main( void )
{
// Start by making an empty timeline.
IAMTimeline *pTL = NULL;
CoInitialize(NULL);
CoCreateInstance(CLSID_AMTimeline, NULL, CLSCTX_INPROC_SERVER,
IID_IAMTimeline, (void**)&pTL);
// GROUP: Add a video group to the timeline.
IAMTimelineGroup *pGroup = NULL;
IAMTimelineObj *pGroupObj = NULL;
pTL->CreateEmptyNode(&pGroupObj, TIMELINE_MAJOR_TYPE_GROUP);
pGroupObj->QueryInterface(IID_IAMTimelineGroup, (void **)&pGroup);
// Set the group media type.
AM_MEDIA_TYPE mtGroup;
ZeroMemory(&mtGroup, sizeof(AM_MEDIA_TYPE));
mtGroup.majortype = MEDIATYPE_Video;
pGroup->SetMediaType(&mtGroup);
pTL->AddGroup(pGroupObj);
pGroupObj->Release();
// TRACK: Add a track to the group.
IAMTimelineObj *pTrackObj;
IAMTimelineTrack *pTrack;
IAMTimelineComp *pComp = NULL;
pTL->CreateEmptyNode(&pTrackObj, TIMELINE_MAJOR_TYPE_TRACK);
pGroup->QueryInterface(IID_IAMTimelineComp, (void **)&pComp);
pComp->VTrackInsBefore(pTrackObj, 0);
pTrackObj->QueryInterface(IID_IAMTimelineTrack, (void **)&pTrack);
pTrackObj->Release();
pComp->Release();
pGroup->Release();
// SOURCE: Add a source to the track.
IAMTimelineSrc *pSource = NULL;
IAMTimelineObj *pSourceObj;
pTL->CreateEmptyNode(&pSourceObj, TIMELINE_MAJOR_TYPE_SOURCE);
pSourceObj->QueryInterface(IID_IAMTimelineSrc, (void **)&pSource);
// PROBLEM AREA!!!!
// How do I see how long the avi file is, and set the timeline to stay for that long????
// For some reason pSource->GetMediaLength(ref); always returns "0"???
// Set the times and the file name.
pSourceObj->SetStartStop(0, 50000000);
pSource->SetMediaName(L"C:\\MyExample.avi");
pSource->SetMediaTimes(40000000, 140000000);
pTrack->SrcAdd(pSourceObj);
pSourceObj->Release();
pSource->Release();
pTrack->Release();
// Preview the timeline.
IRenderEngine *pRenderEngine = NULL;
CoCreateInstance(CLSID_RenderEngine, NULL, CLSCTX_INPROC_SERVER,
IID_IRenderEngine, (void**) &pRenderEngine);
PreviewTL(pTL, pRenderEngine);
// Clean up.
pRenderEngine->ScrapIt();
pTL->ClearAllGroups();
pRenderEngine->Release();
pTL->Release();
CoUninitialize();
}
|
|
|
|
|
Hello,
How can one remove the scrollbars from a CFormView based app? I've spent way too many hours trying to figure this one out.
I've tried ModifyStyle(WS_HSCROLL | WS_VSCROLL, 0);
I've tried cs.style = ~WS_HSCROLL | ~WS_VSCROLL;
This should be simple, and its driving me crazy!!!
Thanks!
Frank
|
|
|
|
|
In your OnInitialUpdate() function, add this code:
SetScrollSizes(MM_TEXT,CSize(0,0));
Hadi Rezaie
|
|
|
|
|
Thanks Hadi!
It worked perfectly.
Frank
|
|
|
|
|
I had an ActiveX control in my C++ project but deleted it. It still shows up in the Class Wizard control list though. How do I remove all references to a control from a project?
|
|
|
|
|
Kevin
exit Visual Studio, delete the projects *.clw file then start Visual Studio again. The Class Wizard file (*.clw) will be regenerated and all references to the ActiveX control should be gone.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
|
|
|
|
|
I want to add tol tip to my dialog & buttons.
what can I do for It.
Thanks a lot.
|
|
|
|
|
Hi, I am using CDaoDatabase to create an access database. I can create Access 97 ( JEt Database Engine version 1.0, 2.0 or 3.0) by passing third paremeter of CDaoDatabase->Create(DatabaseName, Language,Version).
Any body know what to pass as third parameter to create Access 2000 (Jet version 3.6) ??
try
{
newDB->Create(szNewDB, dbLangGeneral, 0);
}
catch( CDaoException e)
Help appreciated.
|
|
|
|
|
Answer to your question is:
http://www.codeproject.com/script/comments/forums.asp?forumid=1647&df=3&app=25&tid=25406&select=25406#xx25492xx
By the way, do you know how to change the MSysObjects attributes to read only thru VC?
I will be able to read tables info if I could do that. By default, MSysObjects cannot be read. I can change the setting thru Access 2000 but I want to do it thru VC!
|
|
|
|
|
What if you use SQL CREATE TABLE statemnt or even better the SQL Stored Procedures in your VC++ along with DAO, instead of the DAO lonely & directly?
|
|
|
|
|
<<< In the name of GOD >>>
Hi.
I have used SDI, that use of CFormView class.
I want to change Document in my program.
For example i have two document.
when user choose First menu item, then program must indicate first document and when user choose Second menu item, program must indicate second document ...etc.
How can i ? (Please write example)
Hadi Rezaie
|
|
|
|
|
I want to know, how can I write the parameter flag on navigate method.
m_Navegador.Navigate( m_strIndice, flag, NULL, NULL, NULL);
I was trying to use the BrowserNavConstants struct, with the parameter navNoHistory. But there was anythings wrong there.
How can I set this parameter?
Marcio Henrique Doniak
Programming in C++. Using C++ and MFC, developping GUI for telecommunication equipment (PABX)
|
|
|
|