|
You may want to consider splitting the large lib into several smaller ones (as long as they aren't dependent on each other). Each lib would be in its own project. You can combine multiple projects into a single workspace.
I tend to keep my general purpose libs in separate, distinct projects, each in its own workspace. When I build an app, I just link with the appropriate lib(s). I'm careful to have no inter-lib dependencies - i.e. lib_1 doesn't require you to also link with lib_2 .
I use the following directory layout for each lib.
/lib_1
/src (.cpp files and private .h files)
/inc (public .h files)
/bin (debug & release build targets - i.e. the .lib files)
/doc (Doxygen generated documentation)
/Debug (compiler generated files - Debug builds)
/Release (compiler generated files - Release builds)
I use the "D" suffix for debug build targets. So my lib files are named lib_1.lib and lib_1D.lib . Both release and debug flavors of the built libs reside in the <code? bin<="" code=""> directory.
Only the <code>lib_1, /src and /inc dirs are backed up (and under version control). Everything else is generated and doesn't need to be saved.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Great stuff Ravi!
I'm really impressed with the kind of organisation you employ. I was thinking of doing something not so quite similar, but you have indeed given me great ideas on how to improve my initial idea! For that, thank you.
Ravi Bhavnani wrote:
/doc (Doxygen generated documentation)
Now you have mentioned Doxygen: is this some sort of an automatized documentation generation app? I can't tell you how much I've been looking for one -- hell, I was even considering building one up from scratch.
Can you tell me a bit more about this Doxygen app of yours?
|
|
|
|
|
Doxygen is a free, open source doc generator and rocks the big one! You can download it from here[^]. I also use GraphViz[^] (which plugs into Doxygen) to generate pretty class hierarchy diagrams. GraphViz is also open source and free.
For a nice write-up on how to use Doxygen in your VC++ projects, see Peter Chen's article[^]. For a quick look at a Doxygen-ated lib, see my FooButton[^] article.
Doxygen makes writing documentation easy. Once you start using it, you'll wonder how you ever got by without it!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi,
I've jsut downloaded it five minutes ago or so and have been trying it out. It seems that in order for Doxygen to document code you have to comment it using a special syntax?
It seems like it is pretty complete though!
|
|
|
|
|
dNimrod#X wrote:
It seems that in order for Doxygen to document code you have to comment it using a special syntax?
Yes. See FooButton.h in my FooButton[^] article for an example. The syntax is very simple (and is in fact even customizable).
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Ravi, one last question please.
In your opinion, is this the best (freeware) documentation generating app available?
|
|
|
|
|
Dunno about "best", but with thousands of commercial and open-source projects using it, it's pretty darn good. Also, the price is hard to beat!
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
dNimrod#X wrote:
is this at all possible?
yes, completely.
ex. if you have three libraries A, B and C VC++ will combine them into a single library A, if you simply make A dependent on B and C.
dNimrod#X wrote:
How can I create a blank project to incorporate them (if such a thing is possible) ?
i'd just create an empty Win32 static library project and drop them in there.
Software | Cleek
|
|
|
|
|
Hello EveryOne,
I have made a simple program to enumerate the running processes of the system and i want to show the processes's information that includes Name, Path, Type, Threads etc. Everything goes fine except Type.
I want to categorize the processes into System Processes, User Processes, Local Services and Network Services. How can i do that?
Thanks
|
|
|
|
|
How do we bind a ADO dialog control Edit box to a comboBox to the second recordset field data?
|
|
|
|
|
|
|
I want to put a HBITMAP into clipboard,my project is a dialog-based project and codes as follow:
CDC memDC;
HBITMAP hRes=NULL;
BITMAP bmp;
HBITMAP hBitmap=(HBITMAP)LoadImage(AfxGetInstanceHandle(),"D:\\023.bmp",IMAGE_BITMAP,0,0,LR_LOADFROMFILE|LR_CREATEDIBSECTION);
HBITMAP hClip =(HBITMAP) GlobalAlloc( GHND, (DWORD) sizeof(BITMAP) );
GlobalLock ( hClip );
memcpy(&hClip,&hBitmap,sizeof(HBITMAP));
GlobalUnlock(hClip );
if(::OpenClipboard(m_hWnd)==0)
return FALSE;
else if(EmptyClipboard()==0)
return FALSE;
else if(SetClipboardData(CF_BITMAP, hClip)==NULL)
return FALSE;
else
CloseClipboard();
if(::OpenClipboard(m_hWnd)==0)
return FALSE;
else if(IsClipboardFormatAvailable(CF_BITMAP)==0)
return FALSE;
else if((hRes=(HBITMAP)GetClipboardData(CF_BITMAP)) == NULL)
return FALSE;
else if(GetObject(hRes,sizeof(BITMAP),&bmp))
return FALSE;//Errors happen here
else if(memDC.CreateCompatibleDC(GetDC())==0)
return FALSE;
else
{
CRect rect(90,10,140,50);
memDC.SelectObject(hRes);
GetDC()->StretchBlt(90,10,50,50,&memDC,0,0,bmp.bmWidth,bmp.bmHeight,SRCCOPY);
InvalidateRect(&rect);
}
what should I do? thanks a log
|
|
|
|
|
I have a list box, but I need it to auto scroll down, because everytime a message is posted, the box just stay where it is.
I could have like 10 messages posted, but it would only show the first 5...
Help me please, make it simple for me to understand I'm new to MFC.
Thanks ALOT!
Arun
|
|
|
|
|
You may want to consider using a CListCtrl instead of a CListBox . That way you could call its EnsureVisible() method to scroll a specific row into view.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
I didn't understand half the things you said.
Could you simplify it.
I already coded most of it, and it would break my heart to recode it.
I just want it simply to autoscroll down
Please help me.
|
|
|
|
|
|
I could only make it CListBox::SetTopIndex, without the (). And I couldn't even add the GetItemCount()-1
Even the CListBox::SetTopIndex didnt work...
What do I do?
|
|
|
|
|
You can post your code for starters....
Bikram Singh
|
|
|
|
|
I rather not, (i'm making a game (closed source))
I just want a normal everyday listbox to scroll down everytime a message is put into it
Any ideas?
|
|
|
|
|
I want to have a home made arcade wheel, stick, or control panel plugged into a printer(lpt?) port, and have a program that takes the signals from the printer port and converts them into keypresses so that games like MAME, Half-Life, GTA3 and the like can benefit from having custom made controls.
The only problem is creating an artificial keypress so that the game thinks the up arrow key is pressed I want it to.
Someone told me to code a driver, way over my head, and im not sure if its totally necessary. The other windows API's ive tried work in applications like notepad, but not with games, that probably have a more direct access to the keyboard.
So I looked also int Windows Hooks, but I dont totally understand how they work, or if you can insert data into the keyboard stream, all tuts and discussions on this just read keyboard input.
So please help with any ideas, or knowledge that can solve this problem, thanks.
|
|
|
|
|
Look into the SendInput() and keybd_event() functions in MSDN.
Bikram Singh
|
|
|
|
|
I tried SendInput() and its not 'root' enough to send a keypress to the games im wanting to work.
Anyone ever create somthing or hear of anyone who has created somthing that can insert a keypress to where its inserted at the earliest possible point in the line?
Thanks anyway bikram
|
|
|
|
|
so you mean you want to sent keystrokes to a game such as Need For Speed and suchlike? Created with the DirectX library? Or do these games run in a DOS window?
For DirectX-based games, I dont suppose SendInput() would work, cos DirectX probably works much closer to the keyboard driver, i'm guessing. So, look into MSDN dox on DirectInput...
For DOS based games, I havent a clue as to what could be done... maybe a TSR ?
Bikram Singh
|
|
|
|
|
No dos games, only windows, but yes, ones that proably use direct input, so it needs to be very root.
|
|
|
|