|
ok, and how can i make the smooth color-fade?
greets
|
|
|
|
|
|
|
Hello @all,
does anyone know, wether or not Unicode can be used with Win98 or wether it is possible to add this feature to this Win98.
I' ve tried to copy the Win2k unicody libs to win98, but this failed.
Thanks for good answers...
|
|
|
|
|
|
hi everyone,
i made a DLL including some functions only for test ,i have realated .LIB file .
while i wanna importing it in other cpp file ,compiler throws me the early mentioned error (LNK 2019 unresolved external symbol)
well i search a lot and seem many peaple have this prrblem in vc7 .
now could u give a working pattern in making DLL and using it under win32 platform .
many thanks .
|
|
|
|
|
Does anybody know why this will compile on the computors at my university (borland 32) and not on my computer (MVC++ V6). even if i replace, append, or don't touch the library .h includes? Am i just using a out-of-date method? if there is a better way to do this i would love to know, i'm getting frustrated with the lack of mobility of this tiny program.
here is the code. (end of question is after code)*/
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <conio.h>
void get_A_in(int a_in[2][2]);
void main(void){
int A[2][2],i,j;
get_A_in(A);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
} //end main
void get_A_in(int a_in[2][2]){
int row,col;
row = wherex(); /*Here is the problem, What should i say for MVC++?*/
col = wherey();
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY | FOREGROUND_RED);
a_in[0][0] = 1;/*print_none(row, col); This is just cosmetic Printing stuff with a*/
a_in[0][1] = 2;/*print_st(a_in,row, col); Scanf in the function*/
a_in[1][0] = 3;/*print_nd(a_in,row, col); you can see row and col*/
a_in[1][1] = 4;/*print_rd(a_in,row, col); used here in the print_XX functions*/
//print_all(a_in,row, col);
}//end get_A_in
/* and each of the elements in the 2X2 work fine[ie. print_ functions] (i didn't want to print unnessesary code), the problem is with the wherex/y lines. Basically I need a function that will return the interger value of the current row, and colum, of the cursor position in the DOS window. kind of like the reverse of SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord); like GetConsoleCursorPosition (but i don't know it that exsits).
I Would realy appreciate any help on this, i'm soo lost; just can't find an equivilant function. Thanks for your time.
Mark;)*/
|
|
|
|
|
I don't know why this got cut but the included libraries are
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include<conio.h>
|
|
|
|
|
Hi guys,
I am using a bitmap of size 1280 x 1024. I want to resize it 1024 X 786. If I use StrechBlt function in VC I am loosing some info. How to resize the bitmap without loosing any info. I used photo editor to resize but I could not get my size requirement. There I am getting either 910 X 786 or 1024 x some other dimension. Can anybody suggest some solution??
Regards.
Satya
|
|
|
|
|
Unfortunately, whatever method you use, you will lose some info.
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hi jdunlap,
If I want to resize a bitmap and further want to use the resized bitmap how to do it??
Regards,
Satya.
|
|
|
|
|
If you are wanting to resize the bitmap in C++, you create a new bitmap with the dimensions you want, and StretchBlt the contents of the old bitmap onto the new one. This is the simplest way. It doesn't lose too much quality, either.
'this is written in VB
Dim phBmp as long
Dim WorkDC as long
'WorkDC is the temp DC we use for the StretchBlt
'phBmp is the new resized bitmap
'IBmp is the BITMAPINFO of the old bitmap
'mvarhDC is the normal DC for our bitmap
'mvarhBmp is the old bitmap
'create the new DC
WorkDC = CreateCompatibleDC(hdc) 'assuming that hdc is a screen DC
'create the new bitmap
phBmp = CreateCompatibleBitmap(mvarhDC, mvarDocWidth, mvarDocHeight)
poldbmp = SelectObject(WorkDC, phBmp) 'select new bitmap into work DC
'copy the old bitmap to the new
StretchBlt WorkDC, 1, 1, IBmp.bmWidth, IBmp.bmHeight, mvarhDC, 1, 1,IBmp.bmWidth,IBmp.bmHeight, vbSrcCopy
SelectObject WorkDC, poldbmp 'put back old bitmap in work DC
SelectObject mvarhDC, phBmp 'select the new bitmap into our normal DC
DeleteObject mvarhBmp 'delete the old bitmap
DeleteDC WorkDC 'destroy the temporary work DC
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
Hi,
Do you have the same code in c++, bcoz I don't know VB.
Regards,
Satya
|
|
|
|
|
Sorry about that - wouldn't have been able to help you last night otherwise, beacuase I didn't have time to port it to C++. But here it is!
<br>
HBITMAP phBmp;
HDC WorkDC;
WorkDC = CreateCompatibleDC(hdc);
phBmp = CreateCompatibleBitmap(mvarhDC, mvarDocWidth, mvarDocHeight);
poldbmp = SelectObject(WorkDC, phBmp);
StretchBlt (WorkDC, 1, 1, IBmp->bmWidth, IBmp->bmHeight, mvarhDC, 1, 1,Bmp->bmWidth,Bmp->bmHeight, SRCCOPY);
SelectObject(WorkDC, poldbmp);
SelectObject(mvarhDC, phBmp);
DeleteObject(mvarhBmp);
DeleteDC(WorkDC);
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
|
Dear All,
I am developing a MFC dialog based application which requires facility of a Hotkey. ie. if I press hot key combination such as Ctrl+Shift+P , then my dialog application should come.
(like we press Windows button + e and "Explorer" window appears)
Please suggest
Rohit
|
|
|
|
|
Just create a shortcut to your app with the hotkey Ctrl+Shift+P.
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Actally this dialog window is a part of my application . And I want that this window should appear if we press a hotkey (even if the application is closed)
|
|
|
|
|
Use the RegisterHotKey API. Whenever the user presses the hotkey you specified, your window will receive a WM_HOTKEY message.
Like this:
result=RegisterHotkey(
hwnd,
id,
MOD_ALT || MOD_CONTROL,
VK_M
);
"Do unto others as you would have them do unto you." - Jesus
"An eye for an eye only makes the whole world blind." - Mahatma Gandhi
|
|
|
|
|
|
dear all,
how do i add MFC support to my win32 application created using app wizard.
|
|
|
|
|
i meant to say which headre files r to be included in the project apart from changing the settings (use mfc in a shared dll) in the projects menu.
regards and thanx
rishabhs
|
|
|
|
|
Include afx.h, but there might be others that you'll need to include. Here's the default includes for a dialog based app:
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h>
#include <afxext.h>
#include <afxdisp.h>
#include <afxdtctl.h>
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h>
#endif // _AFX_NO_AFXCMN_SUPPORT
Chris Richardson
You can stash and you can seize
In dreams begin, responsibilities U2 - Acrobat[^]
Stop being PC and accounting for everyone and his momma's timeframe. Just enjoy your - Rohit Sinha in the content-challenged thread
|
|
|
|
|
I have two files:
aa.txt:
20020102,23.0
20020103,23.0
.............
20030301,35
bb.txt:
20010101,22
20010102,25
...........
20021220,23.5
Now I want to append the latest datas ( from the "20021220,23.5" to "20030301,35") of the file "aa.txt" to the file "bb.txt".
How could I do ! Please tell me the easy way to do it!
The latest datas in the file aa.txt are the datas that are not included in the file bb.txt.
Note: i only want to append the datas that the bb.txt is not included.
I wrote the following:
Please help me ! what's wrong with the following;
while(fileDest.ReadString(strLine0))
//get the last line of the writed file bb.txt
{ if(strLine0.GetLength()>10)
{ strMax=strLine0;
}
}
while(fileSource.ReadString(strLine))
{
//get the line of the read file aa.txt is equal to the last line of the writed file
if(strLine.Left(strLine.Find(','))==strMax.Left(strMax.Find(',')))
{
//get the read position of the file aa.txt
theReadPosition=fileSource.GetPosition();
break;
}
}
// the term is true , then read line from the aa.txt
while(fileSource.ReadString(strTemp))
{
if(strTemp.GetLength()<10)
continue;
fileDest.WriteString("\r\n"+stTemp);
}
fileDest.Close();
fileSource.Close();
|
|
|
|
|
Hi guys,
I am trying to add double slashes in front of a string, I am wondering it can be done as below
Assuming both variables have contained some characters
char *FileString; // a pointer to character string
char Buffer[256]; // an array to 256 characters
FileString = '//' + Buffer;
Please advise,
Thanks alot
|
|
|
|
|