ASUS X54C Laptop Drivers for Win XP

please read 'installation_procedure.txt' file before installing any drivers

X54C VGA Driver
Size: 23.06 MB
Download: ASUS_VGA_32bit_64bit_XP.rar
X54C Audio Driver
Size: 30 MB
Download: WDM_R270.exe

X54C Chipset Drivers for Win7 and Vista 32bit
Size: 225 MB
DownLoad: Chipset_Intel_INFUpdate_Win7_32_64_Z9201021.zip

X54C WiFi Driver for Win_XP
Size: 37 MB
DownLoad: WiFi_Setup_x32.rar
[[Will be updated soon]]

C++: How to create and use control items in GUI

In windows, there are various predefined class names which are used to create controls in a window.Using these classes, controls can be created by calling the function CreateWindow() or CreateWindowEx().However some controls require additional things to be known. So i'm here to explain how to create them.

The syntax of CreateWindowEx() function is:

HWND CreateWindowEx(DWORD ExStyle, LPCSTR ClassName, LPCSTR WindowName, DWORD Style, int X,int Y,int Width,int Height, HWND hParentWindow, HMENU hMenu, HINSTANCE hInstance, LPVOID Param);

There are 7 parameters out of 12 which are important to us. Remaining can be set to NULL as shown in following examples.

How to create a Button

HWND hBtn = CreateWindowEx(0,"Button","Button Caption",WS_CHILD|WS_VISIBLE,x,y,Width,Height,hWnd,NULL,NULL,NULL);

How to create Static(Label) control

hLabel = CreateWindowEx(0,"Static","Static Caption",WS_CHILD|WS_VISIBLE,x,y,Width,Height,hWnd,NULL,NULL,NULL);

How to Create Edit control

HWND hEdit = CreateWindowEx(0,"EDIT",NULL,WS_CHILD|ES_MULTILINE|ES_LEFT|WS_VISIBLE|WS_BORDER,x,y,Width,Height,hWnd,NULL,NULL,NULL);

Similarly you can create other controls by giving thier predefined class names as second parameter.

As I told first, there are some expections in creating some controls like ProgressBar and ComboBox.To Create a progress bar you must add "ComCtl32.Lib" to your project. If you are using VC++, you can do it by adding following line:

#pragma comment(lib,"ComCtl32.Lib")

After adding ComCtl32.Lib, you should Initiate it like this.

INITCOMMONCONTROLSEX icc; icc.dwSize = sizeof(icc); icc.dwICC = ICC_PROGRESS_CLASS; InitCommonControlsEx(&icc);

Now you can create ProgressBar using CreateWindowEx() function.

When creating ComboBox, note that height must be greater than 50. Else it won't show dropdown list.

Handling Events, Setting States, and Reading Values.

As we know that WndProc function recieves different messages, these include Events from control items like button, Editbox, combobox, etc. the WndProc function recieves WM_COMMAND message, when control item events are occured. The information about these events can be obtained from WPARAM and LPARAM parameters, by performing bit shifting operations like HIWORD() and LOWORD(). extracting information about events is not same for all events. therefore you have to refer MSDN to know about them.

We can set States of control items by using SendMessage() function. This is reciprocal to the method of handling events.

There we get messages and process them, here we are sending messages. The Syntax of SendMessage() function is:

long SendMessage(HWND,UINT,WPARAM,LPARAM);

First Parameter(HWND) is the handle to the control to which we are sending message.

Second Parameter(UINT) is the message to be sent. and WPARAM and LPARAM should contain Additional Informations.

An Example of Setting ProgressBar's Progress is shown below:

SendMessage(hProgress, PBM_SETPOS, 50, 0);

This will set it's progress to 50% complete state. You can find out more messages in commctrl.h header file, or at MSDN.

To read values from control items like Edit, Combo, etc. you can use SendMessage(), GetDlgItemText(), GetDlgItemInt() etc functions. commonly the Message to be sent is WM_GETTEXT. Here is an example:

char* buff = new char; SendMessage(hEdit,WM_GETTEXT,(WPARAM)10,(LPARAM)buff); MessageBox(0,buff,"Item:Edit",MB_OK);

In the above example Third parameter of SendMessage() indicates the size of data to be read, and last param is the variable that holds the data.

C++: How to show system time and date in Windows

Windows local time and date can be obtained from SYSTEMTIME structure using GetLocalTime() function.

The SYSTEMTIME structure has the following members: wYear, wMonth,wDay, wDayOfWeek,wHour, wMinute,wSecond,wMilliseconds. All members are of type WORD.

The GetLocalTime() function has only one parameter. That is-- pointer to SYSTEMTIME structure. When this function is called, it sets the values to corresponding members. Then we can output them.

The following code shows how we can show running system time, date in the console.

#include<iostream> #include<windows.h> using namespace std; main() { loop: system("cls"); SYSTEMTIME st; GetLocalTime(&st); int hr = st.wHour; char* sfx = new char[3]; if (hr>=12) sfx="PM"; else sfx="AM"; if (hr>12) hr -= 12; cout <<"System Time Information"<<endl <<"Date :"<<st.wDay<<"/"<<st.wMonth <<"/"<<st.wYear<<endl <<"Time :"<<hr <<":"<<st.wMinute <<":"<<st.wSecond<<sfx<<endl; Sleep(1000); goto loop; }

MS-DOS: Switch Off Monitor

Switch off monitor using msdos program given below.
The monitor will be switched off untill some event like mousemove or key press occur.
You can set it to permanent off by calling this program using loop.
[DOWNLOAD MPOWR.ZIP]