22 Unanswered Topics

Remove Filter
Member Avatar for triumphost

I have roughly 500 function pointers defined in a header like so for example: void (__stdcall *ptr_glAccum) (GLenum op, GLfloat value); void (__stdcall *ptr_glActiveTextureARB) (GLenum texture); void (__stdcall *ptr_glAlphaFunc) (GLenum func, GLclampf ref); GLboolean (__stdcall *ptr_glAreTexturesResident) (GLsizei n, const GLuint *textures, GLboolean *residences); void (__stdcall *ptr_glArrayElement) (GLint index); void (__stdcall …

0
156
Member Avatar for triumphost

I'm trying to write a cout formatter that uses the comma operator and insertion operator. I wasn't able to get that to work so I decided to write it similar to std::boolalpha. when you use `std::boolalpha`, it is able to change 0 values to true and false and you can …

0
190
Member Avatar for triumphost

Why can't I capture the variable Painted and change it? The second that I capture it, it throws a compile time error: > *cannot convert 'Foo()::<lambda(HWND, uint32_t, WPARAM, LPARAM)>' > > to > > 'WNDPROC {aka long long int (*)(HWND__*, unsigned int, long long unsigned int, long long int)}' in …

0
107
Member Avatar for triumphost

Why can't I capture the variable Painted and change it? The second that I capture it, it throws a compile time error: > *cannot convert 'Foo()::<lambda(HWND, uint32_t, WPARAM, LPARAM)>' > > to > > 'WNDPROC {aka long long int (*)(HWND__*, unsigned int, long long unsigned int, long long int)}' in …

0
154
Member Avatar for triumphost

This may be a long post but I really need to know how to Convert between the two image formats and amonst themselves as well. Here goes: I have a struct like the one below that holds all pixel information: typedef union RGB { uint32_t Color; struct { unsigned char …

0
339
Member Avatar for triumphost

I just started shared memory and I took a big dive into it and got stuck trying to figure out how to share pointers. Well not really pointers: void* pData = MapViewOfFile(hMapFile, FILE_MAP_ALL_ACCESS, 0, 0, MapSize); Ok so the above holds my view of the file to be shared between …

0
95
Member Avatar for triumphost

How can I reverse a GLTranslate. Example: if glTranslate is called before rendering text to the screen, how can I figure out the position of that text if glTranslate weren't used? The text is rendered to the screen like this: glTexEnvi(GL_TEXTURE_ENV, GL_COMBINE_RGB, 7681) glTexEnvi(GL_TEXTURE_ENV, GL_SOURCE0_RGB, 34168) glTexEnvi(GL_TEXTURE_ENV, GL_OPERAND0_RGB, 768) glColor4ub(0, …

0
92
Member Avatar for triumphost

I have the following code to take a bitmap of a portion of the screen specified by the Box Area. Area is just a struct that holds Width, Height, X1, Y1, X2, Y2 and represents a box. Basically a RECT with additional features. For some reason, if Box is (0, …

0
88
Member Avatar for triumphost

I have the following code which tracks the mouse movements on a control and if the mouse hovers it will beep. I want it to draw specific images on Hover and when it leaves, draw a different image. How can I accomplish this? I subclassed the buttons to figure out …

0
83
Member Avatar for triumphost

I have a button created as follows: ~~~ HWND License; HBITMAP MainButtons; Case WM_CREATE: License = CreateWindowEx(WS_EX_TRANSPARENT, L"Button", L"License", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_TABSTOP | BS_BITMAP, 26, 77, 75, 23, hwnd, (HMENU)ID_LICENSE, hInst, 0); MainButtons = (HBITMAP)LoadImage(GetModuleHandle(NULL), MAKEINTRESOURCE(IDI_MAINBUTTONS), IMAGE_BITMAP, 0, 0, LR_SHARED); SendMessage(License, BM_SETIMAGE, IMAGE_BITMAP, (LPARAM)MainButtons); break; ~~~ …

0
75
Member Avatar for triumphost

I'm trying to clip my Button with the following code but it does not work at all.. #pragma comment(linker,"\"/manifestdependency:type='win32' \ name='Microsoft.Windows.Common-Controls' version='6.0.0.0' \ processorArchitecture='*' publicKeyToken='6595b64144ccf1df' language='*'\"") #pragma comment(lib, "Gdiplus.lib") void RegionCloseButton(HWND hwnd) { CloseRegion = GetDC(hwnd); CloseRegionMem = CreateCompatibleDC(CloseRegion); Gdiplus::Graphics graphics(CloseRegion); Gdiplus::FontFamily fontFamily(L"Courier New"); Gdiplus::GraphicsPath path; Gdiplus::PointF Origin(5, 5); path.AddString(L"X", …

0
192
Member Avatar for triumphost

case WM_MOUSEMOVE: if (wParam & MK_LBUTTON) { RECT WindowRect; POINT CursorPos; GetWindowRect(hwnd, &WindowRect); GetCursorPos(&CursorPos); SetWindowPos(hwnd, 0, WindowRect.left - CursorPos.x, WindowRect.top - CursorPos.y, 291, 157, 0); } break; Hey Guys The above code isn't working for me. I'm trying to have the user Drag my borderless window but the thing just …

0
67
Member Avatar for triumphost

I have a modified a DLL called UserEnv and I decided to check out reverse engineering and assembly.. When my DLL Loads, it writes and displays a messagebox saying it's loaded.. Sorta like injection into notepad which I learned from: [How To Inject Into Notepad](http://home.inf.fh-rhein-sieg.de/~ikarim2s/how2injectcode/code_inject.html) The DLL Now looks like: …

0
95
Member Avatar for triumphost

I'm trying to convert this (Pascal) to C++.. My attempt is below this.. [CODE] function CompressString(const Str: string): string; var Destlen:longword; begin result := ''; Destlen :=BufferLen; if length(str) < 1 then exit; if compress(BufferString,destlen,PChar(Str),length(str)) = Z_OK then begin setlength(result,Destlen + SizeOf(Integer)); PInteger(@result[1])^ := Length(str); Move(bufferstring[0],result[5],Destlen); end; end; [/CODE] [CODE] …

0
82
Member Avatar for triumphost

Hey all, I'm a c++ programmer and I'm REALLY new to pascal. I want to translate some of my programs into pascal just for the experience. The thing is, this Lazarus compiler is soooo confusing! All the windows are split apart.. How can I join them? Next is how can …

0
89
Member Avatar for triumphost

Can someone explain why my function is not working? Description: ToggleFrame(TagID, FrameID).. Given those two, get the two elements.. If the iframe is showing, hide the tagID element.. if the tagID element is showing, hide the iframe.. My attempt & failure: [CODE] function ToggleFrame(ID, FrameID){ //Given the tag, show/hide it.. …

0
72
Member Avatar for triumphost

Hi All, I'm making a website for my school project but I have a problem with the pre tag. I used a table to define the layout of my site. But now I want to add content using the <pre> tag and it stays in the center -__- even when …

0
73
Member Avatar for triumphost

[size=10]The problem is the below code.. I created my controls.. The thing is that when I press the button, the edit control shows up on top of all controls except for the button that was pressed.. then if I move the mouse, all the other buttons under it, show up …

0
91
Member Avatar for triumphost

Kk so I've been using these functions for quite some time and everytime I write a new program and decide to use them, I have to open up old ones and copy paste them with a whole bunch of include n crap. I decide I'd try to make a DLL …

0
73
Member Avatar for triumphost

Can someone explain why it wont find the window?? I did everything right, Im pretty sure of it :S Yet it just wont find it. EDIT: Admin delete.. I think I just figured it out.. [CODE] private: System::Void Form1_Load(System::Object^ sender, System::EventArgs^ e) { Form1::Visible = false; Query ^ F = …

0
87
Member Avatar for triumphost

Ok So Im writing a program to setup another program... And now Im stuck cuz I want make "my program" click the next button on the "setup" and then I want it to click the radio buttons on the "setup" program... how would I got about being able to send …

0
49
Member Avatar for triumphost

Ok the code below is supposed to edit a file called license.dat and replace texts in it... it works great it does all that but I want to implement user input in it. By this I mean I want the user to be able to enter the drive letter for …

0
80