Click here to Skip to main content
15,905,782 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to create delay. Pin
Chanda.com6-May-02 21:32
Chanda.com6-May-02 21:32 
AnswerRe: How to create delay. Pin
Paul M Watt6-May-02 21:46
mentorPaul M Watt6-May-02 21:46 
GeneralRe: How to create delay. Pin
Chanda.com6-May-02 22:04
Chanda.com6-May-02 22:04 
GeneralRe: How to create delay. Pin
Sameer Maggon6-May-02 22:27
Sameer Maggon6-May-02 22:27 
GeneralTime Delay in rendering(DirectX) Pin
VCRamesh6-May-02 21:26
VCRamesh6-May-02 21:26 
GeneralRe: Time Delay in rendering(DirectX) Pin
Sameer Maggon7-May-02 0:06
Sameer Maggon7-May-02 0:06 
GeneralRe: Time Delay in rendering(DirectX) Pin
VCRamesh7-May-02 1:51
VCRamesh7-May-02 1:51 
Generalprinting bitmap problem Pin
BlackRider6-May-02 20:59
BlackRider6-May-02 20:59 
Hello
I'm trying to print a bitmap from the resources. The bitmap has more than 256 colours. The idea is that i transfered my program from winnt 4.0 to windows xp. On the windows nt machine the program works. On the windows xp machine the app works only for the local printer; when it comes for the network printers i get an empty page. Why is that ? Somebody pls help me ... The prog is compiled with visual c++ 6.0. Here is the code in the OnDraw function - the only code i added :
int x=0, y=0;
CRect rcClient; GetClientRect(&rcClient);
if(pDC->IsPrinting()){
x = pDC->GetDeviceCaps(HORZRES);
y = pDC->GetDeviceCaps(VERTRES);
}
else {
x=rcClient.Width();
y=rcClient.Height();
}
CBitmap bmp;
bmp.LoadBitmap(IDB_BITMAP8);
CDC memDC;
memDC.CreateCompatibleDC(NULL);
BITMAP bm;
bmp.GetObject( sizeof(BITMAP), &bm );
CBitmap* pOldBitmap = memDC.SelectObject(&bmp);
pDC->StretchBlt(0,0,x,y, &memDC, 0,0, bm.bmWidth,bm.bmHeight, SRCCOPY);
P.S. I would appreciate almost any good advice. This printing thing is something i wasn't able to find in any book (i mean printing a bitmap). This is sort of my only hope. Smile | :)
GeneralRe: printing bitmap problem Pin
Jonathan Craig7-May-02 5:33
Jonathan Craig7-May-02 5:33 
GeneralValidate a IP in CString Pin
Sameer Maggon6-May-02 20:08
Sameer Maggon6-May-02 20:08 
GeneralRe: Validate a IP in CString Pin
moliate7-May-02 7:50
moliate7-May-02 7:50 
GeneralCritical Sections (Semaphores etc..) Pin
Sameer Maggon6-May-02 20:04
Sameer Maggon6-May-02 20:04 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Joaquín M López Muñoz6-May-02 21:03
Joaquín M López Muñoz6-May-02 21:03 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Sameer Maggon6-May-02 21:12
Sameer Maggon6-May-02 21:12 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Joaquín M López Muñoz6-May-02 21:15
Joaquín M López Muñoz6-May-02 21:15 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Sameer Maggon6-May-02 21:30
Sameer Maggon6-May-02 21:30 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Sameer Maggon6-May-02 21:36
Sameer Maggon6-May-02 21:36 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Joaquín M López Muñoz6-May-02 22:20
Joaquín M López Muñoz6-May-02 22:20 
GeneralRe: Critical Sections (Semaphores etc..) Pin
Jonathan Craig7-May-02 7:29
Jonathan Craig7-May-02 7:29 
GeneralGetOverlapedresult Pin
meirav6-May-02 19:24
meirav6-May-02 19:24 
GeneralDetermining Data Size For Network Send/Rec :: Winsock Pin
valikac6-May-02 18:55
valikac6-May-02 18:55 
GeneralRe: Determining Data Size For Network Send/Rec :: Winsock Pin
Niklas L6-May-02 21:24
Niklas L6-May-02 21:24 
GeneralRe: Determining Data Size For Network Send/Rec :: Winsock Pin
valikac6-May-02 21:38
valikac6-May-02 21:38 
GeneralRe: Determining Data Size For Network Send/Rec :: Winsock Pin
Rickard Andersson206-May-02 21:45
Rickard Andersson206-May-02 21:45 
GeneralRe: Determining Data Size For Network Send/Rec :: Winsock Pin
6-May-02 21:56
suss6-May-02 21:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.