not too sure about the WebBrowser activex control, but if you're using CWindow or it's classes, the following can help... Insert a message handler as follows MESSAGE_HANDLER(WM_ERASEBKGND, OnEraseBackground)
then implement the handler... LRESULT OnEraseBackground(UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { return 1; }
Ryan
rbeckett
Posts
-
CAxWindow flicker in a DHTML control? -
Statusbars in dialog based applicationSometimes it's easier to use the Win32 api... eg.
LRESULT OnCreate(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL& bHandled) { hSTMode = ::CreateWindowEx(0L, STATUSCLASSNAME, _T("Full Auto"), WS_CHILD, 0, 0, 0, 0, m_hWnd, (HMENU)IDC_MODE_DISPLAY, _Module.GetResourceInstance(), NULL); }
where hSTMode is an HWND and m_hWnd is the parent window (eg. CWindow) This will create the window if you have a corresponding message handler. You then need to send SB_SETPARTS to hSTMode which will fill in the window with rects and stuff. See the MSDN documentation under common controls for an example. Ryan -
Controlling the MediaPlayer ocx controlThe Windows Media Player SDK has an example of this called "WMPML" which can be downloaded with the SDK at www.windowsmedia.com It implements a big CAxDialog, but it doesn't compile! I haven't bothered trying to fix it, but it's probably what you're looking for. Ryan
-
Atl Server - CBlobCacheStupid Me... This code is correct, I just messed up the request handling part. Well, now if anyone wants to know how to write an int to CBlobCache, they can use this snippet... Ryan
-
Atl Server - CBlobCacheI'm having difficulty using ATL Server's CBlobCache class. I'm trying to add an entry to the blob cache. The key is "v1" and the value is an int. The add method takes a *void for the actual data, so I figured I could push an int into it. Unfortunately, the mout int reads 6,500,000 . Is it a problem with my implementation of m_spBlobCache->Add or m_spBlobCache->GetData ? HCACHEITEM hEntry; // Get the IMemoryCache service from the ISAPI extension if (FAILED(m_spServiceProvider->QueryService(__uuidof(IMemoryCache), &m_spBlobCache))) return HTTP_FAIL; HRESULT hr = m_spBlobCache->LookupEntry("v1", &hEntry); if (FAILED(hr) || !hEntry) { static const int s7 = 1; int *pData = (int *)malloc(sizeof(int)); if (!pData) return HTTP_FAIL; *pData = s7; CFileTime ft = CFileTime::GetCurrentTime() + CFileTime::Minute; if(FAILED(m_spBlobCache->Add("v1", pData, (DWORD)sizeof(int), &ft, m_hInstHandler, &hEntry, &g_MemoryCacheClient))) { m_spBlobCache->ReleaseEntry(hEntry); return HTTP_FAIL; } } if(FAILED(m_spBlobCache->GetData(hEntry, (void**)&mout, &dwSize))) { m_spBlobCache->ReleaseEntry(hEntry); return HTTP_FAIL; } TIA Ryan
-
Network PacketsYou have the Welchia virus. My ISP cut me off because I was sending out huge amounts of packets also. Go to symantec's website and download the fixWelchia program (free). MS's update didn't seem to catch this one... Another solution is to shut down all RPC services... Ryan
-
ViewSonic OfferI will buy VS.NET 2003 from CP if I can have a shot at one of the 25,000 v37's so please let us know! Thanks RB
-
Media Player Interface...For eager web-site developers, there's this program which I wrote to let others know what I'm listening to. You need Windows Media Player 9 and a web and/or ftp server... http://www.wmplugins.com/ItemDetail.aspx?ItemID=179 :rose:
-
CRegKey QueryStringValueThanks, Ryan
-
CRegKey QueryStringValueI'm having difficulty using this method, specifically... lResult = reg.QueryStringValue("PathOut", regtext, sizeof(regtext)); It would be nice to see some examples using this CRegKey method or something. I can't seem to nail down the third parameter... "The size, in TCHARs, of the buffer pointed to by pszValue. When the method returns, pnChars contains the size, in TCHARs, of the string retrieved, including a terminating null character." TIA Ryan