Tuesday, July 21, 2009

Huawei EC325(BSNL,Reliance,TataIndicom) in Linux(Ubuntu)

First check whether the command sudo /etc/wvdial in terminal.
If it doesn't exist,download and install wvdial and its related ones.

Now we can configure wvdial. We’ll need to edit the wvdial.conf file. So do this:
$ sudo gedit /etc/wvdial.conf

it so that the [Dialer Defaults] section looks like this:

[Modem0]
Modem = /dev/ttyUSB0
Baud = 115200
SetVolume = 0
Dial Command = ATDT
init1 = ATZ
init2 = AT+CRM = 1
New PPPD = yes
FlowControl = Hardware(CRTSCTS)

[Dialer bsnl]
Username = XXXX
Password = xxxx
Phone = #777
Stupid Mode = 1
Inherits = Modem0

After saving the file run the command
sudo wvdial bsnl.

If u had any problem...pls put comments...
Cheers!

Sunday, July 27, 2008

Image Loaded Button in VC++(Win32)

We can load images on buttons in VC++ by using
below code code snippet.


m_hBitmap = (HBITMAP)::LoadBitmap( g_hModule, MAKEINTRESOURCE(
IDB_BITMAP_BACKX ));
if( m_hBitmap ){
HWND h = Item( IDC_BU_XP ).handle;
LONG dw = ::GetWindowLong( h, GWL_STYLE );
::SetWindowLong( h, GWL_STYLE, ( dw & ~SS_ENHMETAFILE ) | BS_BITMAP | BS_CENTER );
::SendMessage( Item( IDC_BU_XP), BM_SETIMAGE,
(WPARAM)IMAGE_BITMAP, (LPARAM)m_hBitmap );
}

Here IDB_BITMAP_BACKX :- control id of bitmap control.
IDC_BU_XP :-control id of Button Control.
Also m_hBitmap is the object of HBITMAP.