Monday, November 5, 2007

Bangkok Free and Easy

Bangkok is one of the popular tourist destinations in Asia. Flying from Singapore to Bangkok on budget airline TigerAirways takes about 2 hours. Apart from being a "shopping heaven", Bangkok has no lack of historic buildings especially its hundreds of "Wats", though only a few are notable.

Tourists in Bangkok have a wide variety of shopping experiences, from street markets or bazaars such as Pratunam market (located in the central of Bangkok), Chatuchak weekend market (about 40 mins taxi ride from central of Bangkok) to malls such as Siam Paragon (also conveniently located in Bangkok central).

Street foods such as pig's trotter can be seen almost everywhere near markets, some people never dare to try though, probably due to hygienic concerns.

Still, the best thing to do is probably Body Massage....

Wat Arun

Sunday, November 4, 2007

Kolo mee

There are quite a number of outlets in Singapore selling "Kolo Mee". Kolo Mee is most well-known noodle in Kuching, Sarawak. For example, "家乡 Kolo Mee" has already a number of outlets in Singapore, such as China Town, Vivo City, Upper Thomson road, and recently in Toa Payoh Central. To those who are nostalgic, it is definitely a good try.

Saturday, November 3, 2007

Tsim Sha Tsui

Mongkok is a very crowded place in Hong Kong. A place full of eating outlets, is basically a must visit place for tourists.

Tsim Sha Tsui (尖沙咀) Hong Kong is almost a must visit place for tourist. The well-known harbour front is also located nearby. Tourists that come to the harbour front will not miss to take picture of Hong Kong's night view.

Hong Kong trip

How much does it cost to visit Hong Kong for a short 3 to 4 days of sight seeing tour? I went to hong kong recently and spend about $1000 dollar (excluding expensive shoppings) for two persons. Cheap!?

- I booked the cheapest air tickets for two on JetStar.

- I booked a budget hotel (Ah Shan hotel, Simple, very clean and neat, guest friendly) room in MongKok for two persons through wotif.

- I get around everwhere in Hong Kong by underground train, and sometimes on Bus, MiniBus.

I went to most of the shopping places in Hong Kong, tourist places in Hong Kong ( such as Ocean park, Stanley market, Repulse Bay etc).

One more thing, the food in Hong Kong, especially if you eat in food court, it came usually in big bowl and large quantity, compared to other parts of Asia excluding China ... :-) such as south-east Asia, Singapore and Malaysia.

Sunday, October 28, 2007

Western food in Singapore

Living in Singapore and food is abundant here. From local delights and tongue tingling cuisines to Korean food, Japanese food, Indian food, Malay food and Western food, you name it.

Botak Jones, is one of the well-known Western food outlets in Singapore. People queuing to order and long wait here is usual.

Super size hotdog like this one here is rarely seen in many other Western food outlets in Singapore.

Saturday, October 27, 2007

Graphical password

Picture Credit: Rutgers School and

If you are just using dictionary word, easy to remember numbers or a combination of them as your password, chances are that your password is of low strength and thus can be broken easily.

Graphical password is a new way of creating and remember your password without using any apha numeric. Instead you are being shown a picture or a full screen of hundreads of icons which is easier to remember as the user can choose or even use pictures or icons that he likes. Many ways of creating and using the graphical password have been suggested.

Roti Prata Singapore

Living in Singapore, roti prata (Malay language) is another popular food in both Singapore and Malaysia. In Malaysia, it is better known as roti canai. Roti prata or canai is usually taken for breakfast or supper, but who cares. It has many variations, each comes with different ingredient. For instance, egg prata/canai, onion prata/canai etc etc. Basically, if you put "X" ingredient inside, it becomes "X" prata or canai. But many people prefer plain prata.

Friday, October 26, 2007

Marina centre at Singapore

Marina Centre at Singapore is already a beautiful place, when viewed from 70th floor from Westin Stamford, the world's sixth tallest hotel.

Marina Centre will soon boasts not only a huge collection of world renowned 5-stars hotels with great shopping malls in the heart of it, but also one of the world's most vibrant cities with the completion of its Integrated Resort casino project and the world first ever Formula One night circuit under the lights on the street!

Danga Bay Johor Bahru

Danga Bay is no stranger to people who live in Johor Bahru, Malaysia, as well as to many Singaporeans. It is a good place to drop by especially at night as it offers a sea of fascinations. As its name has suggested, Danga Bay is located along the coast of Johor Straits, almost right in Johor Bahru city centre.

Also known as Danga Bay waterfront, locals, tourists and passers by come to Danga Bay for photography, food, entertainment and its wide range of attractions.

Thursday, October 25, 2007

Accessing Windows object across thread

For example, if i pass the pointer of a Windows object created by the main application thread when I create a worker thread, there is not much issue here regrading accessing the Windows object across thread boundaries.

For instance, from your MFC dialog class: -



void CMyDialog::Some_Function()

AfxBeginThread(ThreadFunc, this);


UINT ThreadFunc(LPVOID pParam)
CMyDialog* pMyDialog=(CMyDialog*) pParam;

//Here you "practically" have access to CMyDialog.



However, note that to change anything or set any properties on Windows Objects such as Text box, Edit box etc inside the Thread function is wrong. If you are getting assertion somewhere when trying to set or update some text or status in another window from the thread, then pay attention to this. Most people, include that of Microsoft will strongly advise you not to do so. Reason? It is quite well explained here by MSDN.

And if you think that is not enough explanation, read this.
Original link is here:

However, that is not the main subject here today. The actual subject is this: -

I want to access a Window object created by the main thread from a worker thread using a window handler, HWND.


"The correct approach in such situations is to work with window handles, not MFC objects. It is safe to pass window handles across thread boundaries. If thread A passes a window handle to thread B, then thread B can use this window handle to send or post messages to the window. When these messages are processed, you are back in the context of thread A and calls to CWnd::AssertValid() to check thread A's window handle maps will succeed. In this scenario, thread B can also use the CWnd::FromHandle() function to get a temporary CWnd object which is placed in thread B's temporary handle map. However this object may be of only limited use, because in no way is it in synchronization with the MFC object existing in thread A's handle maps. "

This means: -



UINT ThreadFunc(LPVOID pParam)
//assuming hWnd is the handler to the windows object i want to access
CWindowObject * pWnd = CWnd::FromHandle(hWnd);



pWnd is pointer to a temporary Windows object, because this is just a copy of the actual Windows object that I want to access to. The above should work normally.

But, if the Windows object that i want to access to is an activex Control Windows object, it seems like there is a problem somewhere. What activex control?

For instance, add to your project the Microsoft registered activex component from your VC++ 6 project menu->Add to project->Components and Controls, then select: -

Microsoft Hierarchical FlexGrid Control

Add this control into your dialog resource, get its HWND handler during run time and try to access this object from a worker thread as mentioned above. You will get something like this, telling you something somewhere is not correct. But where and how? I don't know.

But the answer or what actually happens seems to be that NEVER access MFC/Windos object across thread. If you want to do anything on the objects across thread, use PostMessage or SendMessage. But this requires you to do something in the thread that created the Windows object. :-(