There is no API for working with non-bmp images in the CExtBitmap class. But there is a CExtSkinBitmap class in the ProfSkin library, which is based on the CExtBitmap class and includes a set of LoadPNG***()/SavePNG***() methods for working with png images. So you can use this ProfSkin library and load png files using CExtSkinBitmap.

1) Include this into your StdAfx.h file:

#include <Prof-UIS.h>
#include <../ProfSkin/ProfSkin.h>

2) Build the ProfSkin library which uses two third party libraries ZLib and LibPNG.

Just one thing regarding the ID "ID_YOUR_PNG_RESOURCE_IMAGE "In place of above ID i am passing Id at runtime from different DLL modules for different buttons.But still i am getting the same image for all the buttons coming from different modules.What could be done for this ?

We can guess the problem hides somewhere in your app. Please check your ID value, that these resources are really resources from the different modules. If this is possible, you can also send us your project so we can check this ourselves.