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
S

Stephen McGeown

@Stephen McGeown
About
Posts
10
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Does anybody know (connect laptop and projector using bluetooth or...)
    S Stephen McGeown

    Hi Joan, I've been looking in to this recently too. I remain skeptical because of the bandwidth involved but there are some products out there that might help you: http://www.canonprojectors.com/lv7210/a_wireless_lan_card.html Cheers, Stephen

    The Lounge algorithms question discussion

  • How do I access my ActiveX array from the outside?
    S Stephen McGeown

    Hi, Supposing I have a 2D array of chars in my ActiveX component, how do I make my array visible to an MFC application inside of which I want to embed the control? I have read about the Get/Set methods - in theory I should be able to return a pointer to the first element in the array to my app but how is this done???? Do I have to convert or map my 2D char array as a VARIANT type and use this in the Get method? If anybody has an example of this kind of thing or detailed advice that would be great. I just can't find an example of this anywhere :sigh: I am using Visual C++ 6.0 to develop my ActiveX control and the MFC app. Cheers, Stephen

    COM c++ question com data-structures tutorial

  • MFC SDI application: opening documents
    S Stephen McGeown

    OK! In your new app, go to the class wizard, select the object ID called "ID_FILE_OPEN". Then click on the COMMAND text in the box marked "Messages". Next, click "Add function" and it'll prompt you to name the function - probably "OnFileOpen". It will generate a member function called OnFileOpen() somewhere in your code, probably as part of your mainframe class. So, you find your OnFileOpen() function, which will be empty except for some comments like "Add your command handler code here". Add some code like this to your OnFileOpen() function: { CString strFilter; CString path; FILE *myfile; CFileDialog MyFileDialog(TRUE, "*.txt", NULL, NULL, "Text file (*.txt)|*.txt" ); /* Display the File Dialog box */ int result = MyFileDialog.DoModal(); /* Return the path (including filename) */ path = MyFileDialog.GetPathName(); /* Open it up */ myfile = fopen(path, "r"); /* etc...*/ } Haven't tested this out but it might be worth a bash. As for your second question, no idea but I've noticed that the behaviour differs between Win9x and Win NT. Hope it helps. Cheers.

    C / C++ / MFC question c++ help

  • CEdit help
    S Stephen McGeown

    Try \r\n instead of \n on its own. Cheers.

    C / C++ / MFC help

  • MFC icons
    S Stephen McGeown

    Thanks Michael. That's me up an running now.

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

  • MFC icons
    S Stephen McGeown

    Hi folks, I hope one of you out there can help me with a small problem. Does anyone know how to override the MFC default icons in my MFC app wizard application that Microsoft kindly provide? It's the small icon that appears at the top left corner of the main window that I want to replace in particular. I even removed them from the resources and replaced them with my own icons, but to no avail. I had a look at the MSDN library help for PreCreateWindow and CREATESTRUCT but there's nothing obvious there. Any suggestions would be great. Cheers, Stephen.

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

  • Simple member function question
    S Stephen McGeown

    Thanks for the help guys, but still no luck. On declaring an instance of the class (in a different sourcefile than the one containing the constructor) as advised, I receive the 'Classname' : undeclared identifier error. I have included the header file containing the class's definition at the top of the sourcefile. Is there something obvious I'm missing? (apart from a brain). In case it helps, I'm using VC++6 and it's an App Wizard generated SDI project. Cheers, Stephen.

    C / C++ / MFC c++ help question

  • Simple member function question
    S Stephen McGeown

    Hi there, Supposing I have two header files called header1.h and header2.h - and I have two sourcefiles called source1.cpp and source2.cpp, which contain the constructors etc for classes declared in the respective header files. Now, I want to call a public member function from source2.cpp that was declared in header1.h. Obviously I can do this OK from source1.cpp but I can't do the same from source2.cpp. I realise this is a basic question but I'm a newbie. Any help (and examples) would be greatly appreciated. I've had a good old hunt around my books and MSDN but can't find a solution. E.g. Header1.h --------- class A { public: void member_function(); } source2.cpp ----------- #include "Header1.h" ... ... void calling_function(void) { // this won't work member_function(); } Thanks in advance!

    C / C++ / MFC c++ help question

  • execl and spawnl problems
    S Stephen McGeown

    Thanks for your help Tomasz. I'm *pretty* sure my include paths are correct. Just wondering whether it makes a difference because it's a *.cpp file, not *.c ? Anyway, the CreateProcess call looks better so I'll give it a bash. Cheers!

    C / C++ / MFC c++ graphics game-dev help

  • How do I change from SDI to MDI?
    S Stephen McGeown

    Hi folks, I created an SDI application using AppWizard but I wish I created an MDI application. Is there any way I can convert it to MDI without re-writing my app? Thanks for your help!:confused: Scotland - it's nice when it's not raining.

    C / C++ / MFC question help
  • Login

  • Don't have an account? Register

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