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
M

Mike Dunn

@Mike Dunn
About
Posts
133
Topics
17
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • Uwe: Recent change to forums code?
    M Mike Dunn

    hmmm... I'm in Win 2K now (IE 5.5) and the text is the normal size. Strange.

    IT & Infrastructure

  • Uwe: Recent change to forums code?
    M Mike Dunn

    Uwe, did you recently change the font size in the forms? When I browsed here this morning, I found that text for posts is showing up in about 6 point, which is unreadable. :( (Here's a screen shot (6.5K GIF)) This is using IE 5 on 98 SE.

    IT & Infrastructure

  • The US Big Brother
    M Mike Dunn

    Heh :) Unfortunately all of the trouble-makers have already been kicked out, so the web feeds are pretty dull these days. And since the TV show is on at 8 PM, it never shows anything juicy. If it were on really late (like 10 or 10:30) it would be more interesting. *sigh

    The Lounge

  • How to set a directory in CFile
    M Mike Dunn

    When you hard-code a path, you need to escape each backslash, so it would be "C:\\windows\\desktop". As for the save not working, is your desktop directory really C:\windows\desktop ?

    C / C++ / MFC

  • The IBM TV commercials
    M Mike Dunn

    Y'all know those killer IBM commercials with Avery Brooks, right? Does anyone have audio/video recordings of them? I found a WAV of the commercial that includes the awesome line, "How many Libraries of Congress per second can your software handle?" but I want more!! :) I especially want the commercial where Avery talks about flying cars, since I've only ever seen it once and it had me ROTF.

    The Lounge

  • Multiple doc templates problem
    M Mike Dunn

    You should override CWinApp::OnFileNew(). MFC technical note 22 has a little bit about this.

    C / C++ / MFC

  • disable resize
    M Mike Dunn

    Handle the WM_GETMINMAXINFO message. This message passes you a struct, and you can just fill in the min size and max size with the same values, so the window will remain the same size. The mouse will still change to the resizing-arrow cursor when you move it over the window border, so to fix that, handle WM_NCHITTEST and if the cursor is over the resizing border, return HTNOWHERE from the message.

    C / C++ / MFC

  • Control Panel.....
    M Mike Dunn

    There are articles here that describe how to do it. CPL++ v1.1 - Control Panel Applets Control Panel Applet Framework by Len Holgate

    C / C++ / MFC

  • **** File Open & Save DIALOG BOX *******
    M Mike Dunn

    Read up on the GetOpenFileName() and GetSaveFileName() APIs. If you're using MFC, look at CFileDialog.

    C / C++ / MFC

  • Mouse Button Detection
    M Mike Dunn

    Where did you get the info that the OS always returns 2 buttons? Both GetNumberOfConsoleMouseButtons() and GetSystemMetrics() return 5 for my IM Explorer me on 2K.

    C / C++ / MFC

  • What MFC dlls to distribute?
    M Mike Dunn

    Run the Dependency Viewer on your EXE to find out which DLLs it uses.

    C / C++ / MFC

  • Setting focus to a control
    M Mike Dunn

    Two ways: 1. GotoDlgCtrl ( GetDlgItem ( IDC_MY_EDITBOX )); 2. GetDlgItem ( IDC_MY_EDITBOX )->SetFocus();

    C / C++ / MFC

  • Automatic mouse and keyboard
    M Mike Dunn

    A starting point is to look up the docs on these APIs: keybd_event, mouse_event, SendInput.

    Article Writing

  • I reproduced that bug that creates multiple posts!
    M Mike Dunn

    Chris/Uwe, I don't know if you've been looking into this bug at all, but I just reproduced it. The steps are simple: 1. Click the Reply link on a post. 2. Hit the Back button in the browser. 3. Click the same Reply link. 4. Enter a post normally. Two copies of the post will be created.

    Site Bugs / Suggestions

  • Feature suggestion for boards
    M Mike Dunn

    Chris/Uwe, I had an idea for a feature. At the top of the page where it lists the forums, it'd be nice to have the number of unread posts listed there too. That way, after I've read all 20 or so posts in the VC++ forum, I can just look up at the top of the page to see if anything got posted to the other forums in the meantime. So, instead of this: ASP/DHTML | Code Requests | General Discussions | (etc...) it might look like this: ASP/DHTML | Code Requests(1) | General Discussions(3) | (etc...)

    Site Bugs / Suggestions

  • postfix operator problem
    M Mike Dunn

    Well, the correct answer is 0. The assignment reduces to: j = j++; Since j++ evaluates to 0, 0 gets stuffed in j. This is really bad programming practice, though. I hope you don't plan on writing production code this way. ;)

    C / C++ / MFC

  • typedef struct (?)
    M Mike Dunn

    I don't understand what rtn = StrData.String1(0) means exactly. What is the (0) there for? "String1" isn't an array. Anyway, to make a typedef'd struct:

    typedef struct
    {
    CString String1, String2;
    } StrData;

    To make an array of those, you can use a linked list (since it sounds like you don't know exactly how many structs you'll have). Use std::list<StrData> in STL, or CList<StrData, StrData&> in MFC.

    C / C++ / MFC

  • How: Get all the filenames from Open Dialog
    M Mike Dunn

    The lpstrFile member of your OPENFILENAME struct points to a double-null-terminated list of the files. For example: c:\foo\bar.exe\0c:\foo\bleat.exe\0\0

    C / C++ / MFC

  • missing NAFXCWD.LIB
    M Mike Dunn

    That's one of the MFC statically-linked libs. Just grab it off your VC CD and copy it to VC98\MFC\LIB.

    C / C++ / MFC
  • Login

  • Don't have an account? Register

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