Click here to Skip to main content
16,005,149 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CListBox takes up 100% CPU usage Pin
Tomasz Sowinski9-Aug-02 1:02
Tomasz Sowinski9-Aug-02 1:02 
GeneralRe: CListBox takes up 100% CPU usage Pin
Anonymous11-Aug-02 22:29
Anonymous11-Aug-02 22:29 
GeneralRe: CListBox takes up 100% CPU usage Pin
Shog99-Aug-02 4:45
sitebuilderShog99-Aug-02 4:45 
GeneralRe: CListBox takes up 100% CPU usage Pin
KHYEE12-Aug-02 18:32
KHYEE12-Aug-02 18:32 
GeneralRe: CListBox takes up 100% CPU usage Pin
Shog912-Aug-02 19:02
sitebuilderShog912-Aug-02 19:02 
GeneralInserting bitmap into RTF Pin
Hans Ruck9-Aug-02 0:31
Hans Ruck9-Aug-02 0:31 
GeneralCBitmap vs. HBITMAP Pin
[CoY0te]9-Aug-02 0:23
[CoY0te]9-Aug-02 0:23 
GeneralRe: CBitmap vs. HBITMAP Pin
[CoY0te]9-Aug-02 1:43
[CoY0te]9-Aug-02 1:43 
I have solved that problem by coding my conversion this way:
<br />
CDC * pdc;<br />
CBitmap * OldBitmap;<br />
<br />
pdc=new CDC;<br />
pdc->CreateCompatibleDC(NULL);<br />
OldBitmap=pdc->SelectObject(Target);<br />
<br />
//this part of code is looped<br />
 pdc->GetPixel(Point)<br />
 ...<br />
 //Color conversion<br />
 ...<br />
 pdc->SetPixelV(Point,Color)<br />
<br />
pdc->SelectObject(OldBitmap);<br />
pdc->DeleteDC();<br />
delete pdc;<br />


It works allright, but only because these images are small (9x15). Using GetPixel / SetPixelV is kinda slow i guess.
It would be better to have a direct access to 24bpp image, but I haven't figured out how to load a resource into CBitmap object as 24bpp image every time.

If someone has any better idea to do it faster without writting a bunch of code, then let me know please.

Greetings.

[ CoY0te ]
Railgun is like a Gilette Mach 3 - it does the job with one, easy stroke.
GeneralRe: CBitmap vs. HBITMAP Pin
Ernest Laurentin9-Aug-02 6:36
Ernest Laurentin9-Aug-02 6:36 
Generalstarting an EXE-Application at an other network PC Pin
Ralph8-Aug-02 23:52
Ralph8-Aug-02 23:52 
GeneralRe: starting an EXE-Application at an other network PC Pin
Jeremy Pullicino9-Aug-02 0:13
Jeremy Pullicino9-Aug-02 0:13 
GeneralRe: starting an EXE-Application at an other network PC Pin
Jason Henderson9-Aug-02 3:20
Jason Henderson9-Aug-02 3:20 
GeneralRe: starting an EXE-Application at an other network PC Pin
Daniel Lohmann9-Aug-02 5:56
Daniel Lohmann9-Aug-02 5:56 
Generalscroll bar size in CSrollView Pin
mishgun8-Aug-02 23:49
mishgun8-Aug-02 23:49 
GeneralRe: scroll bar size in CSrollView Pin
Roger Allen9-Aug-02 0:46
Roger Allen9-Aug-02 0:46 
GeneralCOM smart pointers and STL vector Pin
Jeremy Pullicino8-Aug-02 23:38
Jeremy Pullicino8-Aug-02 23:38 
GeneralRe: COM smart pointers and STL vector Pin
Joao Vaz9-Aug-02 0:46
Joao Vaz9-Aug-02 0:46 
GeneralRe: COM smart pointers and STL vector Pin
Tim Smith9-Aug-02 2:27
Tim Smith9-Aug-02 2:27 
GeneralRe: COM smart pointers and STL vector Pin
Joao Vaz9-Aug-02 2:35
Joao Vaz9-Aug-02 2:35 
GeneralRe: link to discussion groups ... Pin
Joao Vaz9-Aug-02 2:33
Joao Vaz9-Aug-02 2:33 
GeneralRetrieve prompt message in a file from command MsDos Pin
youssef8-Aug-02 23:11
youssef8-Aug-02 23:11 
GeneralRe: Retrieve prompt message in a file from command MsDos Pin
Hans Ruck9-Aug-02 2:14
Hans Ruck9-Aug-02 2:14 
GeneralSave informations with MFC Pin
Mic8-Aug-02 22:53
Mic8-Aug-02 22:53 
GeneralRe: Save informations with MFC Pin
Tomasz Sowinski9-Aug-02 1:30
Tomasz Sowinski9-Aug-02 1:30 
GeneralWindows Shutdown from VC Pin
Nick Young8-Aug-02 22:20
Nick Young8-Aug-02 22:20 

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.