Skip to main content

Posts

Explorer Context Menu in your App

As I am currently working on C++ project, I learn lots of new things daily. In our project we needed to provide Explorer's Context Menu for our custom built explorer. This requires COM, many C++ programmers know that COM is one of the tough topics from C++ Windows Development. Anyways, this post describes about how to use Explorer's Context Menu in C++ application. This requires understanding of COM, COM related objects which you can find here . Following is the code snippet which shows how this can be done. IShellFolder *psfDesktop; SHGetDesktopFolder(&psfDesktop); // Retrieve Desktop's Shell Folder handle if(psfDesktop) {  LPITEMIDLIST pidl;  BSTR strMyFolderPath = ::SysAllocString(L"C:\\myfolder");  psfDesktop->ParseDisplayName(hWnd, 0, strMyFolderPath, NULL, &pidl, NULL);  ::SysFreeString(strMyFolderPath);

DefineDosDevice Virtual Drives!!

I started my career as Java developer in NIC. After working for 1 year and 3 months I switched to Uniken Systems. After 5 months in Uniken working on Java, I got chance to work on C++. Now I develop applications using C++, where I learn loads of new things. Yesterday itself I came to know about a new thing, not a new thing but a new API from C++ with the help of which we can create a virtual drive which actually points to a folder..  Well some people might say so whats great in that! But for some people it can be a very great thing if you can mount your movies folder, songs folder and docs folder as drive. It can be very handy coz when you open your 'My Computer' folder you can see your virtually mounted drives.. API call -       DefineDosDevice How to use it? Here is an example -      DefineDosDevice(0, _T("T:"), _T("F:\\Songs")); And when you no longer require this drive you can remove it simply by using following call   ...

Manipulating excel files in Java

We many times come across this situation where we want to create or edit excel files in java, although there are many open source libraries available out there which allows us to create or edit excel files in java but the most stable among them which I think is Apache Poi. Apache Poi library allows creation and editing of excel files. This library supports traditional 2003 format and 2007 format also. Apache Poi library supports excel macros, cell customization(cell color, text color, cell background color) and much more. Although Poi supports both xls and xlsx files, xls files are manipulated smoothly but xlsx file manipulating requires much more RAM and time for processing than that of xls. Poi has two classes HSSFWorkbook for xls files and XSSFWorkbook for xlsx files, both implements to Workbook interface. You can create multiple workbook sheets. In next post I will show how to use Apache Poi API to manipulate excel files.

No new posts :-(

Well this blog is not dead, actually I am busy due to office work and not getting time to post new posts on blog. But as soon I will get free time I will post new things which I came to know and want to share them... :-)

Dependency Injection in Action

Dependency Injection , one of the most talked topic in developers world.. I discussed about Dependency Injection in my earlier post, so if you haven't read it then I suggest that you should read it first. In this post I am going to describe how dependency injection works.. Dependency injection is basically creating object and setting property of that object which are described in configuration.

HTML Canvas To Image

HTML 5 is one of the hot topics in Web Development, because it introduced many new tags.. You can get more information about new tags in HTML 5 at here . This post is about how can you generate image from Canvas tag in HTML 5.

Java Reflections

Java Reflections is one of the most powerful API in Java. Java Reflection API allows us to access metadata about the classes at runtime i.e. Reflections allows us to find out constructors, fields and methods from a Java class. In this post I will show how to find out constructors, fields and methods from a Java class.