Skip to main content


Showing posts from February, 2012

SingleWindow MutliProcess App

If you are using Google Chrome browser then you must have noticed that when you start Google Chrome, many chrome.exe processes appears in Windows Task Manager. Many people think that why there are so many chrome.exe processes are running when I have started only once Google Chrome browser, well that's because for every tab and every enabled extension chrome creates a new process to give you seamless experience of browsing even if any one of the tab or extension hangs due to any reason. When I first noticed about the Single chrome window with multiple tabs running each process for every tab, I wondered and thought they must have wrote awesome code to achieve this and never thought it would be so easy in reality. ;)
Here is how they might have done this -
Well that's very simple, you need to create a Main application window and then write your code in such a way that by any IPC technique when you get Handle for top most window you create new window as child window of this Main …

Beware of Android FREE Apps

Android platform is an open source platform to develop applications. From Android Market you can get plenty of free apps for your android smartphone. Recently I downloaded a free game from android market which was developed by a very good company, I played this game and I liked it. The game is awesome but after 2 days I faced problem while connecting my device to my pc, my smartphone was unable to detect that it has been connected to pc???
Now after searching for problem I found that the most latest change I did in my phone was installing this app(game) from a very good company... Then I went through the permissions which were requested by this game and I found it was requesting so many unnecessary permissions. When I uninstalled this app my phone immediately detected pc connection...
So while installing FREE apps from Android market please check which are the permissions requested by these applications, and please go through the reviews even if these applications are developed by ve…

Dialog in C++

While helping out a colleague I recently came across this code where for creating a dialog box first a window was created using CreateWindow method and then for CreateDialog method HWND returned by CreateWindow method was used, also while calling CreateWindow method values for width and height were specified as literals(hard coded).

Now the problem my colleague facing was with different resolutions this dialog was getting displayed differently, and on lower resolutions dialog was cropping the inner content of the dialog. Now the dialog resource template was set with type as Child.
Solution here is that you should not create any parent window for dialog unless its required in some special cases. We can directly pass the dialog resource template id to CreateDialog or DialogBox method and the HWND that we pass to this method specifies the parent window for this dialog. For this type for Dialog in resource has to be overlapped window or popup window. When we call either of this method fo…