Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
B

Bryan Anslow

@Bryan Anslow
About
Posts
25
Topics
15
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Anyone done any Web Scraping in C++/MFC
    B Bryan Anslow

    Hey, that works well, thanks for pointing me at that function. My minor hurdle right now is that I need to login with my userid and password to access one of the pages. Don't suppose that there is some way of getting my credentials in there somehow? Thanks, Bryan.

    C / C++ / MFC c++ tutorial question

  • Anyone done any Web Scraping in C++/MFC
    B Bryan Anslow

    Hi, I currently get data from a website like this; Go to the webpage, wait while the page loads, "select" the data in the webpage by dragging my mouse over it, Copy to clipboard, call up my text editor, Paste the data into the editor, save the output, analyze the data using my C++/MFC Analyzer. There must be a way I can get the data without the need to copy/paste etc. I know something about HTTP Connections, sockets, etc., but I am at a loss to know just what parameters need to be passed to the website in the request. I tried just sending the URL of the webpage, which returned a lot of stuff which I did not want. Does anyone have a simple example of how this is supposed to work? Thanks so much, Bryan.

    C / C++ / MFC c++ tutorial question

  • MS Word Automation - I get so far - now what?
    B Bryan Anslow

    Hi, I am trying to rewrite an old VC++ wrapper class around MS Word Automation - it used to use *.tli and *.tlh files, but now MS recommends just using the *.h files which get generated. So, that is another level of complexity. So, I got so far, now I am wondering what to do next. Here are some code snips, the real code obviously has error correction etc., so here is what I have so far;

    IDispatch *pWordInst;
    CApplication *pWordApp;
    CDocument0 *pDoc;
    IUnknown *pUnknown;

    HRESULT res = CoInitialize(NULL);

    CLSID clsid;
    HRESULT hr = CLSIDFromProgID(L"Word.Application", &clsid);

    hr = CoCreateInstance(clsid, NULL, CLSCTX_LOCAL_SERVER, IID_IDispatch, (void **)&pWordInst);

    pUnknown = NULL;
    REFIID iid2 = __uuidof(IUnknown);

    hr = pWordInst->QueryInterface(iid2, (void **)&pUnknown);

    So, now I need to get the Application and Document objects (assuming that this code creates a new document as it used to). I am guessing I need a getApplication() but what MS class do I use for that? Once I have the Application, then I can get the Document, presumably with a get_Documents() or get_ActiveDocument()?. After that I guess it will run like my older version used to. Any help and advice would be great. Many Thanks, Bryan.

    C / C++ / MFC help c++ algorithms testing tools

  • #imports for MS Office2013
    B Bryan Anslow

    Hi Sujay, Thanks for your invaluable information. Interestingly, this link http://blogs.msdn.com/b/vsod/archive/2013/06/05/office-automation-through-vc-using-mfc-class-from-typelib-results-into-large-number-of-compilation-errors.aspx has a somewhat different approach. So basically, we do no imports and just use the generated *.h files. I am in the middle of trying it, but will not be able to do more until next week. Bryan.

    C / C++ / MFC question announcement

  • #imports for MS Office2013
    B Bryan Anslow

    Hi Sujayg, I am trying to create a *.lib file to wrap some of the Word Automation Functions. So, tell me if I got this all wrong... I created a Win32 project, selecting MFC and Static Library. I used Add Class -> MFC Class From Typelib and selected File and used C:\\Program Files\\Microsoft Office\\Office15\\MSWORD.OLB As I did not know which classes I would need, I just selected them all. So it generated a lot of Class Header files. I selected a few Header files for the classes I needed and added #includes for them. The build created the msword.tlh file etc. It also gave me over 100 errors, all due to missing items in the msword.tlh file. In the Add Class step, should I just be selecting the MSWord classes I need, and not just all of them? Or have I got this whole thing wrong? It worked OK back in the days of Office 97 and 2000. BTW, at this stage learning C# is not really an option. Thanks, Bryan.

    C / C++ / MFC question announcement

  • #imports for MS Office2013
    B Bryan Anslow

    Hi All, I have a wrapper class for the MS Office Products, last time I built it was way back for Office 2000. I had a set of #imports for that version, but looking in the various directories seem to have changed a bit. This is what I currently use, has anyone got an updated list for MS Office 2013? Thanks,

    #import "C:\Program Files\Microsoft Office\Office\MSO9.DLL"
    #import "C:\Program Files\Common Files\Microsoft Shared\VBA\VBA6\VBE6EXT.OLB"
    #import "C:\Program Files\Microsoft Office\Office\MSWORD9.OLB" rename("ExitWindows","_ExitWindows")
    //#import "C:\Program Files\Microsoft Office\Office\EXCEL9.OLB" rename("DialogBox","_DialogBox") \
    // rename("RGB","_RGB") \
    // exclude("IFont","IPicture")
    //#import "C:\Program Files\Common Files\Microsoft Shared\DAO\DAO360.DLL" rename("EOF","EndOfFile")\
    // rename("BOF","BegOfFile")
    //#import "C:\Program Files\Microsoft Office\Office\MSACC9.OLB"

    C / C++ / MFC question announcement

  • CWinApp::GetProfileString() creates keys...
    B Bryan Anslow

    Thanks, but...I decided to keep the CWinapp functions as-is. I just check after the GetProfileString() and if the key has a dummy value, I just delete it. Works for me.

    C / C++ / MFC question

  • CWinApp::GetProfileString() creates keys...
    B Bryan Anslow

    Hi, if I call CWinApp::GetProfileString() for a key that does not exist, it creates one for me. This is not what I want. Is there any way to stop this key from being created? BTW, I read Stuart Konens CRegistry class article, but cannot use that as third party code is not allowed in my current project. Thanks, Bryan.

    C / C++ / MFC question

  • How to get Jpeg Properties from a jpg file?
    B Bryan Anslow

    Hey, thanks for that Guys, that really gave me the start that I needed, got it half coded already.... Thanks Again, Bryan

    C / C++ / MFC c++ question tutorial

  • How to get Jpeg Properties from a jpg file?
    B Bryan Anslow

    I have a simple (I hope) question. I have a disk full of jpg images and just want to pull the jpeg attributes from the file, resolution, etc. The current program, in C++/MFC, looks for duplicate files, and I want to add a pop-up with jpeg info. I looked at the ImageFormat class and also jpegLib, but they seem more concerned with manipulating the image data itself, rather than the attributes. If anyone can suggest a starting point that would be great. Also, if anyone knows of anything to pull the EXIF properties from the file, that would be just excellent. Thanks in advance, Bryan.

    C / C++ / MFC c++ question tutorial

  • Visual Studio 2010 and old Addins
    B Bryan Anslow

    Hi, I hope this is the correct place to post this, I could not find anywhere more suitable. I just started using Visual Studio 2010, and I thought that some of my old addins from previous versions might be useful to me. The ones I want generally do things outside of VS, so the bulk of the code should be OK. Problem is, I have come up against the #includes for header files in the older VS ObjModel/ directory, and also it is full of 'I' prefixed things, like IApplication, IConfiguration, ITextDocument, etc... which obviously do not exist in the VS 2010 world. Is there any Tutorial that explains how to update these addins to a later release, like Visual Studio 2010? I guess that many of you have had to go through this process at some time. Many thanks for any help. Bryan.

    COM visual-studio help tutorial announcement csharp

  • How to find if a Directory is Indexed?
    B Bryan Anslow

    Hi Alan, looks like there is a bit more to this Indexing Service than just getting an attribute bit... It seems to me that the FILE_ATTRIBUTE_NOT_CONTENT_INDEXED is saying that the associated file is to be excluded from Indexing, so is not too useful for my purposes. I have been looking at the OLE DB Provider and its interaction with the Indexing Service, but this "simple" project is not going to be as easy as I had hoped. So I will leave this one on the back-burner for now. Thanks, Bryan.

    C / C++ / MFC csharp visual-studio tutorial question

  • How to find if a Directory is Indexed?
    B Bryan Anslow

    Hi, I have a simple program that uses WIN32_FIND_DATA with the usual GetFirstFile() GetNextFile() etc. What I need to be able to do is find out if the directories I pass through are Indexed or not. I cannot see an Indexed Attribute in WIN32_FIND_DATA, so that it obviously not the place to look. Also, is there some way to programmatically set a Directory as Indexed? Visual Studio 2008, Vista 64 Bit. Thanks for any advice, Bryan.

    modified on Sunday, February 21, 2010 4:10 PM

    C / C++ / MFC csharp visual-studio tutorial question

  • Can I write a Client to navigate web pages?
    B Bryan Anslow

    Well, that has given me something to look at - and a few new ideas... Thanks, Bryan.

    Web Development c++ csharp java visual-studio tools

  • Can I write a Client to navigate web pages?
    B Bryan Anslow

    Hi, I have been using Visual C++ since v1.5, and now have Visual Studio 2003 and Beta2 of 2005. Also, I have a broad use of Java,,,so no problem in using the tools. Now is my first look at programmatic Web navigation. What I want to know is, can I write a Client (preferably in C/C++ with/without MFC, or Java) that can navigate Web pages, and enter things like a UserID/Password on a page, then navigate to the required page after the login is OK, navigate on from that (like clicking an option on the page) to a dynamically created page, and retrieve data from it. If there are any examples out there to get me started that would be a bonus too. Many Thanks, Bryan.

    Web Development c++ csharp java visual-studio tools

  • MCI Commands and AVI Video files; help needed...
    B Bryan Anslow

    OK, I didn't have a dvds codec installed on my development machine. Just installed a frre one and all is well now. Bryan.

    C / C++ / MFC csharp help visual-studio tutorial question

  • MCI Commands and AVI Video files; help needed...
    B Bryan Anslow

    Hi, I am trying to put together a Video Clip organizer for all of my captured AVI file clips. I need to be able to get it to play the clip so that I can see what it was in order to catalog it, so I went for the "simplest" method using MCIWndCreate() and MCIWndPlay() etc... Unfortunately when I try this, I get a message; "Video not available: Cannot find 'vids:dvsd' decompressor." But if I just click the clip in explorer, it plays OK in Windows Media Player (v10).... I am using Visual Studio.net 2003 on WinXP Professional. At the same time I am using some AVIFile functions within the program to access various stream information from the file; if this is relevant in any way. Anyone have any idea why this is happenning, and how to fix it, or is there a better way to get the clip to play? Thanks, Bryan.

    C / C++ / MFC csharp help visual-studio tutorial question

  • NMAKE, Implicit Rules and unknown file types
    B Bryan Anslow

    Using NMAKE (the VC++6 version) and a makefile, I can easily write implcit rules to compile *.c *.cpp and *.asm files. However, if I write an implicit rule to compile an *.a39 file, I always get an error; NMAKE : fatal error U1073: don't know how to make 'D:\v400\bld\obj\testprg.o' It seems that if it is not a "normal" filetype then NMAKE will not find it. Is there any way around this (apart from renaming my files)? Thanks, Bryan.

    C / C++ / MFC c++ help tutorial question announcement

  • MCI CD Audio Mount and Eject?
    B Bryan Anslow

    Thanks Tomasz, I use mciSendCommand() everywhere in this prog, so I found this worked; mciSendCommand(_mciDevice, // Eject the CD MCI_SET, MCI_SET_DOOR_OPEN, (DWORD)(LPVOID)&mciSet); also, for finding out when a CD is inserted, I just added a line to my mainframe module (it's an MFC App)like; ON_WM_DEVICECHANGE() and the OnDeviceChange() function can find which device etc., by examining the passed parm, Bryan.

    C / C++ / MFC question

  • MCI CD Audio Mount and Eject?
    B Bryan Anslow

    Hi, I have an MCI application that reads/catalogs audio CD's using the CDDB Interface. There are two things I would like to get it to do that it currently does not; 1) Recognise that a CD has been loaded into the drive, so that I do not need to have a menu item to add a new CD. 2) Eject the drive after the information has been cataloged. I know that for 2) there are a couple of KB Articles, Q165721 and Q168180, but I would like a simpler, more universal method, if possible. Many Thanks in advance for any info. Bryan Anslow.

    C / C++ / MFC question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups