|
Ganesh_T wrote: I want to use only SDK. no mfc classes. I haveposted the code in my reply to whitesky
Ok Ganesh listen up, The printer resolution is far more than screen's resolution.
So you need to calculate the number of times Printer resolution is greater than Screen's
So get printers Resolution use
int xPrnRes = GetDeviceCaps(hPrinterDC,LOGPIXELSX);
int yPrnRes = GetDeviceCaps(hPrinterDC,LOGPIXELSY);
Get Screens Res
int xScrnRes = GetDeviceCaps(hScreenDC,LOGPIXELSX);
int yScrnRes = GetDeviceCaps(hScreenDC,LOGPIXELSY);
Get Ratio
double ratio_x = (double)xPrnRes/(double)xScrnRes;
double ratio_y = (double)yPrnRes/(double)yScrnRes;
ok so if you have an image of say 100x100 px on screen and you want to print it the destination image will be of 100*ratio_x and 100*ratio_y
so instead of using BitBlt you have to use StretchBlt to stretch the Bitmap
You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!"
Only kings, presidents, editors, and people with tapeworms have the right to use the editorial "we."
|
|
|
|
|
Hi all,
can anyone tell me about how to detect the frame change in the video file?
Thanks in advance.
Regards,
Ram
|
|
|
|
|
a treectrl such as:
[-]Root1
| |_Lay1Item1
| |_Lay1Item2
| [-]Lay1Item3
| |_Lay2Item1
| |_BB
+Root2
1>.how to get the item handle by its name/string?
2>.how to know the item stay at which lay? for example: Lay1Item1 stay at lay 1, root is 0,BB is lay 2
|
|
|
|
|
(1>.) See GetNextItem(...);
whitesky
|
|
|
|
|
1>.how to get the item handle by its name/string?
->I guess you cannot, what if two nodes having same name? Instead try using GetItem and GetNextitem function.
2>.how to know the item stay at which lay? for example: Lay1Item1 stay at lay 1, root is 0,BB is lay 2
-> SetItemData may help.
Regards
Abhishake Lahare
|
|
|
|
|
thank you for your quick reply.
about 2> in fact, I'v used SetItemData for manage the handle of MDI docs.....
what I want is: aplly different doc template for different lay of item related Doc
|
|
|
|
|
hai every one
i have created one class it contains one big window
and i added some small node(it is also window) to that window.
then when i move the small node on big window
that moving part is changing the color
can any one help me
B.LakshmipathiRao
|
|
|
|
|
i'm not getting ur question, can u give some more information.
how u r moving the smaller windows by code or my mouse?
|
|
|
|
|
Silly question, had a lok in the MSDN but could not find any thing that satisfied my curiosity, how long can a command line be? I´m asking because I am passing a path to a file,plus an SQL query to an external process (using create process), so can I expect any problems regarding a very long SQL query...
Thanks in advance
Phil
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
from stdlib.h on VS.NET
/*
* Sizes for buffers used by the _makepath() and _splitpath() functions.
* note that the sizes include space for 0-terminator
*/
#define _MAX_PATH 260 /* max. length of full pathname */
#define _MAX_DRIVE 3 /* max. length of drive component */
#define _MAX_DIR 256 /* max. length of path component */
#define _MAX_FNAME 256 /* max. length of file name component */
#define _MAX_EXT 256 /* max. length of extension component */
Hope these help
Regards
Abhishake Lahare
|
|
|
|
|
The maximum command line length for the CreateProcess function is 32767 characters
More Info here (Old New thing blog)[^]
You know you're obsessed with computer graphics when you're outside and you look up at the trees and think, "Wow! That's spectacular resolution!"
Only kings, presidents, editors, and people with tapeworms have the right to use the editorial "we."
|
|
|
|
|
Tanks monty, with that mayn characters, I think I´m on the safe side
bum... and I thought I´d got rid of all the bugs
|
|
|
|
|
how to get syetem ip addres in an dialog box
i use ipadress control for that
but can somebody tell me wat code i write on a button to get ip address of the sytem
Ashish Dogra
MCA
Noida
|
|
|
|
|
gethostname() for getting name of system and then call
gethostbyname()
See MSDN for more help on these function
Regards
Abhishake Lahare
|
|
|
|
|
thanks
but can you tell me what are parameters in the gethostname()
as a code to help me
Ashish Dogra
MCA
Noida
|
|
|
|
|
Hi jigar .
void GetIPAddress(char *ipAddress)
{
#define MAX_NAME_LEN 65
WSADATA wsaData;
if ( WSAStartup( MAKEWORD( 2, 2 ), &wsaData ) == 0 )
{
char HostName[MAX_NAME_LEN];
struct in_addr *ptr;
gethostname (HostName,MAX_NAME_LEN);
hostent *host = gethostbyname(HostName);
if(host == NULL)
{
ipAddress = NULL ;
WSACleanup( );
return ;
}
ptr = (struct in_addr *)host->h_addr_list[0];
CString str;
str.Format("%d.%d.%d.%d",
ptr->S_un.S_un_b.s_b1,
ptr->S_un.S_un_b.s_b2,
ptr->S_un.S_un_b.s_b3,
ptr->S_un.S_un_b.s_b4);
strcpy(ipAddress,(char*)str.GetString());
}
WSACleanup( );
}
|
|
|
|
|
|
how can i get the images into listcontrol.
thanx
|
|
|
|
|
Hi,
Use setimagelist function.
Thanks
|
|
|
|
|
ok
thanx for it but i forget to tell u one thing more that i have to Add string
also with image in the next column.these record will be in row.
thanx
|
|
|
|
|
See GetImageList in CListCtrl Members
whitesky
|
|
|
|
|
ok
thanx for it but i forget to tell u one thing more that i have to Add string
also with image in the next column.these record will be in row.
thanx
|
|
|
|
|
See SetItem and SetImageList
whitesky
|
|
|
|
|
How can i find whether a microphone is connected or not in my system?
Thanks,
Poornima
|
|
|
|
|
im not sure see Here[^] maybe it is some helpful to you
whitesky
|
|
|
|