|
good work. keep it up.;)
I think dialog box is basically a window. as I recall the MFC hierarchy. so, thats why what you thought has worked.
|
|
|
|
|
Hi..Everybody..
:|My problem is:
I want to save my drawing in Tiff format (in painbrush like application)..
Now as I draw any shape or Image(BitBlt)..then I want all my matter in CDC is saved in Tiff format...
Can any body guide me to convert memory DC to Tiff file using MFC.
I hope u help me..;)
Thanks...sumit;)
Sumit Kapoor
|
|
|
|
|
u need to get a tiff library (cximage on cp does the trick nicely) or figure out the format urself
best get cximage
"there is no spoon" biz stuff about me
|
|
|
|
|
Hi..
Thanks for reply...
I'm using LibTiff library for tiff.
The problem is how to provide data to tiff file..
As I draw in CDC & all drawing want to transfer to tiff..
Issue is how to pick that drawing & place in tiff...
Plz help me if u know in this side..
Thanks
Sumit
Sumit Kapoor
|
|
|
|
|
Hello
i have been trying to get RGB values from a 24bit BITMAP following is the code :
bitmap = (HBITMAP)LoadImage(NULL,path,IMAGE_BITMAP,0,0,
LR_LOADFROMFILE | LR_CREATEDIBSECTION);
::GetObject(bitmap,sizeof(bm),&bm);
BYTE *pix = (BYTE*) bm.bmBits; //bm is of type BITMAP
pixels pixel[216][331]; //file opened is 216 * 331
CClientDC dc(this);
int k = 0;
for(int j = 0; j <= height-1 ; j ++)
{
for(int i = 0; i <= width-1; i ++)
{
pixel[j][i].blue = pix[k++];
pixel[j][i].green = pix[k++];
pixel[j][i].red = pix[k++];
dc.SetPixel(i,j,RGB(pixel[j][i].red,pixel[j][i].green,pixel[j] [i].blue));
}
}
I am trying to figure out the problem i cant find it help me please the result that is displayed is not the correct image i mean its all inverted and rotated i dont understand the pixels values are there how to ARRANGE them please help me out
|
|
|
|
|
arent dc's inverted?
try drawing from the bottom up
"there is no spoon" biz stuff about me
|
|
|
|
|
In VC6.0,I can't open the CDex project.The following is the content of the project's helpful file:
"CDex can be compiled with the MICROSFT VISUAL C compiler, version 6.0. The project
files are included. Make sure though, when you've downloaded the cdex_src.tgz file
that you unzip the files as DOS text files and not as UNIX text files (MSVC does
not like DSW project file that are in UNIX text file format). In addition you need
to download the lame source code (or you can delete the LameMp3EncDll and libmp3lame files
from the project workspace).
Once you have installed everything, open the cdex.dsw project file (double click on
on it), and select the proper configuration (either 'CDex - Win32 Debug' or
'CDex - Win32 Release' and select Build/Rebuild All menu option.
In order to run CDex from MSVC, set the working directory (project settings/debug) to
the root of the cdexos project, e.g. c:\CVS\cdexos)
"
Please tell me how to do to open it!
Rap off for you,for me,for our human.
|
|
|
|
|
What is the error?
- Mike
|
|
|
|
|
The VC6.0 does not make response!
Rap off for you,for me,for our human.
|
|
|
|
|
In the forum,I haven't found the funcion to only list own posted messages?
Please help!
Rap off for you,for me,for our human.
|
|
|
|
|
Go to your profile (click on your name in the upper-lefthand corner, next to "Search"), then click on "Messages Posted".
- Mike
|
|
|
|
|
Hi,
I am working on a project in which I am getting the DIBs and text data from TCP/IP sockets. I have to overlay this text on the DIBs.
But restriction is that I can not use the CDC:: DrawText() and CDC:: TextOut() methods. Reason is that my original data is coming from a TCP/IP socket as DIBs. If I use a DC object to overlay the text then I might loose the original colors of the DIB if current display settings has lesser colors then the origibal DIBs. I need a method which overlay the text on DIBs itself, without loosing any color/display info. Is there any API available to overlay text on DIBs without loosing any color info?????????????????????????
I have an approach: I will create a transparent Bitmap, overlay the text using CDC:: DrawText() / TextOut() at given positions on that transparent Bitmap and then use GetDIBBits() to get the DIB of transparent bitmap. This DIB has text overlayed on it. Now I will merge my original DIB with this transparent DIB. It will have text overlayed on original DIB. This way, my text will be overlayed on the original DIBs and I will also not loose any information of the original DIBs. Is there any way to merge two DIBs??????????????????????????
Pls help me out. I can not loose the colors of my image.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Pls reply me directly at: 'swal' at 'momentum-tech' dot 'com'
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
Hello people
well i am really having a hard time handling BMPs. My object is to get the RGB values from a BITMAP image which can anything like a 8 16 or 24 bit image. for simplicity i am using just the 24 bit BMP i have used BITMAP HBITMAP and CBitmap class in the end i got the bytes from the 24 bit image like this
BYTE *pix = (BYTE*)bm.bmBits;
where bm is of type BITMAP but something is wrong when i am drawing the pixels on the screen using the setPixel function i image is not drawn correctly and i dont seem to figure out the problem please help me i need the RGB values for an IMAGE PROCESSING PROJECT i am finding it really hard to get the values and please do not refer to me packages like cximage and stuff i dont want to use any library just tell me how to get the RGB values from a BMP file
|
|
|
|
|
add the bmp to ur resources
then
CBitmap bm;
bm.LoadBitmap(IDC_BITMAP1);
in onpaint
CDC memDC;
memDC.CreateCompatibleDC(&dc);
memDC.SelectObject(&bm);
dc.BitBlt(0,0,width,height,&memDC,0,0,SRCCOPY);
|
|
|
|
|
hello,im looking for some information regarding executing files in c++,i have used the WinExec() function to execute files in a certain directory,however this file will only execute programs with the .exe file extension.
so if i want to open a file like soandso.txt how do i associate it with a program like notepad,or why dosent the .txt file open with its default asscociated Program?
for instance if i wanted to open a .pdf file,and im using the WinExec function why wouldnt the .pdf file automatically run in say adobe acrobat reader,or another e-book reader.
do i need to pass the file name as a parameter to a program or something?
any information would greatly be appriciated.
chris
|
|
|
|
|
|
yep,this looks like the agsact kind of function i am looking for!
thanks m8t
chris
|
|
|
|
|
how i got started was the C++ for dummies u should buy it
|
|
|
|
|
wow,thats really good advice....you got a link by any chance,i hate paying 4 stuff like that....
|
|
|
|
|
hi there,
how do you convert
"0x3a" to an integer (note the quotes)
atoi doesn't work
any ideas ?
CString str = "3a";
how to convert it in to decimal
|
|
|
|
|
|
My application connects to the internet using functions in ras32.dll
I would like to know if my system is connected to the ineternet?
I've used the following code but it returns false both when connected or disconnected
Online()
{
BOOL bRet;
DWORD dwState = 0;
DWORD dwSize = sizeof(DWORD);
bRet = InternetQueryOption(NULL,
INTERNET_OPTION_CONNECTED_STATE, &dwState, &dwSize)
&& (dwState & INTERNET_STATE_CONNECTED);
return bRet;
}
|
|
|
|
|
|
I am trying to make a backup utility for outlook
i found many password recovery tools , but nothing about how all this stuff was developed , what is the format of these pst files
thanks
Willy
|
|
|
|
|
i know we can write program for macintosh using Microsoft Visual c++ crosss platfrom edition.
but there are one or two problems.
1)Latest version for cross platfrom edition i found is 4.0 that is with respect to MFC4.0(Microsoft visual c++ 4.0 cross platfrom edition) .So what about the latest compiler version such as 5.0,6.0,7.0
2)Second question where can i get this comiler(specially for free)
so can anyone help.
3)Every articale i found in msdn and other sources about Programming macintosh has been writtn in 90's(95,96) .
what is the reason of it.
No Worries!
|
|
|
|