|
To exchange items 3 and 4, simply get item 3's attributes (e.g., subitem values, pointer data), remove item 3 (which would make item 4 the new item 3) and add it back as item 4. Make sense?
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Hi all ... I've just downloaded the updated DirectX 9 SDK and now I cant compile the samples (capturesound) with my Visual C++ 6. I have the Platform SDK 2003 Feb installed and the problem is, it askes for UNICODE build. If i define UNICODE in the project settings, it gives another error: "__noop not defined". From MSDN, I found out __noop is a microsoft specific C++ intrinsic and my guess is, its not implemented in VC6 compiler. Is there any workaround to this problem for Visual C++ 6? Thanks in advance.
-Tareq
|
|
|
|
|
Hello,
From the DirectX9 readme:
Compiler Support
Developing C++ applications with the DirectX 9.0 Summer Update requires Visual Studio .NET 2002 or later. Visual Studio version 6 is no longer supported. Developing managed applications with the DirectX 9.0 Summer Update requires Visual Studio .NET 2003 and .NET Runtime 1.1. Developing 64-bit applications requires the Microsoft Platform SDK. All DirectX SDK supported 64-bit samples have a corresponding sample_makefile.x64. These makefiles are compatible with AMD64 and Intel64.
You should use the DirectX 8 sdk for development with VC++ 6.
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Thanks for the quick reply... but the old dx9 sdk supported vc6 ... and the old code also compiles great with vc6 ... its just the samples... well... i'll try using the old sdk samples with the new sdk...
-Tareq
|
|
|
|
|
tareqsiraj wrote:
Is there any workaround to this problem for Visual C++ 6?
Not that I can think of right away. Couldn't you redefine the macros which uses __noop yourself? It's a dirty hack, but it should work, which is the main objective, right?
--
Arigato gozaimashida!
|
|
|
|
|
hmm... dont have much idea about howto do this hack... tried
#ifndef __noop
#define __noop
#endif
but gives syntax error: ')' ....
Thanks again ...
-Tareq
|
|
|
|
|
I was thinking more along the lines of rewriting the macros which make use of __noop.
--
Arigato gozaimashida!
|
|
|
|
|
Hello
I wrote an DLL with many Code.
My Calling Programm uses
CTCPHufKommDLLApp *m_pClient;
in the .h flie
and
this->m_pClient = new CTCPHufKommDLLApp((CWnd*) this);
in the Init Dialog of the calling Window.
this i no problem.
But in the OK Button code the line
void CHUFClientDlg::OnBnClickedOk()
{
if ( this->m_pClient != NULL )
{
delete( this->m_pClient );
this->m_pClient = NULL;
}
OnOK();
}
the delete line don't work. I never come in the destruktor. But I get an Compilerhalt at
afxtls.cpp
inline void* CThreadSlotData::GetThreadValue(int nSlot)
{
EnterCriticalSection(&m_sect);
ASSERT(nSlot != 0 && nSlot < m_nMax);
ASSERT(m_pSlotData != NULL);
ASSERT(m_pSlotData[nSlot].dwFlags & SLOT_USED);
ASSERT(m_tlsIndex != (DWORD)-1);
if( nSlot <= 0 || nSlot >= m_nMax ) // check for retail builds.
{
LeaveCriticalSection(&m_sect);
return NULL;
}
CThreadData* pData = (CThreadData*)TlsGetValue(m_tlsIndex);
if (pData == NULL || nSlot >= pData->nCount)
{
LeaveCriticalSection(&m_sect);
!!!Here it stops!!!
return NULL;
!!! HERE it stops!!!
}
void* pRetVal = pData->pData[nSlot];
LeaveCriticalSection(&m_sect);
return pRetVal;
}
I can continue without more errors, but never come into destructor.
So I get a memory leak.
Who can help me?
I'm just a beginner in DLL Programming.
Thank You for every Tip.
Greetings
Gerhard from Germany
|
|
|
|
|
Hard to help from what you've written, but what did you derive CTCPHufKommDLLApp from? Was it CWinApp? Because you may only have one instance of a CWinApp derived class in an MFC program.
|
|
|
|
|
I'm writing my own text ticker/scroller type thing that only needs the handle to a static control on a dialog or wherever, and the rest is completely self contained in the class, the timers dont need windows to process their events. Anyway I want to have the left and right edges of the scroller fade. So say the background was dark blue, and the text was white. The white text would fade to blue at the edges. Now from my photoshop experience, at first I thought, black-to-white gradient as a mask. But how would I accomplish that with the GDI? At first I thought alpha-blending, but I didnt see a way to use a grayscale gradient as the guide for transparency. So then I saw the MaskBlt function. So I'm thinking create a monochrome memory bitmap with gradients on either side, then use that as the mask and a color memory bitmap with the text as the source, and the destination would be the solid background color layer. Then I would BitBlt that to the static control. So my question is, would this theoretically work? Am I going in the right direction?
|
|
|
|
|
I need to record demos of a game. I am writing AVI (using AVI API) with sound (using DirectSound) but it is not synchronized, the Video finish alot earlier then the audio..
Can anyone direct me how to synchronize both...
Advance Thnx...
|
|
|
|
|
What changes do I have to make to the following code inorder to use the shell to change the case of selected file(s)???
shFileOp.fFlags = FOF_ALLOWUNDO;
shFileOp.wFunc = FO_RENAME;
shFileOp.lpszProgressTitle = "Test";
shFileOp.fAnyOperationsAborted = FALSE;
shFileOp.pFrom = csFile;
shFileOp.pTo = csFile1.makeLower();
shFileOp.hwnd = NULL;
SHFileOperation(&shFileOp);
Would this function not be working correctly because I haven't double null terminated the pFrom and pTo ???
Why wouldn't it it cause an exception I wonder???
Anyways...there are window handles so I assign NULL...any progress dialog should now use the desktop correct???
BTW - this is in ATL, so i'm not actually using CString, but i'm considering using[^]
I don't want to use any pre-made classes either, i'd like to figure out what goign wrong and do it myself...
Thanks
How do I print my voice mail?
|
|
|
|
|
I need to use the shell I don't want to use MoveFile or anything
How do I print my voice mail?
|
|
|
|
|
Why not test the function first to see if it will indeed do what you require. For example:
shFileOp.pFrom = "c:\\SomeFolder\\ThisFileHasMixedCase.tXt";
shFileOp.pTo = "c:\\SomeFolder\\thisfilehasmixedcase.txt";
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
I'm getting undeclared identifier errors at compile time for CreateWaitableTimer and SetWaitableTimer. I have Winbase.h included and Kernel32.lib is of course already inherited. What am I doing wrong???
|
|
|
|
|
Friends,
I got a data grid control. The query i executed returned six fields. So when i give my recordset object to "datagrid" control, it shows six fields. I only want to show my desired fields in "datagrid" and not "all" those that are present in the recordset. How can i do so ?
Imtiaz
|
|
|
|
|
Hi!
This is surely an easy q for you but I don't really know how to implement my function.
I'd like to have a func like:
bool IsTimeBetweenTimes( CTime currTime, CTime start, CTime end );
I'd like to know if "currTime" is between "start" and "end".
I'm going to cal this funktion a very lot of times.
Any tips how to tackle my problem is good. - Thanks
_____________________________
...and justice for all
APe
|
|
|
|
|
bool IsTimeBetweenTimes
(CTime currTime,
CTime start,
CTime end)
{
if ((start < currTime) && (currTime < end))
return true;
return (false);
} /ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
or..
bool IsTimeBetweenTimes(CTime currTime, CTime start, CTime end) {
return start <= currTime && curTime < end;
} :compressed-grin:
Anyway, the range endpoints is open for debate. I believe low <= x < high is the most correct one as it's directly applicable to time ranges as we use them in "real life".
--
Arigato gozaimashida!
|
|
|
|
|
_____________________________
...and justice for all
APe
|
|
|
|
|
Hi
i want to hide the application icon which comes in when you press alt+tab window. if there are more then one window you can navigate to your application by pressing Alt+tab and selecting your application from there. i dont want my application icon to be there.
Regards
Swarup
|
|
|
|
|
Hi,
I created an SDI scrollview app, and the text displays OK initially. However when it is scrolled down and then back up the text doesn't get restored properly. Also if the app is covered up and then restored the window is blank. Most of the work is done in OnInitialUpdate and OnDraw.
void CViewDocView::OnDraw(CDC* pDC)
{
UINT status;
CViewDocDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
m_nLinesTotal = pDoc->GetDocumentLength();
if (m_nLinesTotal != 0)
{
// Initialize the position of text in the window.
UINT position = 0;
CFont* pOldFont = pDC->SelectObject (&m_fontScreen);
for (UINT i=0; i<=m_nLinesTotal; i++) {
CString string;
status = pDoc->GetLine( string );
pDC->TextOut(2, position, string);
position += m_cyScreen;
}
pDC->SelectObject (pOldFont);
}
}
void CViewDocView::OnInitialUpdate()
{
CScrollView::OnInitialUpdate();
CViewDocDoc* pDoc = GetDocument();
ASSERT_VALID(pDoc);
SetScrollSizes (MM_TEXT, CSize (0, pDoc->GetDocumentLength() * m_cyScreen),
CSize (0, m_cyScreen * 10), CSize (0, m_cyScreen));
ScrollToPosition (CPoint (0, 0));
}
The font is set up in OnCreate() and the font height from GetTextMetrics() is assigned to m_cyScreen.
Thanks in advance
|
|
|
|
|
hello !
I'm using a CListCtrl that I'm sorting by clicking on columns...
But also i want to cancel the sorting and to return to the original state (the one that was after I added the data to the control)
How can I do this ? Can it be done ?
Cheers...
|
|
|
|
|
Does anyone here use the VC+ Express 2005 beta?
I just installed everything according to the instructions, along with the DirectX 9 SDK. When I try to build the samples included with the SDK, I find that some include files are missing, for example "Windows.h" I checked the search paths and they are correct, but the files are not on my drive.
Do I have to purchase the full version, or am I doing something wrong?
|
|
|
|
|
VC express is not complete at all. It's so crippled it's amazing it even starts.
--
Arigato gozaimashida!
|
|
|
|