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
K

kochhar

@kochhar
About
Posts
12
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • rand ( )
    K kochhar

    They both work fine for me (Win/XP, Vstudio v6). What compiler/system are you using?

    C / C++ / MFC question help tutorial

  • How to open random files?
    K kochhar

    OK, here's what you need to do: (1) Somewhere near the start of your program, seed the random number generator using time of day. This ensures that you don't get the same numbers every time: srand((unsigned)time(NULL)); (2) Then, every time you need a random number (betrween 0 and iN) ifile=(rand() % (unsigned)(iN)); That should do it.

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

  • connected to the network ????????
    K kochhar

    I've been using the following function with success. It returns TRUE if a connection is available, and takes less than a sec in either case: BOOL Online() { DWORD dwState = 0; DWORD dwSize = sizeof(DWORD); return InternetQueryOption(NULL, INTERNET_OPTION_CONNECTED_STATE, &dwState, &dwSize) && (dwState & INTERNET_STATE_CONNECTED); } Credit: I got this from Paul Dilascia's column in MSDN mag a while back.

    C / C++ / MFC c++ sysadmin question

  • How to open random files?
    K kochhar

    (1) Read all song (file) names into an array (say N items) (2) Pick a random number between 1 and N and use that entry from your array.

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

  • How to play a specific buffer,not a file?
    K kochhar

    The functions you need are: waveOutOpen() waveOutPrepareHeader() waveOutWrite() waveOutClose()

    C / C++ / MFC tutorial question

  • Thread Programming & Matlab
    K kochhar

    Try replacing: AfxBeginThread(THREADD1,NULL); with: AfxBeginThread(THREADD1,NULL,0,0,0,NULL);

    C / C++ / MFC c++ question

  • Beginer Visual C++ Tutorials
    K kochhar

    Here are a couple of places to start: http://www.codeproject.com/script/articles/beginners.asp http://www.planet-source-code.com/vb/Tutorial/Default.asp?lngWId=3 http://devcentral.iftech.com/articles/MFC/default.php Good luck.

    C / C++ / MFC c++ game-dev announcement

  • drive information
    K kochhar

    If, by drive, you mean a disk partition, then you can use GetDiskFreeSpace or GetDiskFreeSpaceEx, or just get my routine GET_DISK_SPACE from: http://www.neurophys.wisc.edu/ravi/software/diskspace/

    C / C++ / MFC

  • tolerance :o)
    K kochhar

    Sure, you can try something like: bool equal(double val) { if(fabs(val) < 0.00000000001) return true; else return false; }

    C / C++ / MFC question

  • Background color of Dialog
    K kochhar

    One way is to override OnCtlColor(), as follows: (1) In your message map, add: ON_WM_CTLCOLOR() (2) Then, add the following function to your Dialog class: (replace CMyDialog with whatever is the proper name in your case) HBRUSH CMyDialog::OnCtlColor(CDC *pDC,CWnd *pWnd,UINT nCtlColor) { HBRUSH hbr = CDialog::OnCtlColor(pDC,pWnd,nCtlColor); if(nCtlColor == CTLCOLOR_DLG) { // Dialog background color (Blue) hbr = CreateSolidBrush(RGB(0,0,255)); return hbr; } return hbr; } You can use this method to change the color of pretty much any element of your dialog.

    C / C++ / MFC question

  • error C2065: 'GET_X_LPARAM' : undeclared identifier
    K kochhar

    Did you remember to include: #define GET_X_LPARAM(lp) ((int)(short)LOWORD(lp)) #define GET_Y_LPARAM(lp) ((int)(short)HIWORD(lp)) in your file?

    C / C++ / MFC com help question

  • Help with .EXE file
    K kochhar

    You can't see the actual code, just the machine language binary numbers put out by the compiler/assembler/linker. To get a better understanding of what's inside an exe file, see the following article by Matt Pietrek: http://msdn.microsoft.com/msdnmag/issues/02/02/PE/default.aspx http://msdn.microsoft.com/msdnmag/issues/02/03/PE2/default.aspx

    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