|
Hi all,
I am using IE6.0 and its crashing many times, When i debug iexplore.exe it using MSVS.
I am getting assembly code as below
77F82D5D je 77F82D70
77F82D5F or ecx,0FFFFFFFFh
77F82D62 xor eax,eax
77F82D64 repne scas byte ptr [edi] <- cursor is at this point
77F82D66 not ecx
77F82D68 mov word ptr [edx+2],cx
77F82D6C dec ecx
77F82D6D mov word ptr [edx],cx
77F82D70 pop edi
and the stack window shows
NTDLL! 77f82d64()
// other stuff.
Can someone help me in tracing the problem. and how to extract information from this
Thanks in advance
Abhishake
|
|
|
|
|
Up the stack,Who is calling NTDLL ?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks Papa,
Since i am not sure what i going wrong here is all the information
NTDLL
**********
77F82D5F or ecx,0FFFFFFFFh
77F82D62 xor eax,eax
77F82D64 repne scas byte ptr [edi] <- cursor is at this point
77F82D66 not ecx
77F82D68 mov word ptr [edx+2],cx
77F82D6C dec ecx
KERNEL32! 77ea069f()
**********
77EA0693 ret 4
77EA0696 push dword ptr [esp+4]
77EA069A call 77E86F4C
77EA069F test eax,eax <- cursor is at this point
77EA06A1 je 77EA06AB
F3HTMLMU! 020c99e3()
**********
020C99DE call 020C9A48
020C99E3 lea ecx,[ebp-74h]
020C99E6 call 020CBDDC
020C99EB lea ecx,[ebp-18h] <- cursor is at this point
020C99EE mov dword ptr [ebp-18h],esi
F3HTMLMU! 020c97c7()
**********
020C97C2 call 020C9882
020C97C7 test al,al <- cursor is at this point
020C97C9 je 020C97CE
020C97CB push 1
020C97CD pop esi
|
|
|
|
|
F3HTMLMU is causing u all the grief and trouble.
This is related to the mwsbar BHO.
In other terms its a toolbar that you have in IE explorer that is crashing it.
You can uncheck it from the toolbars or unregister the BHO, or remove it from the registry
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks Papa,
There are many toolbars (BHOs) loaded in IE, how to know which BHO is causing problem, can we extract that infromation from the assembly code, for temporary fix i have removed all the toolbar, Is there any way i can learn how to extract the information for assembly code?.
Thanks for you help again
With Regards
Abhishake
|
|
|
|
|
F3HTMLMU is the BHO causing the trouble.
You can search on your hard disk for F3HTMLMU.dll and remove/rename it (i guess programfilesdir+\mywebsearch\bar\1.bin\
Or
Looking in the registry under LocalMachine\software\Microsoft\Windows\CurrentVersion\Explorer\Browser Helper Objects\ You'll see all the BHO u have.
The F3HTMLMU is the faulty one, so you can search now between these class IDs listed at the registry
eg: {A6A49249-57AE-4295-8D4D-18A9502C7D8E}
wich one reference F3HTMLMU.DLL and remove it.
Todo so search in the whole registry for the key for instance {A6A49249-57AE-4295-8D4D-18A9502C7D8E} you'll see a key, and a key under it named InprocServer32, in its default value you'll find the dll name.
Hope this helps
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
papa,
Thanks for your wonderful explaination and help. today I learned something new about MSVS, full credit to you.
With Regards
Abhishake
|
|
|
|
|
Hello!Can somebody tell me if i could make the graphical interface for a VC++ program using Macromedia Flash?
|
|
|
|
|
Flash can talk COM, so if your VC program has a COM interface, the flash program can command it to do things, and query it for data to display.
It's an evolving way of writing GUIS...
look at http://topicks.com/ for a demo of a program that does just that
|
|
|
|
|
I don't know the Flash COM interface.There is a change i could find out,or find an article decribeing the interface.
|
|
|
|
|
thanks first,
DirectShow and DirectDraw, which one will be better
for rendering video?
DirectDraw's direct Video Memory access (only memcpy(..) )
vs.
DirectShow's Interface ( a few api call)
which one win?
By the way, i found that when i use DirectDraw to draw some video frames, existance of Windows MediaPlayer(it may be a instance of DirectShow i think ) is taking affect on my program's performance..which was better.
i guess DirectDraw has some connection with DirectShow,,,
what would you like to think about?
thanks again for your time
|
|
|
|
|
Hi~
Is there any function which is used for searching a substring?
for example:
LPWSTR a_string = _T("abcdef");
I would like to cut "cde" out and make a new LPWSTR point to it.
How?
Thanks
|
|
|
|
|
wcsstr() is your friend here.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it!
|
|
|
|
|
If you absolutely positively must use a C-style string, then _tcsstr() is the way to go. Returns a LPTSTR to the position of the first found substring in the original string or NULL if not found.
If you don't really need to use C-style strings, get on the train and use a std::string or std::wstring and its substr() function.
Note! If you explicitly use LPWSTR (as in your question) instead of LPTSTR , then you shouldn't use _T() , but rather L . Otherwise you'll confuse yourself and others by being inconsistent. In other words:
LPWSTR strForcedUnicode = L"abcdef";
LPTSTR strMultibyteOrUnicode = _T("abcdef");
--
The Blog: Bits and Pieces
|
|
|
|
|
here some functions i wrote recently
i have been planning to rewrite them (wrote them in a hurry)
if you want to replace "cde" then just just do
StrReplace( a_string, "cde", "What to replace it with" );
char * SubStr( char * String, long Start = 0, long Length = 0 )
{
if( Length < 1 || Length > (signed) strlen( String ) )
{
Length = strlen( String );
}
char * Result = new char[Length+1];
long lPos = 0;
for( long i = Start; i < Start+Length; i++ )
{
Result[lPos++] = String[i];
}
Result[lPos] = '\0';
return Result;
}
long StrFindFirst( char * String, char * StringFind )
{
for( long i = 0; i < (signed) strlen( String ); i++ )
{
if( !strcmp( SubStr( String, i, strlen( StringFind ) ), SubStr( StringFind, 0, strlen( StringFind ) ) ) )
{
return i;
}
}
return -1;
}
void StrFindAll( long * Array, char * String, char * StringFind )
{
long count = 0;
for( long i = 0; i < (signed) strlen( String ); i++ )
{
if( !strcmp( SubStr( String, i, strlen( StringFind ) ), SubStr( StringFind, 0, strlen( StringFind ) ) ) )
{
Array[count++] = i;
}
}
Array[count] = '\0';
}
long StrFindCount( char * String, char * StringFind )
{
long count = 0;
for( long i = 0; i < (signed) strlen( String ); i++ )
{
if( !strcmp( SubStr( String, i, strlen( StringFind ) ), SubStr( StringFind, 0, strlen( StringFind ) ) ) )
{
count++;
}
}
return count;
}
char * StrReplace( char * String, char * Find, char * Replace )
{
char * NewString = new char[];
long fCount = StrFindCount( String, Find );
long Found[sizeof(String)];
long fPos = 0;
long nPos = 0;
long oPos = 0;
if( fCount > 1024 || fCount < 1 ) return NULL;
StrFindAll( Found, String, Find );
while( oPos < (signed) strlen( String ) )
{
if( oPos == Found[fPos] )
{
fPos++;
for( long x = 0; x < (signed) strlen( Replace ); x++ )
{
NewString[nPos++] = Replace[x];
}
oPos += strlen( Find );
}
else
{
NewString[nPos++] = String[oPos++];
}
}
NewString[nPos] = '\0';
return NewString;
}
|
|
|
|
|
I'm making a DLL that exports some functions that create and configure a window from the MSN Style PopUp window example on CP. Declaring the code goes thru without error but it crashes everytime I try to uae the functions. Please help! here is the code:
#include "stdafx.h"
#include "TaskbarNotifier.h"
#define IDT_HIDDEN 0
#define IDT_APPEARING 1
#define IDT_WAITING 2
#define IDT_DISAPPEARING 3
#define TASKBAR_ON_TOP 1
#define TASKBAR_ON_LEFT 2
#define TASKBAR_ON_RIGHT 3
#define TASKBAR_ON_BOTTOM 4
// CTaskbarNotifier
IMPLEMENT_DYNAMIC(CTaskbarNotifier, CWnd)
CTaskbarNotifier::CTaskbarNotifier()
{
m_strCaption="";
m_pWndParent=NULL;
m_bMouseIsOver=FALSE;
m_hSkinRegion=NULL;
m_hCursor=NULL;
m_crNormalTextColor=RGB(133,146,181);
m_crSelectedTextColor=RGB(10,36,106);
m_nSkinHeight=0;
m_nSkinWidth=0;
m_dwTimeToShow=0;
m_dwTimeToLive=0;
m_dwTimeToHide=0;
m_dwDelayBetweenShowEvents=0;
m_dwDelayBetweenHideEvents=0;
m_nStartPosX=0;
m_nStartPosY=0;
m_nCurrentPosX=0;
m_nCurrentPosY=0;
m_nIncrement=2;
m_nTaskbarPlacement=0;
m_nAnimStatus=IDT_HIDDEN;
m_rcText.SetRect(0,0,0,0);
}
CTaskbarNotifier::~CTaskbarNotifier()
{
// No need to delete the HRGN, SetWindowRgn() owns it after being called
}
int CTaskbarNotifier::Create(CWnd *pWndParent)
{
m_pWndParent=pWndParent;
CString strWndClass=AfxRegisterWndClass(0,AfxGetApp()->LoadStandardCursor(IDC_ARROW),GetSysColorBrush(COLOR_WINDOW),NULL);
return CreateEx(0,strWndClass,NULL,WS_POPUP,0,0,0,0,pWndParent->m_hWnd,NULL);
}
void CTaskbarNotifier::SetTextFont(LPCTSTR szFont,int nSize,int nNormalStyle,int nSelectedStyle)
{
LOGFONT lf;
m_myNormalFont.DeleteObject();
m_myNormalFont.CreatePointFont(nSize,szFont);
m_myNormalFont.GetLogFont(&lf);
// We set the Font of the unselected ITEM
if (nNormalStyle & TN_TEXT_BOLD)
lf.lfWeight = FW_BOLD;
else
lf.lfWeight = FW_NORMAL;
if (nNormalStyle & TN_TEXT_ITALIC)
lf.lfItalic=TRUE;
else
lf.lfItalic=FALSE;
if (nNormalStyle & TN_TEXT_UNDERLINE)
lf.lfUnderline=TRUE;
else
lf.lfUnderline=FALSE;
m_myNormalFont.DeleteObject();
m_myNormalFont.CreateFontIndirect(&lf);
// We set the Font of the selected ITEM
if (nSelectedStyle & TN_TEXT_BOLD)
lf.lfWeight = FW_BOLD;
else
lf.lfWeight = FW_NORMAL;
if (nSelectedStyle & TN_TEXT_ITALIC)
lf.lfItalic=TRUE;
else
lf.lfItalic=FALSE;
if (nSelectedStyle & TN_TEXT_UNDERLINE)
lf.lfUnderline=TRUE;
else
lf.lfUnderline=FALSE;
m_mySelectedFont.DeleteObject();
m_mySelectedFont.CreateFontIndirect(&lf);
}
void CTaskbarNotifier::SetTextColor(COLORREF crNormalTextColor,COLORREF crSelectedTextColor)
{
m_crNormalTextColor=crNormalTextColor;
m_crSelectedTextColor=crSelectedTextColor;
RedrawWindow();
}
void CTaskbarNotifier::SetTextRect(RECT rcText)
{
m_rcText=rcText;
}
BOOL CTaskbarNotifier::SetSkin(UINT nBitmapID,short red,short green,short blue)
{
BITMAP bm;
m_biSkinBackground.DeleteObject();
if (!m_biSkinBackground.LoadBitmap(nBitmapID))
return FALSE;
GetObject(m_biSkinBackground.GetSafeHandle(), sizeof(bm), &bm);
m_nSkinWidth=bm.bmWidth;
m_nSkinHeight=bm.bmHeight;
m_rcText.SetRect(0,0,bm.bmWidth,bm.bmHeight);
if (red!=-1 && green!=-1 && blue!=-1)
{
// No need to delete the HRGN, SetWindowRgn() owns it after being called
m_hSkinRegion=GenerateRegion((HBITMAP)m_biSkinBackground.GetSafeHandle(),(BYTE) red,(BYTE) green,(BYTE) blue);
SetWindowRgn(m_hSkinRegion, true);
}
return TRUE;
}
BOOL CTaskbarNotifier::SetSkin(LPCTSTR szFileName,short red,short green,short blue)
{
BITMAP bm;
HBITMAP hBmp;
hBmp=(HBITMAP) ::LoadImage(AfxGetInstanceHandle(),szFileName,IMAGE_BITMAP,0,0, LR_LOADFROMFILE);
if (!hBmp)
return FALSE;
m_biSkinBackground.DeleteObject();
m_biSkinBackground.Attach(hBmp);
GetObject(m_biSkinBackground.GetSafeHandle(), sizeof(bm), &bm);
m_nSkinWidth=bm.bmWidth;
m_nSkinHeight=bm.bmHeight;
m_rcText.SetRect(0,0,bm.bmWidth,bm.bmHeight);
if (red!=-1 && green!=-1 && blue!=-1)
{
// No need to delete the HRGN, SetWindowRgn() owns it after being called
m_hSkinRegion=GenerateRegion((HBITMAP)m_biSkinBackground.GetSafeHandle(),(BYTE) red,(BYTE) green,(BYTE) blue);
SetWindowRgn(m_hSkinRegion, true);
}
return TRUE;
}
void CTaskbarNotifier::Show(LPCTSTR szCaption,DWORD dwTimeToShow,DWORD dwTimeToLive,DWORD dwTimeToHide,int nIncrement)
{
unsigned int nDesktopHeight;
unsigned int nDesktopWidth;
unsigned int nScreenWidth;
unsigned int nScreenHeight;
CRect rcDesktop;
m_strCaption=szCaption;
m_dwTimeToShow=dwTimeToShow;
m_dwTimeToLive=dwTimeToLive;
m_dwTimeToHide=dwTimeToHide;
::SystemParametersInfo(SPI_GETWORKAREA,0,&rcDesktop,0);
nDesktopWidth=rcDesktop.right-rcDesktop.left;
nDesktopHeight=rcDesktop.bottom-rcDesktop.top;
nScreenWidth=::GetSystemMetrics(SM_CXSCREEN);
nScreenHeight=::GetSystemMetrics(SM_CYSCREEN);
BOOL bTaskbarOnRight=nDesktopWidth<nscreenwidth &&="" rcdesktop.left="=0;
" bool="" btaskbaronleft="nDesktopWidth<nScreenWidth" rcdesktop.left!="0;
" btaskbarontop="nDesktopHeight<nScreenHeight" rcdesktop.top!="0;
" btaskbaronbottom="nDesktopHeight<nScreenHeight" rcdesktop.top="=0;
"
="" switch="" (m_nanimstatus)
="" {
="" case="" idt_hidden:
="" showwindow(sw_show);
="" if="" (btaskbaronright)
="" m_dwdelaybetweenshowevents="m_dwTimeToShow/(m_nSkinWidth/m_nIncrement);
" m_dwdelaybetweenhideevents="m_dwTimeToHide/(m_nSkinWidth/m_nIncrement);
" m_nstartposx="rcDesktop.right;
" m_nstartposy="rcDesktop.bottom-m_nSkinHeight;
" m_ntaskbarplacement="TASKBAR_ON_RIGHT;
" }
="" else="" (btaskbaronleft)
="" (btaskbarontop)
="" (btaskbaronbottom)
="" taskbar="" is="" on="" the="" bottom="" or="" invisible
="" }
="" m_ncurrentposx="m_nStartPosX;
" m_ncurrentposy="m_nStartPosY;
" settimer(idt_appearing,m_dwdelaybetweenshowevents,null);
="" break;
="" idt_waiting:
="" redrawwindow();
="" killtimer(idt_waiting);
="" settimer(idt_waiting,m_dwtimetolive,null);
="" idt_appearing:
="" idt_disappearing:
="" killtimer(idt_disappearing);
="" setwindowpos(null,m_ncurrentposx,m_ncurrentposy,m_nskinwidth,m_nskinheight,swp_noownerzorder="" |="" swp_nozorder="" swp_noactivate);
="" break;
="" }
}
void="" ctaskbarnotifier::hide()
{
="" killtimer(idt_appearing);
="" movewindow(0,0,0,0);
="" showwindow(sw_hide);
="" m_nanimstatus="IDT_HIDDEN;
}
HRGN" ctaskbarnotifier::generateregion(hbitmap="" hbitmap,="" byte="" red,="" green,="" blue)
{
="" word="" wbmpwidth,wbmpheight;
="" hrgn="" hrgn,="" htmprgn;
="" 24bit="" pixels="" from="" bitmap
="" *ppixels="Get24BitPixels(hBitmap," &wbmpwidth,="" &wbmpheight);
="" (!ppixels)="" return="" null;
="" create="" our="" working="" region
="" (!hrgn)="" {="" delete="" ppixels;="" null;="" dword="" p="0;
" for="" (word="" y="0;" y<wbmpheight;="" y++)
="" x="0;" x<wbmpwidth;="" x++)
="" jred="pPixels[p+2];
" jgreen="pPixels[p+1];
" jblue="pPixels[p+0];
" (jred="=red" remove="" transparent="" color="" htmprgn="CreateRectRgn(x,y,x+1,y+1);
" combinergn(hrgn,="" htmprgn,="" rgn_xor);
="" deleteobject(htmprgn);
="" next="" pixel
="" p+="3;
" release="" pixels
="" ppixels;
="" hrgn;
}
byte*="" ctaskbarnotifier::get24bitpixels(hbitmap="" pbitmap,="" *pwwidth,="" *pwheight)
{
="" bitmap="" bmpbmp;
="" lpbitmapinfo="" pbmiinfo;
="" bitmapinfo="" bmiinfo;
="" wbmpwidth,="" wbmpheight;
="" getobject(pbitmap,="" sizeof(bmpbmp),&bmpbmp);
="" pbmiinfo="(LPBITMAPINFO)&bmpBmp;
" wbmpwidth="(WORD)pbmiInfo-">bmiHeader.biWidth;
wBmpWidth -= (wBmpWidth%4);
wBmpHeight = (WORD)pbmiInfo->bmiHeader.biHeight;
*pwWidth = wBmpWidth;
*pwHeight = wBmpHeight;
BYTE *pPixels = new BYTE[wBmpWidth*wBmpHeight*3];
if (!pPixels) return NULL;
HDC hDC =::GetWindowDC(NULL);
bmiInfo.bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmiInfo.bmiHeader.biWidth = wBmpWidth;
bmiInfo.bmiHeader.biHeight = -wBmpHeight;
bmiInfo.bmiHeader.biPlanes = 1;
bmiInfo.bmiHeader.biBitCount = 24;
bmiInfo.bmiHeader.biCompression = BI_RGB;
bmiInfo.bmiHeader.biSizeImage = wBmpWidth*wBmpHeight*3;
bmiInfo.bmiHeader.biXPelsPerMeter = 0;
bmiInfo.bmiHeader.biYPelsPerMeter = 0;
bmiInfo.bmiHeader.biClrUsed = 0;
bmiInfo.bmiHeader.biClrImportant = 0;
// get pixels from the original bitmap converted to 24bits
int iRes = GetDIBits(hDC,pBitmap,0,wBmpHeight,(LPVOID)pPixels,&bmiInfo,DIB_RGB_COLORS);
// release the device context
::ReleaseDC(NULL,hDC);
// if failed, cancel the operation.
if (!iRes)
{
delete pPixels;
return NULL;
};
// return the pixel array
return pPixels;
}
BEGIN_MESSAGE_MAP(CTaskbarNotifier, CWnd)
// ON_WM_CREATE()
// ON_WM_MOUSEMOVE()
// ON_WM_DESTROY()
// ON_WM_ERASEBKGND()
// ON_WM_PAINT()
// ON_MESSAGE(WM_MOUSELEAVE, OnMouseLeave)
// ON_MESSAGE(WM_MOUSEHOVER, OnMouseHover)
// ON_WM_SETCURSOR()
ON_WM_LBUTTONUP()
// ON_WM_TIMER()
END_MESSAGE_MAP()
// CTaskbarNotifier message handlers
/*
int CTaskbarNotifier::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
m_hCursor = ::LoadCursor(NULL, MAKEINTRESOURCE(32649));
return 0;
}
void CTaskbarNotifier::OnDestroy()
{
CWnd::OnDestroy();
// TODO: Add your message handler code here
}
void CTaskbarNotifier::OnMouseMove(UINT nFlags, CPoint point)
{
TRACKMOUSEEVENT t_MouseEvent;
t_MouseEvent.cbSize = sizeof(TRACKMOUSEEVENT);
t_MouseEvent.dwFlags = TME_LEAVE | TME_HOVER;
t_MouseEvent.hwndTrack = m_hWnd;
t_MouseEvent.dwHoverTime = 1;
::_TrackMouseEvent(&t_MouseEvent);
CWnd::OnMouseMove(nFlags, point);
}
*/
void CTaskbarNotifier::OnLButtonUp(UINT nFlags, CPoint point)
{
m_pWndParent->PostMessage(WM_TASKBARNOTIFIERCLICKED,0,0);
CWnd::OnLButtonUp(nFlags, point);
}
/*
LRESULT CTaskbarNotifier::OnMouseHover(WPARAM w, LPARAM l)
{
if (m_bMouseIsOver==FALSE)
{
m_bMouseIsOver=TRUE;
RedrawWindow();
}
return 0;
}
LRESULT CTaskbarNotifier::OnMouseLeave(WPARAM w, LPARAM l)
{
if (m_bMouseIsOver==TRUE)
{
m_bMouseIsOver=FALSE;
RedrawWindow();
}
return 0;
}
BOOL CTaskbarNotifier::OnEraseBkgnd(CDC* pDC)
{
CDC memDC;
CBitmap *pOldBitmap;
BITMAP bm;
memDC.CreateCompatibleDC(pDC);
GetObject(m_biSkinBackground.GetSafeHandle(), sizeof(bm), &bm);
pOldBitmap=memDC.SelectObject(&m_biSkinBackground);
pDC->BitBlt(0,0,bm.bmWidth,bm.bmHeight,&memDC,0,0,SRCCOPY);
memDC.SelectObject(pOldBitmap);
return TRUE;
}
void CTaskbarNotifier::OnPaint()
{
CPaintDC dc(this);
CRect rcClient;
CFont *pOldFont;
char *szBuffer;
if (m_bMouseIsOver)
{
dc.SetTextColor(m_crSelectedTextColor);
pOldFont=dc.SelectObject(&m_mySelectedFont);
}
else
{
dc.SetTextColor(m_crNormalTextColor);
pOldFont=dc.SelectObject(&m_myNormalFont);
}
szBuffer=new char[m_strCaption.GetLength()+10];
strcpy(szBuffer,m_strCaption);
dc.SetBkMode(TRANSPARENT);
rcClient.DeflateRect(10,20,10,20);
dc.DrawText(szBuffer,-1,m_rcText,DT_CENTER | DT_VCENTER | DT_WORDBREAK | DT_END_ELLIPSIS);
delete[] szBuffer;
dc.SelectObject(pOldFont);
}
BOOL CTaskbarNotifier::OnSetCursor(CWnd* pWnd, UINT nHitTest, UINT message)
{
if (nHitTest == HTCLIENT)
{
::SetCursor(m_hCursor);
return TRUE;
}
return CWnd::OnSetCursor(pWnd, nHitTest, message);
}
void CTaskbarNotifier::OnTimer(UINT nIDEvent)
{
switch (nIDEvent)
{
case IDT_APPEARING:
m_nAnimStatus=IDT_APPEARING;
switch(m_nTaskbarPlacement)
{
case TASKBAR_ON_BOTTOM:
if (m_nCurrentPosY>(m_nStartPosY-m_nSkinHeight))
m_nCurrentPosY-=m_nIncrement;
else
{
KillTimer(IDT_APPEARING);
SetTimer(IDT_WAITING,m_dwTimeToLive,NULL);
m_nAnimStatus=IDT_WAITING;
}
break;
case TASKBAR_ON_TOP:
if ((m_nCurrentPosY-m_nStartPosY)<m_nskinheight)
m_ncurrentposy+="m_nIncrement;
" else
="" {
="" killtimer(idt_appearing);
="" settimer(idt_waiting,m_dwtimetolive,null);
="" m_nanimstatus="IDT_WAITING;
" }
="" break;
="" case="" taskbar_on_left:
="" if="" ((m_ncurrentposx-m_nstartposx)<m_nskinwidth)
="" m_ncurrentposx+="m_nIncrement;
" taskbar_on_right:
="" (m_ncurrentposx="">(m_nStartPosX-m_nSkinWidth))
m_nCurrentPosX-=m_nIncrement;
else
{
KillTimer(IDT_APPEARING);
SetTimer(IDT_WAITING,m_dwTimeToLive,NULL);
m_nAnimStatus=IDT_WAITING;
}
break;
}
SetWindowPos(NULL,m_nCurrentPosX,m_nCurrentPosY,m_nSkinWidth,m_nSkinHeight,SWP_NOOWNERZORDER | SWP_NOZORDER | SWP_NOACTIVATE);
//RedrawWindow();
break;
case IDT_WAITING:
KillTimer(IDT_WAITING);
SetTimer(IDT_DISAPPEARING,m_dwDelayBetweenHideEvents,NULL);
break;
case IDT_DISAPPEARING:
m_nAnimStatus=IDT_DISAPPEARING;
switch(m_nTaskbarPlacement)
{
case TASKBAR_ON_BOTTOM:
if (m_nCurrentPosY<m_nstartposy)
m_ncurrentposy+="m_nIncrement;
" else
="" {
="" killtimer(idt_disappearing);
="" hide();
="" }
="" break;
="" case="" taskbar_on_top:
="" if="" (m_ncurrentposy="">m_nStartPosY)
m_nCurrentPosY-=m_nIncrement;
else
{
KillTimer(IDT_DISAPPEARING);
Hide();
}
break;
case TASKBAR_ON_LEFT:
if (m_nCurrentPosX>m_nStartPosX)
m_nCurrentPosX-=m_nIncrement;
else
{
KillTimer(IDT_DISAPPEARING);
Hide();
}
break;
case TASKBAR_ON_RIGHT:
if (m_nCurrentPosX<m_nstartposx)
m_ncurrentposx+="m_nIncrement;
" else
="" {
="" killtimer(idt_disappearing);
="" hide();
="" }
="" break;
="" setwindowpos(null,m_ncurrentposx,m_ncurrentposy,m_nskinwidth,m_nskinheight,swp_noownerzorder="" |="" swp_nozorder="" swp_noactivate);
="" redrawwindow();
="" }
="" cwnd::ontimer(nidevent);
}
*=""
and="" the="" functions="" are:
#define="" export="" extern="" "c"="" __declspec(="" dllexport="" )
#include="" "declare.h"
ctaskbarnotifier="" dialog1;
ctaskbarnotifier*="" dialog="&dialog1;
long" dietime="500;
long" staytime="3000;
long" showtime="500;
export" pchar="" initiate()
{
="" dialog-="">Create(NULL);
return "MSN Style Taskbar Notification PopUp DLL by Tyrant";
}
export void Show(PCHAR caption, int misc)
{
dialog->Show(caption,showTime,stayTime,dieTime,misc);
}
export void setTimeOptions(long comeUp, long stay, long down)
{
int stayTime=stay;
int showTime=comeUp;
int dieTime=down;
}
export void SetSkin(PCHAR file, short red, short green, short blue)
{
dialog->SetSkin(file,red,green,blue);
}
export void SetFont(LPCTSTR font, int size, DWORD normal, DWORD spec)
{
dialog->SetTextFont(font, size,normal,spec);
}
export void TextColor(COLORREF normal,COLORREF not)
{
dialog->SetTextColor(normal,not);
}
export void SetTextArea(long x, long y, long width, long height)
{
dialog->SetTextRect(CRect(x,y,width,height));
}
Thnx in advance for anybody taht helps me.
|
|
|
|
|
Hello,
I dont normally ask stuff like this, but I haven't been able to find an answer anywhere
I'm writing an app in windows(MFC) (I have what I think is at _least_ a basic understanding of writing these things, but windows programming is not my forte)
I'm looking to find mouse coordinates in the client area, an easy task you might think...
But alas, no.
The app has 5 ctrl bars dotted about, 2 of which start docked to the sides, and 1 toolbar/ctrlbar, which starts docked to the top. I can access the ctrl bars and do stuff when buttons are clicked and sliders are slid.
hmmm. lets say its a paint app (NDA's etc :/)
what i want to do is pick a tool from the ctrl bar, which i can do, and draw onto the main white bit of the window(the client area, if im correct).
But, because I've got docked things, ScreentoClient doesnt work the way I'd like it to:
GetCursorPos(&c);
ScreenToClient(AfxGetMainWnd()->m_hWnd, &c);
This doesn't return the cursor relative to the TopLeft of the white bit, but to the point below the menubar, where I assume the windows actual client area starts.
So I supose what I'm asking is how do I get the TL corner of the white area? or even if it has different name, what is it called, so I can at least look for the right thing, clientArea isnt tuning up much for me.
I hope that all made sense to someone at least.
Thanks in advance to anyone who takes the time to look at this.
|
|
|
|
|
Sorted it now, turns out that the white bit was a seperate child window or similar, not too sure. I:m building off of some other code.
But it works now, and thats what matters
|
|
|
|
|
Does anyone know where i could get a copy of it?
my copy of VS doesnt seem to come with it.
|
|
|
|
|
tried google?
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
That question is getting kinda annoying,
if i hadnt tried google first then why i post here first?
http://www.google.com/search?q=windowsx.txt&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8
do you see anything helpful ?
i see a microsoft artical( doesnt provde much info ), and some non-relative links
|
|
|
|
|
www.ticalc.org/archives/files/fileinfo/345/34562.html [^]
Maybe it's this?
I'm sorry if you're getting annoyed,but I'm only trying to help!
I usually find files by searching google on filename + download
Hope this link is what you're looking for.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
no, thats a prog someone wrote for TI-83 Graphing Calc's
although it does have a document name windowsx.txt it was written by the person who wrote the prog and is not the document im looking for
the windowsx.txt file im looking for is a microsoft sdk document with details about Message Crackers
ie. HANDLE_MSG()
|
|
|
|
|
When I use the CSliderCtrl control ,set the style as vertical,
But get the upper position is small and lower position is big,
How can I set as the lower big and upper small?
Thanks!!!
Nothing ,nothing ,I am a leaner.
|
|
|
|
|
hi,
I want to zoom in and zoom out a bitmap.
how can i do this
any sample ,, or help.
thanx
|
|
|
|
|