|
FillSolidRect()
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
Depends, do you want the screen to be updated constantly as they are drawn? Then #1 is probably the way to go, as it has a decent chance of being accelerated. If you just want them all drawn and then shown at once, using a memory bitmap and an optimized fill routine *might* be faster. But, you'd probably still want to test it.
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
RECT rc;
rc .top = 12;
SetBkColor (hDC, clr);
ExtTextOut (hDC, rc .left, rc .top, ETO_OPAQUE, &rc, _T (""), 0, NULL);
Overall, that is the fastest way to clear a rectangle in GDI (OpenGL, DirectX are different).
Tim Smith
"Programmers are always surrounded by complexity; we can not avoid it... If our basic tool, the language in which we design and code our programs, is also complicated, the language itself becomes part of the problem rather that part of the solution."
Hoare - 1980 ACM Turing Award Lecture
|
|
|
|
|
|
Is it possible to send text to the clipboard without using the context menu/Keyboard shortcut(usually/allways/only the edit ctrls) for 'Copy ' command?
--BlackSmith--
"With the help of all mighty", 2001, Me.
|
|
|
|
|
Are you talking about by just using any program, or programatically inside of your program?
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
I want it programatically inside of my program.
--BlackSmith--
"With the help of all mighty", 2001, Me.
|
|
|
|
|
|
this is code of gotoxy, i have made in c++ using assembly, but it is not working and giving an error of "invalid operand".
plz help!!!!
void _gotoxy(int row,int cols)
{ asm MOV AH,0x2
asm MOV DH,row// problem is here,if we use
asm MOV DL,cols//constant here, it works
asm MOV BH,0x0
asm INT 0x10
}
void main()
{ clrscr();
_gotoxy(15,15);
printf("x");
getch();
}
|
|
|
|
|
see below
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
"when performing a disk format under program code one should write a certain pattern to the sector then read it back and verify what you read is correct before proceeding. if this isnt done bad things may happen"
"when posting to the forums one should write a question and read back what is written (by others) before proceeding. if this isnt done bad things may happen"
do i make a point?
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
this is code of gotoxy, i have made in c++ using assembly, but it is not working and giving an error of "invalid operand".
plz help!!!!
void _gotoxy(int row,int cols)
{ asm MOV AH,0x2
asm MOV DH,row// problem is here,if we use
asm MOV DL,cols//constant here, it works
asm MOV BH,0x0
asm INT 0x10
}
void main()
{ clrscr();
_gotoxy(15,15);
printf("x");
getch();
}
|
|
|
|
|
ummmmmm dh is a 8 bit register so is dl and ints are 16 or 32 bits ... could it be that u are loading the wrong bit of the int value into the register and doing something really squiffy later?
also can u access the params by name? i always used to use the stackframe offset
"... and so i said to him ... if it don't dance (or code) and you can't eat it either f**k it or throw it away" sonork: 100.18128 8028finder.com
|
|
|
|
|
|
Sometimes, for no apparent reason, my project loads and cannot access the classview information. How does one restore things so that CW is accessible?
Thanks,
ns
|
|
|
|
|
Yeah, that can be a pain
I just exit dev studio, and delete the projects .clw file.
CPUA 0x5041
Sonork 100.11743 Chicken Little
"So it can now be written in stone as a testament to humanities achievments "PJ did Pi at CP"." Colin Davies
Within you lies the power for good - Use it!
|
|
|
|
|
The usual problem for me is that the file was copied from a CD-ROM and is read only, unchecking that works for me.
|
|
|
|
|
I've searched and searched and I can't find anything on it.
I'm not referring to a Volume serial number (easy) but the actual hardware serial number on the physical drive, assigned by the manuf. and not the partition's operating-system-assiged number.
Does anyone have a clue on how I can read it under 95/NT?
Many thanks!
|
|
|
|
|
I don't believe there is a way to programatically to do that besides taking the case off of the computer and examining the drive. Maybe, the manufacturer's utility (e.g. Western Digital or MaxStor) can get that info if it is indeed stored on the disk.
|
|
|
|
|
Hi Friends
The other day I tried to create a class which creates a timer and
its associated procedure.The skeleton class code is like this:
// CTIMER.H
class CTIMER
{
public:
void CALLBACK myproc(HWND,UINT,UINT,DWORD);
int Create();
CTIMER();
virtual ~CTIMER();
int Timer_ID;
};
//CTIMER.CPP
//Other code
//This code is creating problem
int CTIMER::Create()
{
//the (TIMERPROC) cast seems the source of bug
Timer_ID=SetTimer(NULL,0,500,(TIMERPROC)myproc);
return 0;
}
The above code is not compiling but gives an error C2440 along with a
message "None of the functions with this name in scope match the target type"
Whe I declared the function outside the class ,everything is OK.How can I solve this problem.Im new to C++ style programming,My experience is with C style Windows SDK coding.OS Win98/NT4,MSVC++6
|
|
|
|
|
a timer callback (or most any CALLBACK) can't be a non-static member function of a class. either make the function a static function (which can't access class data, and therefore might as well be outside the class), or just use a non-class function.
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Hi,
I'm dealing with an html page that has 12 tables in it. I'm trying to get to a particular table row which has a class="row1" but it doesn't look like the IHTMLTableRowPtr contains any method for retrieving the class name.
Can anyone give me any input as to if this is possible?
Thanks in advance,
Craig
|
|
|
|
|
Hi !
I am trying to find a way to reuse dialogs I already desined in other projects and import them to my new project, I can't find a way to do that. I tried to mess with the *.rc file but it did not work.
Thank you
|
|
|
|
|
One way is to have the project you want the dialog to be imported into open and then open the .rc file that contains the dialog that you want to copy from. That will open in the code window, just navigate to the dialog and copy it to your open project.
Hope this helps,
Craig
|
|
|
|
|
open the .RC file from the old project in the new project. then you can just copy/paste the dialog resources into the new project.
you'll have to copy the actual .cpp and .h files by-hand
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|