Click here to Skip to main content
15,917,005 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Easy char manipulation question Pin
Gary R. Wheeler2-Jun-05 13:22
Gary R. Wheeler2-Jun-05 13:22 
GeneralRe: Easy char manipulation question Pin
ThatsAlok2-Jun-05 18:59
ThatsAlok2-Jun-05 18:59 
GeneralRe: Easy char manipulation question Pin
Axonn Echysttas2-Jun-05 21:27
Axonn Echysttas2-Jun-05 21:27 
GeneralSerial Communication using the VT100 Protocol Pin
NCARstudent2-Jun-05 12:24
NCARstudent2-Jun-05 12:24 
GeneralRe: Serial Communication using the VT100 Protocol Pin
Gary R. Wheeler2-Jun-05 13:47
Gary R. Wheeler2-Jun-05 13:47 
GeneralWhere to learn about impersonation Pin
BambooMoon2-Jun-05 12:03
BambooMoon2-Jun-05 12:03 
GeneralRe: Where to learn about impersonation Pin
Blake Miller2-Jun-05 14:17
Blake Miller2-Jun-05 14:17 
Questionhow to resize the systray to fit my clock replacment? Pin
ELY M.2-Jun-05 10:49
ELY M.2-Jun-05 10:49 
take a look at those pics

before I run the program
http://69.50.187.114/~area51/before.gif

after I run the program = notice I lost my AIM icon.... it overlapped the AIM icon.
http://69.50.187.114/~area51/after.gif


my program is MFC based.

here is code:

void CStart_Button_ChangerDlg::OnClock2()
{



hTaskbar = FindWindowEx(NULL, NULL, _T("Shell_TrayWnd"), NULL);
if (hTaskbar)
{
hTray = FindWindowEx(hTaskbar, NULL, _T("TrayNotifyWnd"), NULL);
hStaticCtrl = ::GetDlgItem(m_hWnd,IDC_CLOCK);
ReplaceClock();
SetTimer(55,1000,0);



}

}

void CStart_Button_ChangerDlg::ReplaceClock()
{

CRect rcTray;
CRect rcStaticCtrl, rcNewStaticCtrl;

::GetWindowRect(hTray, &rcTray);
::GetWindowRect(hClockText, &rcStaticCtrl);




//::SendMessage(hTray, WM_SIZE, 0, 0);


rcNewStaticCtrl.left = rcTray.right - rcTray.left - rcStaticCtrl.Width() - 0;
rcNewStaticCtrl.top = 2;
rcNewStaticCtrl.bottom = rcStaticCtrl.bottom;
rcNewStaticCtrl.right = rcStaticCtrl.right;

CWnd *pStaticCtrlWnd = GetDlgItem(IDC_CLOCK);
pStaticCtrlWnd->MoveWindow(&rcNewStaticCtrl);
pStaticCtrlWnd->ModifyStyle(0, 0, SWP_NOSIZE);


//HWND hWndStatic = GetDlgItem(IDC_CLOCK);




RECT rect;
CBrush hBrush;
CDC* hdc;
PAINTSTRUCT ps;
hdc = BeginPaint(&ps);
hdc->SaveDC();
hBrush.CreateSolidBrush(RGB(0,0,0));
hdc->SelectObject(hBrush);
GetClientRect(&rect);
hdc->Rectangle(&rect);
hdc->SetTextColor(RGB(0,255,255));
hdc->SetBkColor(RGB(0,0,0));
//hdc->SetBkMode(TRANSPARENT);
//hdc->SetBkMode(OPAQUE);
//hdc->RestoreDC(-1);

EndPaint(&ps);


//::InvalidateRect(hTray, NULL, FALSE);
//::InvalidateRect(::GetParent(hTray), NULL, TRUE);
SetWindowLong(hTray, GWL_STYLE, WS_CHILD|WS_VISIBLE|SS_BLACKRECT);

::SetParent(hClockText, hTray);

}




Generaltesting path Pin
Ann662-Jun-05 10:44
sussAnn662-Jun-05 10:44 
GeneralRe: testing path Pin
BlackDice2-Jun-05 10:55
BlackDice2-Jun-05 10:55 
GeneralRe: testing path Pin
Blake Miller2-Jun-05 14:22
Blake Miller2-Jun-05 14:22 
GeneralRe: testing path Pin
ThatsAlok2-Jun-05 19:03
ThatsAlok2-Jun-05 19:03 
GeneralPrevent another application's dialog showing Pin
Kany Nguyen2-Jun-05 9:41
Kany Nguyen2-Jun-05 9:41 
GeneralRe: Prevent another application's dialog showing Pin
Tom Archer2-Jun-05 10:06
Tom Archer2-Jun-05 10:06 
GeneralProblem with CTreeCtrl and OnNMRclick Pin
AnTri2-Jun-05 9:12
AnTri2-Jun-05 9:12 
GeneralRe: Problem with CTreeCtrl and OnNMRclick Pin
AnTri2-Jun-05 11:40
AnTri2-Jun-05 11:40 
GeneralRe: Problem with CTreeCtrl and OnNMRclick Pin
Gary R. Wheeler2-Jun-05 14:17
Gary R. Wheeler2-Jun-05 14:17 
GeneralMFC and mciSendString Pin
jet9152-Jun-05 9:09
jet9152-Jun-05 9:09 
GeneralRe: MFC and mciSendString Pin
David Crow2-Jun-05 9:55
David Crow2-Jun-05 9:55 
GeneralVC and SharedFolder on Lan Pin
Usman Tasleem Akshaf2-Jun-05 8:05
Usman Tasleem Akshaf2-Jun-05 8:05 
GeneralRe: VC and SharedFolder on Lan Pin
David Crow2-Jun-05 9:00
David Crow2-Jun-05 9:00 
GeneralRe: VC and SharedFolder on Lan Pin
Usman Tasleem Akshaf3-Jun-05 3:54
Usman Tasleem Akshaf3-Jun-05 3:54 
GeneralRe: VC and SharedFolder on Lan Pin
David Crow3-Jun-05 4:08
David Crow3-Jun-05 4:08 
GeneralRe: VC and SharedFolder on Lan Pin
_tasleem6-Jun-05 16:40
_tasleem6-Jun-05 16:40 
GeneralRe: VC and SharedFolder on Lan Pin
David Crow7-Jun-05 3:04
David Crow7-Jun-05 3:04 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.