How to make an application “Alway on Top” in C++ (For Qt and Win32)

I use the following method to make an application remain on top of other windows in Qt:

SetWindowPos
(
	(HWND)winId(),
	HWND_TOPMOST,
	window_top_pos,
	window_left_pos,
	window_width,
	window_height,
	SWP_SHOWWINDOW
);


Note that window_top_pos, window_left_pos, window_width and window_height are variables and you can replace them with your own.

Please be aware that this is a Win32 API function so it won’t work in Linux or MAC.

Don’t forget to add the include file to your code.

#include "windows.h"

And add the required library to your .PRO file.

LIBS += -luser32


Image Transformer (Fourier Transform App for Android)

UPDATE: This application is updated. Please read this post for more information.

My new application is a tool for for performing Fourier transformation on images. You can then apply masks to the Fourier representation of image and revert back (perform Inverse Fourier Transform) to see how the image gets affected.

For more information about Fourier Transform you can check out this link.

It is built using OpenCV and Qt and it is programmed completely in C++. I hope it would be useful for Image Processing and Machine Vision enthusiasts, researchers and students. It also contains some useful tips and tricks for programming Android applications using Qt and OpenCV such as:

  • How to open Android image gallery in Qt (Default interface)
  • How to capture images using default Android camera interface
  • How to crop images displayed on a QLabel
  • etc.



Source code (any part of it actually 🙂 ) is available upon request. Please send your requests using the Contact Me page.

Please consider supporting this application by giving a decent rating in Google Play.

For an example of Fourier transform using OpenCV please check out this link.

You can also see this link for more information about Fourier transform.

You can download this application from Google Play using the link below:

https://play.google.com/store/apps/details?id=com.amahta.ImageTransformer

trans_logo



CATOX 2000

CATOX 2000 is a fully automatic metal sheet cutting system built by Ahmadi Industrial Group during 2000’s. It is able to get AutoCAD drawings as an input and cut the drawing from a metal sheet (iron, steel and any other metal type depending on the cutter section of the machine which can be Oxygen-Propane, Plasma or Laser) CATOX 2000 is widely used in heavy industries.

Continue reading “CATOX 2000”

Hürriyet Mobil Hackathon Winners

I participated in a hackathon hosted by Hürriyet (http://www.hurriyethackathon.com) along with my friends Erisn and Sinan. It lasted more than 48 hours, full of coding, designing and debugging. We were awarded as the third best project. There were 54 groups from all around Turkey with some really great ideas and projects. Our group was called T2K and our project was named Elizabeth. Below is the video we used for presentation at the finals. It’s also a description of the project. Continue reading “Hürriyet Mobil Hackathon Winners”

How to limit 32-bit applications to one instance in Visual C++ (with or without Qt)

I use the code from the following article to allow only a single instance of my programs (mostly written using Qt Framework) to run on Windows. Some programs (specially the ones which connect to a specific type of hardware or resource) need this limitation to avoid conflicts.

Please also note that this code is specific to Windows.

Continue reading “How to limit 32-bit applications to one instance in Visual C++ (with or without Qt)”