Forgive me, this is basically the beginning of my windows C++ programming, up until now it's all been command line linux code. Is there a special way to cast with the win API or something?
Then you need to study beginners material of the language since you need to understand types, structures and unions as well as many, many other things. Trying to explain them to you in a forum is not appropriate.
I working on one win32 application. I need to change the font of my controls. This can be done by sending WM_SETFONT message to the control. but it need hFont as WPARAM. and to create hFont we need CreateFont() function but it is only available in MFC not in win32. so what is alternative of this.
I have derived a subclass from CFileDialog. I would like to check that certain conditions are correct before the dialog is closed. How can I intercept the message to close the dialog? My derived dialog class includes an OnDestroy(), but the dialog is already closed before it is reached.
In addition to what Rajesh said: this is only possible if you are only using OS independant features (so, no UI for instance). If you are using the Win32 API or the MFC, forget about it (although there are libraries which can be used in order to develop cross-platform UIs).