|
Just a guess (it's been a long time ), but aren't DH and DL only 8 bits?
Try this:
void _gotoxy(int row, int col)
{
asm
{
mov ah, 2
mov bh, 0
mov dh, row & 0xff
mov dl, col & 0xff
int 0x10
}
}
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!
|
|
|
|
|
i have checked that but it is not working, suggest any thing else, plz help!!!!
|
|
|
|
|
The only other thing I can think of would be to use char instead of int .
void _gotoxy (char x, char y)
otherwise I have no idea why it would work with a constant and not a variable. I do not have Turbo C++ to test it myself. What does your manual say about using variables in inline assembly?
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!
|
|
|
|
|
Hey Im not a real advanced programer or anything, but when I use Turbo C++ in class, I can include <stdio.h> and freely use gotoxy(int,int); thoughout the program to move the cursor to a certain spot on the screen and print something there. What the hell is up with visual c++. It's telling me that gotoxy(int,int); is an "undeclared identifier". Well Im lost...
|
|
|
|
|
I'm looking for a (speedy) class/algorithm to convert Paradox/Excel date serials to a day-month-year value and back.
VictorV
|
|
|
|
|
|
The Paradox/Excel serial date is the number of days since 1-1-1900. I was wondering if anyone knew a fast algorithm to convert a serial date to day-month year and vise versa...
VictorV
|
|
|
|
|
Hello,
I need to change the font of a property sheet tab from the same tab.
Let's say that in that tab there is the control of alarms and emergencies that can happen in a machine that I control. when a new alarm or emergency happens I want to be able to change the color of the "alarms and emergencies" tab.
As always thank you in advance.
NOTE:
I want only to change the font of the "alarms and emergencies" tab, the other ones should keep the same font than before.
|
|
|
|
|
|
There is a function SetAutoURLDetect suporrted by CRichEditCtrl as per MSDN but when actually called there is no such function in the header file . there is a compiltion error can anybody help me ?????
|
|
|
|
|
|
|
I have a initialized a bitmap with a bitmap info header,which i have mentioned of bitcount=1(monochrome bitmap).I want to get the bits of the bitmap.Is it possible to get the bits by using function called GetDIBits for a monochrome bitmap.
|
|
|
|
|
Is there any reason you can't create it as a DIBSECTION ? Then you'll have a pointer to the bits by default.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
|
|
|
|
|
Do u mean that if i use createDIBSection api,i can get the pointer to access the bits.
Please all tell the procedures.i have just initialized the bitmap info header.Afterwards i dontknow what to do.
|
|
|
|
|
BITMAPINFO bmInfo;
memset(&bmInfo.bmiHeader,0,sizeof(BITMAPINFOHEADER));
bmInfo.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
bmInfo.bmiHeader.biWidth=width;
bmInfo.bmiHeader.biHeight=height;
bmInfo.bmiHeader.biPlanes=1;
bmInfo.bmiHeader.biBitCount=24;
HDC pDC = ::GetDC(0);
HDC TmpDC=CreateCompatibleDC(pDC);
BYTE *pbase;
HBITMAP TmpBmp=CreateDIBSection(pDC,
&bmInfo,DIB_RGB_COLORS,(void**)&pbase,0,0);
HGDIOBJ TmpObj=SelectObject(TmpDC,TmpBmp);
|
|
|
|
|
I have created an image transfer system using the UK GSM network. When the send and receive ends are both on my desk (both modems in the same GSM cell), then I have no problems at all, the system and the software work perfectly.
However, as soon as the ends are separated by any reasonable distance (in to a new GSM cell) the system falls over. Having done some extensive playing aroundtesting I have managed to discover that the modems response to dialing any out of cell number is 'NO CARRIER'. Unfortunately I have very little comm.s experience and even less experience with GSM comm.s.
I can write the most clever code in the world, but if I can't get a call to connect it's a waste. Does anyone have any ideas as to what's occurring here?
Derek Lakin.
I wish I was what I thought I was when I wished I was what I am.
Salamander Software Ltd.
|
|
|
|
|
How do I do it? :-P
I want to enable copying from a CScrollView derived class the selected data in text format. The clipboard stuff I can do, but what is bugging me is whether I really have to code the selection stuff myself.
|
|
|
|
|
Anonymous wrote:
what is bugging me is whether I really have to code the selection stuff myself.
Yes, you'll have to do that yourself. What kind of information are you displaying in CYourView?
Tomasz Sowinski -- http://www.shooltz.com
- It's for protection - Protection from what? Zee Germans?
|
|
|
|
|
Thanks for your answer, even though it is not what I wanted to hear .
The document content is just plain text.
|
|
|
|
|
Anonymous wrote:
The document content is just plain text.
You may consider switching to CEditView or CRichEditView then.
Tomasz Sowinski -- http://www.shooltz.com
What is "scratch" and why can everything be made from it?
|
|
|
|
|
Hello,
I am writing a dialog based application in VC++ 6.0.
I need to execute a dos program at one point in the program and use the file generated by the DOS program. Please tell me if you know how to execute a DOS program from my VC++ code. Thanks !!
I really appreciate your input on this.
Thanks you!
Sincerely,
Anjum.
|
|
|
|
|
Still using old 16bit DOS apps? Puh!
However, a 16bit app is started as any other app either using ShellExecute(Ex)() or CreateProcess() APIs.
--
Daniel Lohmann
http://www.losoft.de
(Hey, this page is worth looking! You can find some free and handy NT tools there )
|
|
|
|
|
Hello,
I am writing a dialog based application using VC++ 6.0. It is almost complete. Now I need to change the color of all the dialog boxes and all the buttons on it from normal Grey to Some other color. I am using the funtion SetDialogBkColor() in my initInstance to change the background color .. but all the buttons etc. remain grey. Pleas suggest a way that I can change the color of all the buttons to something other color other than grey.
I really appreciate your effor in solving this problem.
Thanks!
Sincerely,
anjum.
|
|
|
|
|
the standard window buttons can't be changed in color... however they can be owner-drawn... check some articles on this site ... Controls - Buttons for example, is a section which contains lots of good info on this subject
- Roman -
|
|
|
|