Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. srfink

    Background color

    SetBkColor is used to set the color behind characters that you paint with functions such as TextOut. You need to create a brush with the color of your choosing and paint the view in OnEraseBkgrnd with something like FillRect. Hope this helps [dazed]
  2. srfink

    TEXT ENCRYPTION

    Hi Cyprus106, Baggiowen did not ask for a routine to validate the password, just to enter it with asterisks to display in place of the characters typed, which I have already answered! [mad]
  3. srfink

    Popup Menu just showing up at the top left corner of the screen

    I have a popup menu that works. It looks like bunny's example. But my popup menu was created with m_fractMenu.CreatePopupMenu(); Maybe your menu is not a popup menu and that is the problem?! [dazed]
  4. srfink

    TEXT ENCRYPTION

    Hi, If you were writing a windows program, than the CEdit control has an edit style called ES_PASSWORD that automatically handles the password protection for you. Otherwise, I believe that you have to do it yourself. You could read chars without echo (using _getch), and echo an asterisk with...
  5. srfink

    Output OS version/Service pack info

    MSDN shows that the GetVersionEx function really takes an OSVERSIONINFO structure, not an OSVERSIONINFOEX structure. VerifyVersionInfo does take the OSVERSIONINFOEX structure, however. Did you look at MSDN's sample : "getting the system version"? Steve [dazed]
  6. srfink

    Detecting Resolution Change

    Hi Matt, Have you seen ON_WM_DEVMODECHANGE and ON_WM_DISPLAYCHANGE? Although ON_WM_DISPLAYCHANGE is nowhere to be found in the Microsoft documentation, the dev mode change handler that you would write does get control when you change the screen resolution in the control panel, because all top...
  7. srfink

    How to display extended ascii chars in dialog?

    Hi, You could create a font with CreateFont, using the GREEK_CHARSET, and then use SetFont. For example, to display the ohm symbol in an edit control in a dialog: m_pFont = new CFont; m_pFont->CreateFont(15, 7, 0, 0, 400, FALSE, FALSE, 0, GREEK_CHARSET...
  8. srfink

    a non understandable debug error

    No. You would get an invalid allocation size debug error message if the argument was negative. [evil]
  9. srfink

    a non understandable debug error

    Hi, Could you show us what is between the new and delete in your code? There is nothing wrong with the new and delete statements. Also, what was the value of m_dlgAsset when the debug error occurred? Steve
  10. srfink

    pass by address and reference

    Hi, When you pass by reference, the compiler generated code is really passing the address of the variable, and automatically dereferencing the pointers for you. However, if you want an example of explicitly passing addresses, just change the function declaration in my example to void...
  11. srfink

    Updating Modeless Dialog's Variables

    Hi, Can you show us what your OnButton function looks like? Steve [ponder]
  12. srfink

    Associating file extensions with programs

    Did you see my solution in the Microsoft C++ forum? Steve [dazed]
  13. srfink

    pass by address and reference

    Hi, The function declaration would be void Money(double nDollarValue, int& nQuarters, int& Dimes, int& Nickels, int& Pennies); The function definition would be written as // Simple straightforward solution void Money(double nDollarValue, int& nQuarters, int& nDimes, int& nNickels, int&...
  14. srfink

    Associating file extensions with programs

    OK. Here's an example of how you could do it programatically: // The following code snippet sets the file program // that is associated with the cnf extension to WORDPAD char szProductType[80]; DWORD dwBufLen; HKEY hTestKey = NULL; LONG lResult = ::RegOpenKeyEx(HKEY_CURRENT_USER...
  15. srfink

    Associating file extensions with programs

    You could set the program that is associated with a particular file extension in the folder options menu item of the windows explorer, if that is what you mean. srfink
  16. srfink

    how do i set the size of menu Items ?

    Hi, You can set the width and height of CMenu items by overriding the OnMeasureItem virtual function. But this function is only called once, when the menu is created. If you want to dynamically change the dimensions of the menu items, you have to delete and recreate the menu. Look at the...
  17. srfink

    CReBarCtrl notification messages

    Hi, It seems that judging from Microsoft's documentation, that the preferred way to go here is to use CRebar instead of CRebarCtrl. Then you access the CRebarCtrl using CReBar::GetReBarCtrl. In this case, Implementing OnNotify in the CMainFrame class works. I have a pending case with...

Part and Inventory Search

Back
Top