Aha! Didn't know that just not adding a handler would cause it to draw disabled. Thanks much for the help. - Matt
MattyBee
Posts
-
Buttons on a DialogBar -
Buttons on a DialogBarHi all. I have a DialogBar which I've added to my SDI application. I create the Dialog resource with some text areas and buttons in Resource View and add it to the application, docked at the bottom. All is well. However, the buttons are grayed out as though they're disabled. I can get a handle to the CButton at runtime and it does indeed think its enabeled. Checkboxes, radio buttons, list boxes, etc. all seem to work without looking disabled. What's the deal? Code that adds the dialog bar, in CMainFrame::OnCreate : if (!m_wndTransBar.Create(this, IDD_TRANS_BAR, CBRS_BOTTOM, IDD_TRANS_BAR)) { TRACE0("Failed to create translation bar\n") ; return -1 ; }
-
URLDownloadToFile is making me madThat's right, 0x800401e4 is MK_E_SYNTAX. MSDN describes this error for a different URL Moniker function (they don't even list it as a return value for URLDownloadToFile) and it says: A moniker could not be created because szURL does not correspond to valid URL syntax for a full or partial URL. This is uncommon, because most parsing of the URL occurs during binding and because the syntax for URLs is extremely flexible. So what's going on? I can't believe that I just can't use URLDownloadToFile at all in my application because it just doesn't download certain pages... Also I don't think the problem has to do with a bad header to www.google.com because I can get a response from the google server via telnet by just sending a request line and a "Host" header... They don't seem strangely picky about requiring headers.
-
URLDownloadToFile is making me madHi there. Here's a pretty simple program: void main(void) { HRESULT hr = URLDownloadToFile(NULL, "http://www.google.com", "c:\\output.htm", 0, NULL) ; if (SUCCEEDED(hr)) { printf("success\n") ; } else { printf("failed\n") ; } } For some reason the URLDownloadToFile call fails. If I put any of a host of other urls in the call the download works perfectly, however, for www.google.com and several other pages (www.yahoo.es for one) the function just refuses to work. I'm completely baffled by this. I can't find any commonality between the pages that fail and I know that www.google.com does indeed exist on the internet. Has anyone else had problems using the URLDownloadToFile function? Thanks