|
Does it happen every time? Can you manually delete the .pdb file and re-build?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Yes, it happens every time and for any application.
Yes, I can delete the .pdb files, but rebuilding doesn't solve the problem.
First time i've experienced this kind of problem in my 5+ years of using VC++
-Mel
|
|
|
|
|
You did reapply the service packs for VS60, I take it...
Steve S
|
|
|
|
|
Yes, I just applied Service Pack 5....but still can't build debug configurations
-Mel
|
|
|
|
|
Hello everyone,
I used the following code to implement the tooltip for a toolbar. But the tooltip won't be displayed when the toolbar window is not active. I know that I can set TTS_ALWAYSTIP to solve this problem. But I don't know how to set it. There is no CToolTipCtrl in my application.
Thanks a lot in advance.
BEGIN_MESSAGE_MAP(CMyView, CView)
...
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTW, 0, 0xFFFF, OnToolTipNotify)
ON_NOTIFY_EX_RANGE(TTN_NEEDTEXTA, 0, 0xFFFF, OnToolTipNotify)
END_MESSAGE_MAP()
void CMyView::OnInitialUpdate()
{
CView::OnInitialUpdate();
CEdit* pEdit = new CEdit;
pEdit->Create(ES_MULTILINE | WS_CHILD | WS_VISIBLE | WS_TABSTOP | WS_BORDER,
CRect(10, 10, 100, 100), this, 111);
EnableToolTips(TRUE); // enable tool tips for view
}
//Notification handler
BOOL CMyView::OnToolTipNotify(UINT id, NMHDR *pNMHDR,
LRESULT *pResult)
{
// need to handle both ANSI and UNICODE versions of the message
TOOLTIPTEXTA* pTTTA = (TOOLTIPTEXTA*)pNMHDR;
TOOLTIPTEXTW* pTTTW = (TOOLTIPTEXTW*)pNMHDR;
CString strTipText;
UINT nID = pNMHDR->idFrom;
if (pNMHDR->code == TTN_NEEDTEXTA && (pTTTA->uFlags & TTF_IDISHWND) ||
pNMHDR->code == TTN_NEEDTEXTW && (pTTTW->uFlags & TTF_IDISHWND))
{
// idFrom is actually the HWND of the tool
nID = ::GetDlgCtrlID((HWND)nID);
}
if (nID != 0) // will be zero on a separator
strTipText.Format("Control ID = %d", nID);
if (pNMHDR->code == TTN_NEEDTEXTA)
lstrcpyn(pTTTA->szText, strTipText, sizeof(pTTTA->szText));
else
_mbstowcsz(pTTTW->szText, strTipText, sizeof(pTTTW->szText));
*pResult = 0;
return TRUE; // message was handled
}
Thanks
Bin
|
|
|
|
|
I might be misunderstanding the workings of a VARIANT , but I am trying to pack a SAFEARRAY and assign it to my VARIANT . When I place a break point I can see I am getting data into the array but when I try to debug the component in VB I can only get 1 element back which is 0. Does anyone see something wrong with this, this is the first time I have tried using a SAFEARRAY so bare with me. Thanks in advance.
STDMETHODIMP CMoses::GetNumbers(VARIANT *pVal)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState())
HRESULT h;
long lDimension[2];
int startyear, runyear;
startyear = 3;
runyear = 68;
typedef vector<double> collection;
collection numbers;
for(int i = startyear * 12; i < runyear * 12; i += 12)
{
IColumn col(root.Column("nsv_e_0"));
if(col != NULL)
{
CString num;
num.Format("%d", i);
numbers.push_back(col.value(num));
}
}
SAFEARRAYBOUND bounds[1];
SAFEARRAY *psa = NULL;
bounds[0].lLbound = 1;
bounds[0].cElements = numbers.size();
psa = SafeArrayCreate(VT_R8, 1, bounds);
if (psa == NULL) throw ERROR_NOT_ENOUGH_MEMORY;
int j = 0;
vector<double>::iterator it;
for(it = numbers.begin(); it != numbers.end(); it++, j++)
{
lDimension[1] = j;
lDimension[0] = 0;
h = ::SafeArrayPutElement(psa, lDimension, &it);
}
pVal->parray = psa;
return S_OK;
}
- Nick Parker My Blog
|
|
|
|
|
Try
pVal->vt = VT_ARRAY|VT_R8;
just before your 'return S_OK'.
You're setting the VARIANT value, but not it's type.
Steve S
|
|
|
|
|
Steve S wrote:
You're setting the VARIANT value, but not it's type.
Gotcha, that makes sense. Now VB is returning a list of 0's. Not sure why I am not getting the numbers. I threw in a ::AfxMessageBox(...) to check that I am getting a value from the iterator when it is dereferenced, which it is. Am I following the correct syntax by assignment the address of the iterator to the SAFEARRAY ? Thanks again Steve.
[EDIT] I solved the problem, I had the lDimension flip-flopped, thanks again for your help. [/EDIT]
- Nick Parker My Blog
|
|
|
|
|
I am trying to write an application in C++ to implement privacy control. For that I need to know how to read a cookie. If someone knows, please let me know
Thanks,
subbu
|
|
|
|
|
Refer to MSDN articles Q241492 and Q240191.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Yes, but I must use ATL COM...and without?
I should make an application .exe.
|
|
|
|
|
The code shown in article Q241492 (it's just COM) can be used with or without ATL.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
there are 2 buffers (size= 1 MB) in my app. one buffer is in video memory (get by DirectX), another one is in system memory (by new).
if copy from system buffer -> video buffer, time=15 ms
if copy from video buffer -> system buffer, time=180 ms
my question is:
why is it so slow from video to system memory? how to solve the problem?
thanks
includeh10
|
|
|
|
|
It's very common for reads from the video buffer to be slow. The details of why depends on your specific hardware and directx driver. In general terms the video buffer is not just another block of RAM; after you are done writing to it, it may not contain exactly what you put in yet (or ever). DirectX tries to hide these details, but when you read from video memory it has to make everything synch up so it behaves like you expected it to.
The most common workaround is to rework your application so it does not have to read from the video buffer. It's seldom absolutely necessary.
|
|
|
|
|
Hi antlers,
what i need is just "read from video memory". i don't need 'write to video memory'.
it can be assumed as a screen capture.
my process is
1. use surface->Lock to get video buffer
2. copy the buffer to system memory
u say 'it does not have to read from the video buffer', could u give me some details for re-working my app?
(the app is in realtime, speed is important, so i use DirectX)
thanks.
includeh10
|
|
|
|
|
hello
i am new to c++ (Microsoft Visual Studio .NET 7)
normally i can see all the variable and objects when i run a program through the debugger.
however i have a program which executes in an exe and when i run it through the debugger i do get output but i do see the very useful tree containing all the variables and objects.
also i receive these errors:
'mediasinkencoder.exe': Loaded 'C:\WINNT\system32\NTDLL.DLL', Cannot find or open a required DBG file.
'mediasinkencoder.exe': Loaded 'C:\WINNT\system32\KERNEL32.DLL', Cannot find or open a required DBG file.
'mediasinkencoder.exe': Loaded 'C:\stlport\lib\stlport_vc746.dll', No symbols loaded.
how do i get the objects and variables into my debugger??
thank you!
|
|
|
|
|
Those are all the system DLL and compiler DLLs. There really isn't much in those files you will need to look at. The messages are just to let you know that the debugger looked for the files. Unless you are actually debugging something in those DLLs, you can ignore the message.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
Thanks,
I found my problem. It was really silly. i needed to display the autos browser.
|
|
|
|
|
Hi All!
How can I change the title bar in a window using Win32 SDK (NO MFC, NO ATL)?
thanks!
|
|
|
|
|
you should handle WM_NCPAINT and draw your own title bar. Windows does not have default way of changing the title bar.
MSN Messenger.
prakashnadar@msn.com
|
|
|
|
|
If you want to just change the text in the title bar, use SetWindowText(HWND hwnd,LPCTSTR string); , where hwnd is the handle for the window, and string is a pointer to the string.
Software Zen: delete this;
|
|
|
|
|
hi,
Can anyone tell me how to have a picture (*.gif file)in my Dialog box ?
Thanks
Deepak Samuel
|
|
|
|
|
On a button? As the background? Where do you want the picture rendered?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi,
I want it to be displayed at one corner of my Dialog box.
Thanks,
Deepak Samuel.
|
|
|
|
|
insert WebBrowser control in the Dialog box and load the gif in it
were rgrtgrtvrtrt rtrtb brt tyuhjghj hbhbnh hnjm 1234567?
|
|
|
|