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

dave2k

@dave2k
About
Posts
26
Topics
12
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • function pointers and dlls
    D dave2k

    hi guys. i am trying to use pointers to functions in my dll to call a function in my .exe i am storing my pointer in a global variable, so it can be called by any function. the trouble is, i am finding that it can be only called by my addeventCallback function i.e. Code: #include "dll.h" EVENTCALLBACK evtcb = NULL; BOOL WINAPI AddEventCallback(EVENTCALLBACK ptr) { evtcb = ptr; evtcb("pass on the message!"); evtcb("pass on the message!"); } LRESULT CALLBACK GetMsgProc(int nCode, WPARAM wParam, LPARAM lParam) { if(nCode < 0) return CallNextHookEx(0, nCode, wParam, lParam); evtcb("pass on the message!"); this displays "pass on the message" twicein the console, but when i try to cal evtcb() from GetMsgProc, it does not show again, meaning it has failed somewhere. i know my GetMsgProc is fine as i have used other indicators such as MessageBepp(0) to show it is working. what is the problem here? cheers. -- modified at 8:50 Thursday 8th September, 2005

    C / C++ / MFC question help

  • memcmp &amp; bitmaps
    D dave2k

    i am trying to find an instance of a small bitmap in a screen grab of a window. so far i have managed to load both bitmaps into two BYTE arrays. I found some code which searches through the bitmaps and uses memcmp to see if the smaller one is present in the larger. the trouble is, i am having trouble with the memcmp function: memcmp(ScreenBmp[i][tmpY],CardBmp[x], card_line_length ) What should ScreenBmp and CardBmp represent. I have the two bitmaps in BYTE buffer arrays, so how can i get them into the format above. The code i used to get them into these arrays is below: HANDLE hBitMap = LoadImage(0, "img.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); BITMAP bitmap; GetObject(hBitMap,sizeof(BITMAP),&bitmap); int size = bitmap.bmHeight*bitmap.bmWidth*bitmap.bmBitsPixel/8; /// cout << bitmap.bmHeight << endl; BYTE *lpBits = new BYTE[ size ]; GetBitmapBits((HBITMAP)hBitMap,size,lpBits ); //delete []lpBits; HANDLE hBitMap2 = LoadImage(0, "img2.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE); BITMAP bitmap2; GetObject(hBitMap2,sizeof(BITMAP),&bitmap2); int size2 = bitmap2.bmHeight*bitmap2.bmWidth*bitmap2.bmBitsPixel/8; /// cout << bitmap.bmHeight << endl; BYTE *lpBits2 = new BYTE[ size2 ]; GetBitmapBits((HBITMAP)hBitMap2,size2,lpBits2 ); cheers!

    C / C++ / MFC graphics question

  • load image
    D dave2k

    how can i get a BYTE* from a bmp file? thankyou

    C / C++ / MFC question

  • LoadImage (newbie)
    D dave2k

    someone created that structure for me. later on, each image will be passed into memcmp (memory compare), along with a gui bitmap, to see whether the bitmap exists. will this still work with HBITMAP?

    C / C++ / MFC question data-structures

  • LoadImage (newbie)
    D dave2k

    I have the structrue [code] struct Card{ char szFileName[MAX_PATH]; BYTE *lpImage; Cards CardType; };[/code] an array of this structure will store 52 images representing different cards. at the begining of my program i need to load all the images, and this is my effort for loading an image: [code] HBITMAP hbm = LoadImage(0, (LPCTSTR)"img.bmp", IMAGE_BITMAP, 0, 0, LR_LOADFROMFILE | LR_DEFAULTSIZE);[/code] hbm is of type HBITMAP, so how can i get it into the structure where theimage type is of BYTE? cheers

    C / C++ / MFC question data-structures

  • Frailty of life
    D dave2k

    Our thoughts are with you friend, David.

    The Lounge com tools question lounge

  • interacting with other program
    D dave2k

    i guess my first thing todo is build a program with the same buttons as the casino program, so i can play the game without interacting with it's interface. so how do i do this? will i have to use win32 functions? could i use python (with com support)? specifically what functions will be required here? thanks.

    The Lounge game-dev question

  • interacting with other program
    D dave2k

    so as i understand, there are 2 ways to do this: 1) read the tcp/ip packets and manipulate them this way 2) read the info comming from the program itself, and emulate the mouse and keyboard this way is this correct? surely the 2nd answer is the way, as i can imagine all sorts of security stuff is in place to prevent bots connected to their servers.

    The Lounge game-dev question

  • interacting with other program
    D dave2k

    the game is texas holdem, and i would program it so that it based odds depedning on what cards are out and how many othe rplayers there are etc, so i dont think it's completely luck

    The Lounge game-dev question

  • interacting with other program
    D dave2k

    btw when i say online, i don't mean a website, it's a desktop program which connects to the internet

    The Lounge game-dev question

  • interacting with other program
    D dave2k

    the game playing side is ok - as long as it's programmed correctly, a program should retrn alot more money thn a human could, and it would be running all day while i am at work! so how can i start researching what i need to do? what is this stream reading about? cheers

    The Lounge game-dev question

  • interacting with other program
    D dave2k

    i would like to make a program which will play online poker for me! nevermind the game code, i am just wondering whether it would actually be possible to interact with one of these online poker programs.. i don't know much about desktop programming but i am willing to learn. I know for a fact that programs can get info from these poker programs, as i have seen one work. but what about actually inteacting? cheers

    The Lounge game-dev question

  • multi dimensional array in form
    D dave2k

    i have a survey which involves multiple radiobuttons what i want to do is have a (multi dimensional?) array, so that each second dimension represnts a row of radiobuttons. The trouble is i don't know what to name the arrays as. Obviously for each row the names for the different radio buttons will be the same, meaning you can only select one. in php you could do it with a single array as you name each row of radio button differently: 1st row: name='array[0]' 2nd: name='array[1]' in asp it doesn't look like you can do it this way, because to create a similar array you'd do something like 1st row: name='array' 2nd name='array' then use split in the recipient script. This does not work however, because each radiobutton (on all rows) has the same name, and therefore when you click one all the rest on every row are unclicked.. thankyou

    ASP.NET php data-structures tools json question

  • c++ .net
    D dave2k

    what's this all about then? if all the .net languages compile down to the same intermediate language, i assume that a similar program written in c++ .net and lets say c# runs at the same speed? so then what is the point in using c++ with it's added complexities (admitedly not as comlpex as unmanagaed c++) to keep the older developers happy?

    The Lounge csharp question c++ performance

  • 40 million credit cards exposed
    D dave2k

    well i have 5 (determined not to get a loan) :eek:

    The Lounge com sysadmin security performance question

  • 40 million credit cards exposed
    D dave2k

    well i have 5 :eek:

    The Lounge com sysadmin security performance question

  • Indianapolis farce!
    D dave2k

    For me, the blame lies with the FIA, Michellin & Berny Echlestone. Michellin is the obvious choice for not haveing tires ready. There are many factors for this including the new 'diamond cut' surface of the track etc. I heard yeterday that bridegstone had been able to prepare for this in dvance because they supply indy cars with their tyres a month before. It also seems like michelin only found out about the problem after ralf's tyre exploded in practice. However, when they did find out, they took all the appropriate steps, and told the FIA that a chicane was the only option. The FIA made in my opinion the fatal mistake by not including the chicane. I mean i know rules are rules, but this usually concerns individual teams, not the majority of the track. Bernie also told us that the race would go ahead when speaking on saturday. He lies, so owes me $1 billion of his fortune ;)

    The Lounge sharepoint com tools performance question

  • 3d character
    D dave2k

    anyone else had experiences with .X files? thankyou.

    The Lounge graphics game-dev help tutorial question

  • 3d character
    D dave2k

    yeh, i had a look at milkshape too (looks good). basically, i need to create a character which has, say 20 movemets, including facial expressions. i know i can create theswe animations in 3dsmax, but i am having trouble exporting. currently i am mucking around with opengl, and have found it's very difficult to get an animation working in opengl. i managed to create a .3ds reader, and can view basic models, but not animations. the animation i am using is probly going to be skeletal, but i am not sure. i was just wondering whether using directx would make life alot easier from the animation point of view.. and how to do it ofcourse! so my mission is to create a couple of animations first off, and be able to display them in my program using directx or opengl or whatever.. thankyou!

    The Lounge graphics game-dev help tutorial question

  • 3d character
    D dave2k

    any idea how they accomplish this?

    The Lounge graphics game-dev help 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