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
D

Dimenser

@Dimenser
About
Posts
9
Topics
4
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • changing user drawn bitmap button
    D Dimenser

    :doh:Using visual C++ 6.0, I have created a user drawn bitmap button and the up,down,focused,etc states and it works just fine. It's a red sphere, but I would like to be able to change it to blue,green,yellow,etc. I've tried m_pic1.AutoLoad(IDC_GREEN,this); where GREEN is the "GREENU" sphere picture, but it just crashes during run time. I think I may be really barking up the wrong tree. B

    C / C++ / MFC c++ graphics data-structures

  • Edit Boxes
    D Dimenser

    I have a database program, and a dialog box that is full of Edit Boxes. After clicking the 'add new record' button, I would like the cursor to go back to the first box in the window. If the first edit box is edit1, would you call something like SetCursor(edit1) or something like that? Thanks! :doh: Dimenser

    C / C++ / MFC database question

  • connecting between two dialogs
    D Dimenser

    At the top of the main dialog portion, you need to add #include "dlg2.h" to pass the variable, use m_old=Dlg2.m_new; :-D Dimenser

    C / C++ / MFC c++ learning

  • Problem:Need to show an image depending on the options selected.
    D Dimenser

    Make the image a bitmap, assign it a name, like IDC_IMAGE. In the class wizard, go to member variables and Add Variable, and make it a control called m_image. Then import or create the bitmaps you want. In the Init Dialog section after it says, add extra initilization here, put VERIFY(picture1.LoadBitmap(IDB_MYPICTURE1)); VERIFY(picture2.LoadBitmap(IDB_MYPICTURE2)); Create two variables of CBitmap type and name them picture1 and picture 2. Then, in the part where you make your choice, if (buttonpressed==1) m_image.SetBitmap(picture1); if (buttonpressed==2) m_image.SetBitmap(picture2); I don't think I left anything out, and this works for me in visual c++ 6. Dimenser

    C / C++ / MFC question help

  • Playing raw audio files thru c or c++
    D Dimenser

    Here's what I do in Visual C++ 6.0. 1. Import the .wav file and name it something you'll remember, like IDR_BADBEEP. 2. Add #include "mmsystem.h" to the top of your file. 3. In Project/Settings/Link, add Winmm.lib 4. In the actual code where I want the sound effect to play, add: PlaySound(MAKEINTRESOURCE(IDR_BADBEEP),GetModuleHandle(NULL),SND_RESOURCE | SND_ASYNC); This will play the sound effect until the program is shut down, the sound effect is entirely played, or another sound effect is started. It's easy and works.:cool: Dimenser

    C / C++ / MFC c++ tutorial

  • Visual c++ 6.0 bitmap moving
    D Dimenser

    Maybe a newbie question, but I'll ask anyway. Using visual c++ 6.0, I click and drag a bitmap onto the dialog box, set it to a picture I've imported and there it is on the screen at runtime. Now say I want to click a button that would make that "static" bitmap move across the screen to another location by simply accessing the x,y cooridnates and doing some type of UpdateWindow? The code I've seen on here for pages and pages of DC rect this and that just seems a great deal to do for something that should be so simple. thanx Dimenser

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

  • Update Bitmaps in subroutine
    D Dimenser

    Thanks. UpdateWindow(); all by itself does what I wanted it to do... most of the time. I can't figure out any rhyme or reason but sometimes it doesn't work at all later in the program, even if I use Invalidate(); Because the program is so graphics intensive (transparent bitmaps on top of full screen bitmaps), Invalidate causes the screen to do a slow flash that is really unimpressive. I will fiddle with it more and see if Invalidate can be used to redraw one bitmap only or the such. thanks again, you got me on the right track. :cool: Dimenser

    C / C++ / MFC help game-dev question announcement learning

  • Update Bitmaps in subroutine
    D Dimenser

    Hello, I've written a card game with all the bells and whistles, but I still have some learning to do. The problem is when I programmed it so that you see your first card, get a sound effect, a pause by the computer, then your next card, etc. Instead, you get five straight sound effects, a ton of pause, then all five cards pop up at once. m_box01.SetBitmap(face[y]); soundfx(3); Sleep(250); somewhere inbetween calling my soundfx subroutine and the Sleep function, I need to call something that will refresh the screen and show the card I displayed with SetBitmap. Something like an UpdateData or DoDataExchange :omg:kind of thing. I've made guesses until I'm blue in the face. Can anyone help? thanks! Dimenser

    C / C++ / MFC help game-dev question announcement learning

  • randomize
    D Dimenser

    srand((unsigned) time(NULL)); this is what I use to "seed" the random number generator. Otherwise the numbers won't be so random. number=(rand()%6)+1; this picks a random number 1-6. (0-5 until you get to the +1). :)

    C / C++ / MFC c++ game-dev help question lounge
  • Login

  • Don't have an account? Register

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