Click here to Skip to main content
15,881,380 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 23:12
deadlyabbas16-Sep-09 23:12 
GeneralRe: How to load PDF file on any button click in VC++? Pin
Nuri Ismail17-Sep-09 0:50
Nuri Ismail17-Sep-09 0:50 
AnswerRe: How to load PDF file on any button click in VC++? Pin
CPallini16-Sep-09 22:51
mveCPallini16-Sep-09 22:51 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 23:36
deadlyabbas16-Sep-09 23:36 
AnswerRe: How to load PDF file on any button click in VC++? Pin
David Crow17-Sep-09 2:25
David Crow17-Sep-09 2:25 
AnswerRe: How to load PDF file on any button click in VC++? Pin
ThatsAlok16-Sep-09 23:49
ThatsAlok16-Sep-09 23:49 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas17-Sep-09 0:04
deadlyabbas17-Sep-09 0:04 
QuestionAbout Class CImage::GetPixel [modified] Pin
zhong_min16-Sep-09 21:54
zhong_min16-Sep-09 21:54 
Here is my code:
vector<int>  CPanoCylinderImage::RGBofPixel(CImage image, int x, int y)
{ 
    vector<int> vect; 
    COLORREF cr = image.GetPixel(x, y); 
    BYTE r = GetRValue(cr); 
    BYTE g = GetGValue(cr); 
    BYTE b = GetBValue(cr); 

    vect.push_back((int)r); 
    vect.push_back((int)g); 
    vect.push_back((int)b); 

    return vect; 
} 

float CPanoCylinderImage::IntensityOfPixel(CImage image, int x, int y)
{ 
    vector<int> vect = RGBofPixel(image, x, y); 
    return 0.30f * vect.at(0) + 0.59f * vect.at(1) + 0.11f * vect.at(2); 
} 

float CPanoCylinderImage::LuminanceDifference(CImage image1, CImage image2, int length) 
{ 
    float diff = 0.0; 
    float sum = 0.0; 
    float intensity = 0.0; 
    vector<float> vectImage1, vectImage2; 
    //Calculate intensity
    for(int i = 0; i < image1.GetHeight(); i++) 
    { 
        for(int j = image1.GetWidth() - length; j < image1.GetWidth(); j++) 
        { 
            intensity = IntensityOfPixel(image1, j, i); 
            vectImage1.push_back(intensity); 
        } 
    } 
    //............ 

    return /*...*/; 
} 


image1 and image2 have been loaded correctly.When I calculate intensity first time, I got the right RGB value and intensity value. But second time, I got Debug Assertion Failed when it run statement "COLORREF cr = image.GetPixel(x, y);", messagebox told me that

File: ...........\atlimage.h
Line: 1217

Expression: hBitmap == m_hBitmap

Anybody know what's happening?

modified on Thursday, September 17, 2009 4:03 AM

AnswerRe: About Class CImage::GetPixel Pin
CPallini16-Sep-09 22:18
mveCPallini16-Sep-09 22:18 
GeneralRe: About Class CImage::GetPixel Pin
zhong_min16-Sep-09 22:44
zhong_min16-Sep-09 22:44 
GeneralRe: About Class CImage::GetPixel Pin
CPallini16-Sep-09 23:32
mveCPallini16-Sep-09 23:32 
QuestionAccess a shared folder form server to client by giving usename ,password in program Pin
ranjithgoud16-Sep-09 21:21
ranjithgoud16-Sep-09 21:21 
AnswerRe: Access a shared folder form server to client by giving usename ,password in program Pin
CPallini16-Sep-09 21:53
mveCPallini16-Sep-09 21:53 
GeneralRe: Access a shared folder form server to client by giving usename ,password in program Pin
ranjithgoud17-Sep-09 1:49
ranjithgoud17-Sep-09 1:49 
AnswerRe: Access a shared folder form server to client by giving usename ,password in program Pin
David Crow17-Sep-09 2:30
David Crow17-Sep-09 2:30 
GeneralRe: Access a shared folder form server to client by giving usename ,password in program Pin
ranjithgoud18-Sep-09 2:44
ranjithgoud18-Sep-09 2:44 
AnswerRe: Access a shared folder form server to client by giving usename ,password in program Pin
David Crow18-Sep-09 4:15
David Crow18-Sep-09 4:15 
Questionbitblt prob Pin
Game-point16-Sep-09 21:14
Game-point16-Sep-09 21:14 
AnswerRe: bitblt prob Pin
CPallini16-Sep-09 21:46
mveCPallini16-Sep-09 21:46 
GeneralRe: bitblt prob Pin
Game-point16-Sep-09 22:04
Game-point16-Sep-09 22:04 
GeneralRe: bitblt prob Pin
Nuri Ismail16-Sep-09 22:11
Nuri Ismail16-Sep-09 22:11 
GeneralRe: bitblt prob Pin
CPallini16-Sep-09 22:12
mveCPallini16-Sep-09 22:12 
QuestionHow to get threads in a custom threadpool to not require locks when enabling/disabling threads? Pin
Cyrilix16-Sep-09 21:00
Cyrilix16-Sep-09 21:00 
AnswerRe: How to get threads in a custom threadpool to not require locks when enabling/disabling threads? Pin
Stuart Dootson16-Sep-09 21:24
professionalStuart Dootson16-Sep-09 21:24 
GeneralRe: How to get threads in a custom threadpool to not require locks when enabling/disabling threads? Pin
Cyrilix17-Sep-09 6:25
Cyrilix17-Sep-09 6:25 

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.