|
Hi!
I'm currently making my first steps with Direct3D9.
I have a project running quite fine, I can render some triangles etc.
But after several executions of my program I get the following linker error when I want to compile:
DXProject fatal error LNK1201: error writing to program database 'e:\C++\DXProject\Release\DXProject.pdb'; check for insufficient disk space, invalid path, or insufficient privilege
what am I doing wrong? I need to restart my IDE in order to compile properly again.
thanks in advance
modified 12-Sep-18 21:01pm.
|
|
|
|
|
It has been 2years since I wrote anything in c profesionaly...
so pardon the dry info..
the problem is that LINK could not write to the program database (PDB) for the output file.
Possible causes
File is corrupt. Delete the PDB file and relink.
Not enough disk space to write the file.
Drive is not available, possibly due to a network problem.
The debugger is active on the program you are trying to link
There is a limit of 4096 modules (.obj files) in a PDB file. The file also has a total size limit of approximately 64 MB.
RESOLUTION
There are several ways to reduce the size of PDB files:
Build some of the source files with the /Zd switch (line numbers only).
Build some of the source files as separate dynamic-link libraries (DLLs) instead of static libraries.
Build some of the source files without debug information.
Try the compiler switch /Fd"myproject.pdb" (including the quotation marks).
It is Illogical to define an inventor by his invention
|
|
|
|
|
Im making a key logger, and i want to give the user the option to keep it from showing up in CTRL+ALT+DEL menu
i have seen some VB examples that use an imported function from KERNEL32.DLL (RegisterServiceProcess)
can some one show how to use this in C++?
or possibly another way to hide it?
|
|
|
|
|
Use the VC++ KeyBoardHook and each time the ctrl+alt+del is pressed cancel it.
Learn more about windows hooks.
gabby
|
|
|
|
|
How can I put a TreeCtrl into a ListCtrl as a colunm Item? Each tree node controls a row of the list.Expand or collapse the tree also expand or collapse the coresponding row of the list. There is a example from CuteFTP.The Queue Window of CuteFTP is what exactly I need. I have no idea.
Could you give me a help? Many thanks.
Alick
|
|
|
|
|
This would require custom draw features if you want a real tree view in the list view.
The CuteFTP feature you talk of, can be accomplished by intercepting the usual selection/keydown/keyup/mouse messages that a listview provides.
Bikram Singh
|
|
|
|
|
Hello every body.
I am developing an application with clipboard supporting. When users press Ctrl+C or Ctrl+X, the application copies three types of data into clipboard: application defined data, text only data, windows metafile data.
I've used COleDataSource to implement that capacities. The below is my code:
CSharedFile sf(GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT);
CArchive ar (&sf, CArchive::store);
ar.Close();
DWORD dwLen = (DWORD) sf.GetLength();
HGLOBAL hMem = sf.Detach();
COleDataSource* pSource=NULL;
if (hMem){
hMem = ::GlobalReAlloc(hMem, dwLen, GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT);
if (hMem){
pSource = new COleDataSource();
pSource->CacheGlobalData(CF_APPLICATIONDEFINED, hMem);
}
}
CSharedFile txtsf(GMEM_ZEROINIT|GMEM_DDESHARE|GMEM_MOVEABLE);
txtsf.Write((LPCTSTR)st, st.GetLength()+1);
dwLen = (DWORD) txtsf.GetLength();
hMem = txtsf.Detach();
if (hMem){
hMem = ::GlobalReAlloc(hMem, dwLen, GMEM_MOVEABLE | GMEM_DDESHARE | GMEM_ZEROINIT);
if (hMem){
if (!pSource)
pSource = new COleDataSource();
pSource->CacheGlobalData(CF_TEXT, hMem);
}
}
CDC DC;
CDC* pDC = NULL;
CMetaFileDC MetaDC;
DC.CreateCompatibleDC(NULL);
CRect rect(0,0,width, height);
CRect rectMeta(0,0,0,0);
rectMeta.left = MulDiv(rect.left*100, DC.GetDeviceCaps(HORZSIZE), DC.GetDeviceCaps(HORZRES));
rectMeta.top = MulDiv(rect.top*100, DC.GetDeviceCaps(VERTSIZE), DC.GetDeviceCaps(VERTRES));
rectMeta.right = MulDiv(rect.right*100, DC.GetDeviceCaps(HORZSIZE), DC.GetDeviceCaps(HORZRES));
rectMeta.bottom = MulDiv(rect.bottom*100, DC.GetDeviceCaps(VERTSIZE), DC.GetDeviceCaps(VERTRES));
MetaDC.CreateEnhanced(&DC, NULL, rectMeta, _T("Anything\0Image\0\0"));
MetaDC.SetAttribDC(DC.m_hDC);
MetaDC.SetMapMode(MM_TEXT);
pDC = &MetaDC;
CBrush brush;
brush.CreateSysColorBrush(COLOR_WINDOW);
pDC->FillRect(rect, &brush);
brush.DeleteObject();
Draw(pDC);
STGMEDIUM std;
std.tymed=TYMED_ENHMF;
std.hEnhMetaFile=MetaDC.CloseEnhanced();
if (!pSource)
pSource = new COleDataSource();
pSource->CacheData(CF_ENHMETAFILE, &std);
pSource->SetClipboard();
Everything worked well but when application was closed, an exception occured in an ole module. After application has been closed, I could not paste the image to Paint either. But I could paste text to Notepad or ran application again and pasted to it well.
I hope you could understand what I mean.
Does anyone show me why?
Thanks for reading.
|
|
|
|
|
Hello!
I have tried to Close my SDI Apllication with Destroy(); or with OnClose(); but it didnt works!
Does somebody know what function i have to use?
Thanks a lot!
Ronny
|
|
|
|
|
Try CMainFrame's PostMessage(WM_CLOSE)
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
Hello ant thanks!!
But it didnt works, is there another way to close the App?
|
|
|
|
|
You might need to process the WM_CLOSE message.
void CMainFrame::OnClose()
{
CFrameWnd::OnClose();
return;
}
|
|
|
|
|
Thanks that was a good idea, but i have forgotten to tell i need a function wich i can start in the View Class. I have tried to make a public function in Mainframe and use it in the View Class and it was complile able but it also didnt works...
|
|
|
|
|
Try this:
CWnd *pWnd;
pWnd = CWnd::FindWindow(NULL, _T("MyWindowsName"));
pWnd->SendMessage(WM_CLOSE);
Let me know if it works.
Regards,
Testtests
|
|
|
|
|
From CView:
AfxGetMainWnd()->SendMessage(WM_CLOSE);
or
AfxGetMainWnd()->PostMessage(WM_CLOSE);
|
|
|
|
|
probably the most accurate closing of app is this
HANDLE handle
DWORD lpExitCode;
handle=GetCurrentProcess();
GetExitCodeProcess(handle,&lpExitCode);
TerminateProcess(handle,lpExitCode);
Clean Exit right ?
gabby
|
|
|
|
|
try using
AfxGetMainWnd()->PostQuitMessage(0);
good luck
Imtiaz Qureshi
|
|
|
|
|
AfxGetApp()->GetMainWnd()->PostMessage(WM_CLOSE);
INTP
|
|
|
|
|
THANKS TO ALL!!!
Thank you very very very much!! (Sorry for my late Answer!!!) It works great!!
Thanks!!
Ronny
|
|
|
|
|
A doc file has some properties called summary and i want to do this in my app, in fact my app works with rtf files.For example i have enter some properties like title and i saw that Microsoft put them at the end of the doc file wnhen you press CTRL+Q in Windows Commander.I want to do the same in my app.Does somebody know how can i do this.Every suggestion is appreciated.Thanks a lot.
|
|
|
|
|
Hi friends,
I am saving my reports in excel. First i format my reports in html tags and then open the html files as excel file programattically. The problem is Excel worksheet can hold only 65535 rows. My reports have enormous data to save. So i am generating multiple html files with the max of 65500 rows.
Now , i need to know how to convert the html files into excel worksheets of a single excel workbook.
Please help me out.
Thanks in advance
Kumari
|
|
|
|
|
HI,
How can i add TOOL bar in MFC dailog based window.
Not in SDI or other only in MFC dialog based
send me sample or code
thanx
|
|
|
|
|
|
thanx it helped me ..
But if i want to add my images in Tool Bar.
for example myown BMP / JPG etc..
how can i do it.
BCoz i cannot draw image in the ToolBar editor ..
wt is the way to insert my own image in tool bar.
and of wt type of image i can insert into it ,, e.g.
BMP or JPG . or ICON .???
thanx
|
|
|
|
|
You'll find a ton of articles on toolbars here:
http://www.codeproject.com/docking/[^].
As I don't know why you can't use the toolbar editor - only 16 colors? want to load dynamically? - I really don't know what article might be of further interest. You might also want to check the bitmap articles on classes for conversions.
|
|
|
|
|
i seem to be having trouble getting keybd_event to simulate keys such as ".!@#$%" anything non-alphanumeric
in some cases it causes some problem like putting the system into standby
my guess is that i need to something else for the scan code, however MSDN says that that parameter is not used, that or there is something that needs to be put in the ExtraInfo parameter other than 0
anyone know how to get around this?
note: im using Windows M.E. and microsofts note about this function being deprecated by SendInput() only applies to Windows NT/2000/XP
|
|
|
|