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

MVH

@MVH
About
Posts
20
Topics
6
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • hi...
    M MVH

    DId I understand you correctly, you want to convert hex E302 to a long-integer value? (coz that's what wcstol does) wcstol input syntax is [whitespace] [{+ | ?}] [0 [{ x | X }]] [digits] You need to give the "E302" string to the function as "0xE302". ------------------------------------------ Experience is the name every one gives to their istakes. -Oscar Wilde Experience is one thing you can't get for nothing. - Oscar Wilde

    C / C++ / MFC c++ help

  • Get pointer to document in a SDI from everywhere?
    M MVH

    Uhm... would this be of any help? CYourApp* theApp; theApp = (CYourApp*)AfxGetApp(); CYourView* pView = (CYourView*) ((CFrameWnd*) theApp->m_pMainWnd)->GetActiveView(); CYourDoc* pDoc = pView->GetDocument(); First get a pointer to the application, then with that a pointer to the active view, and through the view pointer to the document. Or did you say the cleanest possible way? ;) ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    C / C++ / MFC question

  • How to capture Enter key in a dialog?
    M MVH

    I forgot to check the dialog template in resource editor X| I just changed "Default button" propoerty from OK to "Insert" button. ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    C / C++ / MFC help tutorial question

  • How to capture Enter key in a dialog?
    M MVH

    My problem is a simple one: I have a dialog box. A simple one, just two lines to fill. If I press enter/return, by default dialog closes as if I have pressed ok. I would like to capture the keyboard, and make my dialog move onto next items when enter is pressed. I tried the following, no success: void CEditDlg::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) { AfxMessageBox("KEYUP"); CDialog::OnKeyUp(nChar, nRepCnt, nFlags); } void CEditDlg::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) { AfxMessageBox("CHAR"); CDialog::OnChar(nChar, nRepCnt, nFlags); } ------------------------------------------ Experience is the name every one gives to their mistakes. - Oscar Wilde Experience is one thing you can't get for nothing. - Oscar Wilde

    C / C++ / MFC help tutorial question

  • Getting printer colour settings
    M MVH

    Take a look at this, might help: PRINTER_INFO_2 has a pointer to DEVMODE structure. In DEVMODE is dmFields, value DM_COLOR is what you are looking for? You can find more info about the structures from MSDN, or ask. I'm currently working on PRINTER_INFO_* and DRIVER_INFO_*. ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    C / C++ / MFC question

  • How to get the printer port name á la "NE01:"?
    M MVH

    ..and so I digged the registry. ;) (just talking to myself) ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    C / C++ / MFC sysadmin windows-admin tools help tutorial

  • formatting output (CString .Format...)
    M MVH

    Ok, try %09.4 That one works, I tested it. 0 is flag telling to fill the minimum length with zeroes, 9 is the length, 4 is the precision (in case someone wonders about that). ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    C / C++ / MFC question help

  • formatting output (CString .Format...)
    M MVH

    From the top of my hat... Add some zeroes: statstring.Format(" AB: %04.4lfmm - CD: %04.4lfmm - EF: %04.4lfmm - GH: %04.4lfmm",CAB,CCD,CEF,CGH); I didn't try whether it works. ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    C / C++ / MFC question help

  • How to get the printer port name á la "NE01:"?
    M MVH

    I am trying to make a little utility, that will delete from workstations an old network printer connection, add new one and set it as the default printer. I am using NT4.0. To be able to set the default printer, I need to know the port name. When I use PRINTER_INFO_2, I get the IP-address like "123.32.12.89:XJPRINT". I got the same using PORT_INFO. I would need to know the "weird" NExx: port name. Like currently my default printer is in port NE04. I can find in the registry a list of my printers (e.g. \\SERVER01\HP4100 -> "winspool,Ne04:,15,45"), but is there an another way to get that "Ne04" information?? Ps. Whatta heck is that NExx: for??? :wtf: Compatibility issue with older windows versions? ------------------------------------------ Experience is the name every one gives to their mistakes. -- Oscar Wilde Experience is one thing you can't get for nothing. -- Oscar Wilde

    C / C++ / MFC sysadmin windows-admin tools help tutorial

  • NEWBIE: how to iniate dialog after application window is shown?
    M MVH

    ...aaand perfectly it did the job!

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

  • NEWBIE: how to iniate dialog after application window is shown?
    M MVH

    This looks like exactly what I need! Thanks!:) (I can't test it in action until Monday, but I am sure it will work.)

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

  • NEWBIE: how to iniate dialog after application window is shown?
    M MVH

    Yes, I want to show a dialog *after* showing the application window. All solutions I have tried will show the dialog before painting the application window. Err.. I am not sure what you mean with "what kind of pointer do you have in CView derived class". The only flaw in my application (that I know of ;) ) is that the dialog should be iniated automatically instead of having to iniate it from menu. The menu item is handled in CView derived class (CMyView), in OnFileSelectserver() function. That function has calls to CDocument derived class (CMyDocument). So I need to be able to call CMyView::OnFileSelectserver() from inside CWinApp based class (CMyApp), in InitInstance(). How to do that? Putting the CMyView::OnFileSelectserver() in CMyView::OnInitialUpdate() causes the dialog to be shown first, then a pause as the program gathers data and only after that the application is shown. Doing that skips the progress bar and gives the impression that nothing is happening. That's the problem. First application window, THEN dialog.

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

  • NEWBIE: how to iniate dialog after application window is shown?
    M MVH

    I'm using MSVC++6, and I have a normal Doc/view application. I have an item in the File menu, which iniates a dialog. How can I initiate the dialog automatically when the application is started, _after_ the application window is fully visible? I have placed a call to the function in more places than I want to think about, and I always get the dialog _before_ the application window is drawn. I'm just so tired of that, so tired... ;P

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

  • How to get the caller of a fuction?
    M MVH

    How 'bout just passing the caller as a string argument? Getting the calling function's name as a string is way beyond my knowledge ;)

    C / C++ / MFC tutorial question

  • Runtime Error??
    M MVH

    Hi! I've two identical machines (NT4.0, same IE, SP6a). I got a program that works in one machine, but the other one gives a messagebox "Microsoft Visual C++ Runtime Library", "Runtime Error!", the name of the program crashing and "abnormal program termination. The machines are supposed to be totally identical basic installation (except the other one has more programs installed on it). What files should I check to have the same versions?? What is causing that? Comctl32 is the same, so is MSVCRT.DLL.

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

  • different CView derived views on same document
    M MVH

    Do I need to use CMultiDocTemplate in CApp::InitInstance? Is that what I should read about or do I risk learning something for nothing? ;)

    C / C++ / MFC question c++ graphics

  • different CView derived views on same document
    M MVH

    I have a MFC MDI program, where I want to have in their own MDIchildframe windows both CScrollView based view and CListView based view. (Data neatly in CListView window, graphics in CScrollView window) How can I accomplish that? :confused: TIA -Marko

    C / C++ / MFC question c++ graphics

  • newbie question
    M MVH

    Yes, that would be the best solution. I already catch the Menu command in CView class object, I'll just pass the CView pointer to my own class (I get the pointer to my own class object from pDoc), and then I can use the Invalidate() inside my own class. I seem to always try to cut down the number of passed parameters and look for other ways of getting the needed information (usually pointers).

    C / C++ / MFC question architecture help announcement

  • newbie question
    M MVH

    How can I get a pointer to CWnd object to be able to use Invalidate? Invalidate is a member of CWnd, while my loop runs in CMyClass (which is a member variable of CMyAppDoc). From MS VC++6 help: CWnd::Invalidate void Invalidate( BOOL bErase = TRUE ); - - - - - I could rephrase the question: How to cause screen update from a loop inside my own class?

    C / C++ / MFC question architecture help announcement

  • newbie question
    M MVH

    I'm building a program, and I have this problem: - I got CDocument/CView architecture - In CMyAppDoc is CMyClass object - In CMyClass object is a function SolveProblem() - In SolveProblem is a loop that is working on a certain problem How can I from _inside that loop_ update the screen? That way I could see the progress. Two threads? How? I put SolveProblem work in another, and then...? Just kick me in the right direction, no need to kick me all the way ;)

    C / C++ / MFC question architecture help announcement
  • Login

  • Don't have an account? Register

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