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
_

_Theo_

@_Theo_
About
Posts
20
Topics
3
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • network data security
    _ _Theo_

    Hi I want to secure the network data wich is send between a client and server. What's the best method to accomplish this? Like encryption algorithm, key exchanging etc. Thanks!

    C / C++ / MFC sysadmin security algorithms question

  • Copying folders to another device
    _ _Theo_

    Use the SHFileOperation function for easy copying.

    C / C++ / MFC question c++

  • Hook problem
    _ _Theo_

    Hi I'm using hooks to subclass menus so I can draw them myself. This works pretty good on Windows XP, but on 98 and 2000 it only seems to work once. When I have two different programs using the new style menus I can start up one of them over and over again without problems. But as soon as I click on a menu in another app using the menus it crashes. It only happens with a menu attached to a window. When using TrackPopupMenu it always seems to work. Any suggestions? Thanks

    C / C++ / MFC help question

  • MPEG-1 length how?
    _ _Theo_

    Here's some header info for the MPEG file format which should help you: 1-4 byte Sequence header In Hex 000001B3 12 bits Horizontal size In pixels 12 bits Vertical size In pixels 4 bits Pel aspect ratio 18 bits Picture rate Mind the difference between bits and bytes here. Only the sequence header is four whole bytes, the rest are all a certain amount of bits. The picture rate stands for a certain frame rate: 1 = 23.976 frames/sec 2 = 24 3 = 25 4 = 29.97 5 = 30 6 = 50 7 = 59.94 8 = 60

    C / C++ / MFC question com graphics game-dev tools

  • Ownerdraw menus and SetWindowsHookEx
    _ _Theo_

    Hi I'm having some problems with using the SetWindowsHookEx function to intercept menu messages so I can draw the menu border myself when necessary. I've taken a look at sources of other ownerdraw menus already, but I'm still having problems. Could someone please explain me the procedure for setting up appropriate hooks so that I end up with menu message calls like WM_NCPAINT etc. Thanks in advance.

    C / C++ / MFC

  • size from HBITMAP
    _ _Theo_

    Use GetBitmapDimensionEx to get the dimensions of the bitmap.

    C / C++ / MFC question learning

  • color palette
    _ _Theo_

    Use the ChooseColor function to create a dialog box where you can pick a color.

    C / C++ / MFC help question

  • accessing union inside struct
    _ _Theo_

    Sorry I didn't realise it's a predefined structure. Leaving DUMMYUNIONNAME seems to work, so instead of using it call the union attributes right away like: //temp = dispName.DUMMYUNIONNAME.pol; temp = dispName.pol;

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

  • accessing union inside struct
    _ _Theo_

    Using another union name than DUMMYUNIONNAME solves the problem.

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

  • Reading MessageBox
    _ _Theo_

    I don't think there are functions to do it that if you use MessageBox. But why do you want to do it anyway? You provide the label and text for a messagebox yourself so there's no need to read it.

    C / C++ / MFC help question

  • Reading MessageBox
    _ _Theo_

    I'm not sure what you mean. Do you want to read the contents of an edit field in a dialog?

    C / C++ / MFC help question

  • How do I completely clear a text file for re-use??
    _ _Theo_

    You can use the strftime function to format a time/date string or you can use GetSystemTime to get the current time and date from the system.

    C / C++ / MFC question

  • MSN like Emoticon list
    _ _Theo_

    You have to create one by yourself, since there's no thing like a standard control for it. So you'll have to create your own source for it to handle everything like drawing etc.

    C / C++ / MFC help tutorial

  • active screensaver Programmatically
    _ _Theo_

    You can use SystemParametersInfo(SPI_SETSCREENSAVETIMEOUT,1,0,SPIF_SENDWININICHANGE); to change the screensaver timeout thus triggering it after one second. Setting the timout to zero does not seem to work, so you'll have a minimum delay of one second. Don't forget to change the timeout back to a normal value when you're done ;)

    C / C++ / MFC tutorial question

  • vc++ 4.0 and dll
    _ _Theo_

    If your square function has for example the following definition: int square(int a,int b); you could do it this way: typedef int (*proc)(int a,int b); HINSTANCE hLib; hLib = LoadLibrary("test_build.dll"); proc fptr=(proc)GetProcAddress(hLib,"square"); abc=fptr(1,2);

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

  • Create controls in a dll ?
    _ _Theo_

    There's a OnDrawItem command. Maybe if you override that one you will receive ownerdraw messages. I never use MFC though so I'm not sure about this ;)

    C / C++ / MFC help tutorial question

  • vc++ 4.0 and dll
    _ _Theo_

    There are two ways to do it: -link your testexe with a .lib file created when you compile the dll -use LoadLibrary and GetProcAddress to load the dll during execution of the test executable

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

  • paint a DC
    _ _Theo_

    First of all, it's best to use BeginPaint and EndPaint when painting from the WM_PAINT message: PAINTSTRUCT ps; BeginPaint(hwnd,&ps); //you can use ps.hdc now for drawing EndPaint(hwnd,&ps); Otherwise use GetDC() when painting. The HDC object you have using the above methods can be used for drawing. A HDC object is 'connected' to a certain surface like a bitmap. The 'b' HDC object you use in your code points to nothing so to say, so you need to create a HBITMAP object if you want the code to work: HBITMAP bmp=CreateCompatibleBitmap(hdc,width,height); Then use SelectObject(b,bmp); to let 'b' point to the new bitmap. After that you can draw to it/copy to it etc. Also, I advice you use b=CreateCompatibleDC(hdc); instead of NULL as argument.

    C / C++ / MFC question c++ json performance help

  • Real quick question...
    _ _Theo_

    You can convert the wchar_t * to char * with one of the following functions: - wcstombs (include stdlib.h) - WideCharToMultiByte (include winnls.h)

    C / C++ / MFC question help

  • Using C functions in Visual C++
    _ _Theo_

    If you want to use C code or functions inside your C++ source files use the following: extern "C" { //C code or function calls here }

    C / C++ / MFC c++ tutorial question
  • Login

  • Don't have an account? Register

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