I have created a control and the mosemove for that control makes it change color, but I want to change it back to default when my mouse moves out of that control. I would have thought WM_MOUSELEAVE would do it but it didn't.
Thanks
...
what is the best way to create a gradient for a 2D polygon in OpenGL, (Linear, and Radial)?
Thanks
How can you generate textures for radial gradients on the fly?
...
Do Windows Native API support Timers? I am aware that POSIX implementations on Windows support timer, but I am interested in Windows SDK APIs.
...
I am trying to provide an AT/Modem-like interface around some hardware.
Follwing this post I have the server setting up a pty using openpty().
Now I can communicate with the server as expected with a client app that open the slave and communicates via read() and write() calls.
However I would also like to be able to use either the scre...
Hi,
in Java I think it is possible to cruise through jar files like they were not compressed. Is there some similar (and portable) thing in C/C++ ?
I would like to import binary data into memory from a large (zipped or similar) file without decompressing to disk first and afterwards writing to disk in a compressed way.
Maybe some tr...
Quick and easy C question: char* foo
How can I test if foo hasn't still been assigned a value?
Thanks.
...
Hi everybody,
I am little new to MAC os but while building an cpp application on MAC OS X , using g++ I am getting strange error from linker.
first at one step I am creating a library using several object files generated from cpp source and then I am creating a single archive using ar rvs command.
If I am linking this library to anot...
I am just starting out with win32 GDI programming and finding good references hard to come by. I have a simple application that captures the screen by doing the following:
UINT32 x,y;
x = GetSystemMetrics(SM_CXSCREEN);
y = GetSystemMetrics(SM_CYSCREEN);
HDC hdc = GetDC(NULL);
HDC hdcScreen = CreateCompatibleDC(hdc);
HBITMAP hbmp = C...
Hi,
I'm starting with PHP for dynamic web pages. I have some libaries written in ANSI C for getting/setting parameters and other proprietary stuff. I wonder, is there a simple solution to use a wrapper inside PHP to call this funtions? Is there a already existing class/library? What would be the best practice to do this on my own? I don...
I'm having some trouble stepping over in GDB. I've built an example program from the ffmpeg library with debug symbols on and stripping off. Although I configured the ffmpeg library to static and explicitly disabled shared, it looks like the program I'm debugging is linking dynamically, since its file size is only 99kB. I don't know t...
INT GetTree (HWND hWnd, HTREEITEM hItem, HKEY *pRoot, TCHAR *pszKey,
INT nMax) {
TV_ITEM tvi;
TCHAR szName[256];
HTREEITEM hParent;
HWND hwndTV = GetDlgItem (hWnd, ID_TREEV);
memset (&tvi, 0, sizeof (tvi));
hParent = TreeView_GetParent (hwndTV, hItem);
if (hParent) {
// Get the parent ...
Hi guys,
need your help. I actually don't know how to extract dates from a arff-file.
arff-file:
@ATTRIBUTE a1 NUMERIC
@ATTRIBUTE a2 NUMERIC
@ATTRIBUTE a3 {a,b,c,d,e}
@DATA
12.5,1,b
3.7,2,a
3.5,1,c
...
do C have BufferedReader and InputStreams?
Thanks a lot!
...
See, I have two functions, one to get a char, and other to put a char like this.
void function_get_char (input);
void function_put_char (output);
I have a function pointer to these functions like this.
void (*function_operators[])(input_or_output) = {function_get_char, function_put_char};
I need of, when I'll call my function_opera...
in these i'm playing with thread library and trying to implement some functions.
One of the tutorial says that to run the program use :
gcc -lpthread -lrt -lc -lm project1.c scheduler.c -o out
first of all i need deep understanding of what is gcc doing in each line,
lpthread is used for what? what are the contributions of lrt -lc -l...
program runs fine. When I put a breakpoint a segmentation fault is generated. Is it me or GDB? At run time this never happens and if I instantiate only one object then no problems.
Im using QtCreator on ubuntu x86_64 karmic koala.
UPDATE1:
I have made a small program containing a simplified version of that class. You can download ...
Hello,
I have the coordinates (x,y) of 2 points. I want to build the third point so that these 3 points make an equilateral triangle.
How can I calculate the third point?
Thank you
...
I have called getpeername on my connected socket and now have an IPv6 address of the connected peer. How do I tell whether my peer's IP address is localhost?
Edit: To clarify, I mean specifically localhost, as in the loopback IP address.
...
I'm working some code including communication between processes, using semaphores. I made structure like this:
typedef struct container {
sem_t resource, mutex;
int counter;
} container;
and use in that way (in main app and the same in subordinate processes)
container *memory;
shm_unlink("MYSHM"); //just in case
fd = shm_ope...
Hi, I have a few questions about the socket library in C. Here is a snippet of code I'll refer to in my questions.
char recv_buffer[3000];
recv(socket, recv_buffer, 3000, 0);
First, How do I decide how big to make recv_buffer? I'm using 3000, but it's arbitrary. Second, what happens if recv() receives a packet bigger than my recv_...
I've got a pack box in my GTK application and I'm replacing it every once in a while with a completely new entry (at least for now cause I'm in a hurry).
Since I'm replacing it with a new instance, do I need to explicitly free from memory the old pack box contents or is there some garbage collection in GTK?
If I do need to explicitly n...