Thanks, that clears up a lot of the questions I had left.
Type: Posts; User: Exile
Thanks, that clears up a lot of the questions I had left.
Success! Thanks kuphryn, that ended up working after all.
I needed to add this to the switch in WinProc:
case (WM_ERASEBKGND) :
{
break;
}
And the handling of the WM_PAINT message...
I haven't tried that, and I'll be honest I'm not entirely sure how. I've never painted to a bitmap, or did much with bitblt.
As a test of that (using what I know and the model as I understand it)...
Maybe an answer?
This is a crude way of setting the font size, its by no means very thorough though. If you read the font.alias file (not sure what its default location is, I found mine at...
All the program does, is create a plain window and draw a couple of rectangles in it. When the window is resized the rectangles are redrawn to match the size of the window, pretty simple.
The...
Just make a loop out of it, something like this:
int Base = 2, Exp = 5, ctr, Result;
Result = Base;
for (ctr = 0; ctr < Exp; ctr++)
{
Result *= Base;
}
That will calculate the value Base...
In XWIndows how do I set the font size to draw with? There's probably something simple I'm missing on this.
I know you can get a font's size with something like this:
int FontSize(Display...
If I'm understanding things right, it sounds like the Java set and the boost.org signals library are fairly similar.
I would create one class that represents the control, then the users...
To be honest I really liked your suggestion over the use of variants. It gives me more flexibility in the property types. I highly doubt any variant type would permit function pointers as a value,...
I used the following code:
#include <stdio.h>
int main(){
char string[30];
scanf("%[^\n]\n",string);
printf("%s",string);
return 0;
Yeah, you have those right. Guess I could have explained those better. The properties would be an enumerated list of values that define how the window looks and acts. The basic window settings...
You don't need to put the & in fron of arrays.
int main(){
char string[30];
scanf("%[^\n]\n",string);
printf("%s",string);
return 0;
}
In my spare time I've been constructing a cross platform API in my basement. Not that I expect anyone to use it, there's certainly better options available, its just been a heck of a challenge and...
There isn't any for each in C. The only way to go through all the elements in a structure is to write a line for each member in the structure.
At least, so far as I know.
As for you question...
Even on windows you need to include that switch. As far as I can tell it just sets up the libraries that need to be linked to. Not sure why they don't use normal linking, like -lX11 for XWindows.
It sounds like when you run just `gcc' its using the standard Linux compiler, not the MinGW compiler. You may want to try it with the -v switch (maybe its --version ?) to get the version information...
be sure when you compile you use the -mwindows switch
gcc source.c -mwindows
otherwise it won't link against the windows libraries.
Positng this question here for lack of a better place to put it.
Here is the code I'm messing with:
#include<Carbon/Carbon.h>
int main(int ArgC, char **ArgV)
{
Rect rPos;
...
To expand on anonytmouse's answer you will need something like this in your main window's callback function.
switch(message)
{
case (WM_COMMAND) :
{
if (LOWORD(wParam) ==...
Even with a GL app, if another window was placed on top of it or dragged across it you would have to redraw the graph. Granted with GL it would be possible to keep an offscreen buffer with the graph...
Thats something in the KDE project, I believe, the KDevelop tries to use autoconf to create the makefile for your project before compiling it. If I remember right aclocal.m4 is a set of macros for...
I would think both ways would work the same. The real difference is how you plan to draw the lines.
If you are just calculating some points and connecting them with straight lines you won't see...
Calling a program doesn't require you to be in the directory with the application to start. You should be able to do that with the system() function:
system("c:\\Program...
Why do you need to change the directory? Generally speaking thats not something you commonly have to do.
When a program needs to access a file in some other directory, it can specify the full...
I messed with MFC for a couple of weeks. I got tired or sorting out all the MS crap that gets thrown in there by the wizards and whatnot.
The standard C API calls work fine for making GUI's from...