Click here to Skip to main content
15,890,512 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to use InvokeHelper function in C++? Pin
PhanMinhDuy10-Oct-07 22:37
PhanMinhDuy10-Oct-07 22:37 
Question[SOLVED]type specifier for UINT64 Pin
chandu00410-Oct-07 22:36
chandu00410-Oct-07 22:36 
AnswerRe: type specifier for UINT64 Pin
Nelek10-Oct-07 22:51
protectorNelek10-Oct-07 22:51 
AnswerRe: type specifier for UINT64 Pin
Nibu babu thomas10-Oct-07 22:52
Nibu babu thomas10-Oct-07 22:52 
General[SOLVED] thanks Pin
chandu00410-Oct-07 22:59
chandu00410-Oct-07 22:59 
Questionhdc to Bitmap Pin
GauranG Shah10-Oct-07 22:11
GauranG Shah10-Oct-07 22:11 
AnswerRe: hdc to Bitmap Pin
Mark Salsbery11-Oct-07 12:50
Mark Salsbery11-Oct-07 12:50 
GeneralRe: hdc to Bitmap [modified] Pin
GauranG Shah11-Oct-07 18:59
GauranG Shah11-Oct-07 18:59 
Thnk you vary much for you help. But still I am not able to perform the thing.
I am doing something like this as you have told me to do.

But getting NULL in hOLdBM. and So getting BLANK Image (black Image)


HDC DeskDC = GetDC(NULL);
HDC hdcStatic = GetDC(hWndStatic);
HBITMAP hb = CreateCompatibleBitmap(hdcStatic,200,200);
 //Getting NULL(0x000000) in hOldBM. When I check The error Code it Show 0x00000005. Means "ACCESS DENIED"
HGDIOBJ hOldBM = SelectObject(hdcStatic,hb);   
SelectObject(hdcStatic, hOldBM);

SetWindowLong(hWndStatic,GWL_STYLE,(GetWindowLong(hWndStatic,GWL_STYLE) & ~SS_TYPEMASK) | SS_BITMAP) ;
BitBlt(hdcStatic,0,0,200,200,DeskDC,0,0,SRCCOPY);
SelectObject(hdcStatic, hOldBM);
 
//Gettting noting in the Picture Control         
SendMessage(hWndStatic, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hOldBM); 

//Blank Image (Black Colored)
SendMessage(hWndStatic, STM_SETIMAGE, IMAGE_BITMAP, (LPARAM)hb); 



-- modified at 2:00 Friday 12th October, 2007


GeneralRe: hdc to Bitmap Pin
Mark Salsbery11-Oct-07 20:56
Mark Salsbery11-Oct-07 20:56 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 22:58
GauranG Shah11-Oct-07 22:58 
GeneralRe: hdc to Bitmap Pin
Mark Salsbery12-Oct-07 4:57
Mark Salsbery12-Oct-07 4:57 
GeneralRe: hdc to Bitmap [SOLVED] Pin
GauranG Shah11-Oct-07 23:51
GauranG Shah11-Oct-07 23:51 
GeneralRe: hdc to Bitmap [SOLVED] Pin
Mark Salsbery12-Oct-07 4:58
Mark Salsbery12-Oct-07 4:58 
GeneralRe: hdc to Bitmap Pin
GauranG Shah10-Oct-07 23:24
GauranG Shah10-Oct-07 23:24 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 0:46
GauranG Shah11-Oct-07 0:46 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 2:00
GauranG Shah11-Oct-07 2:00 
GeneralRe: hdc to Bitmap Pin
Nelek11-Oct-07 2:39
protectorNelek11-Oct-07 2:39 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 2:53
GauranG Shah11-Oct-07 2:53 
GeneralRe: hdc to Bitmap [modified] Pin
Nelek11-Oct-07 3:11
protectorNelek11-Oct-07 3:11 
GeneralRe: hdc to Bitmap Pin
GauranG Shah11-Oct-07 3:35
GauranG Shah11-Oct-07 3:35 
GeneralRe: hdc to Bitmap [modified] Pin
Nelek11-Oct-07 20:29
protectorNelek11-Oct-07 20:29 
GeneralRe: hdc to Bitmap Pin
Mark Salsbery11-Oct-07 20:51
Mark Salsbery11-Oct-07 20:51 
GeneralRe: hdc to Bitmap Pin
Nelek15-Oct-07 23:01
protectorNelek15-Oct-07 23:01 
QuestionGrid computing and Virtualization Pin
GeraldGg10-Oct-07 21:43
GeraldGg10-Oct-07 21:43 
QuestionLPNMITEMACTIVATE is always giving iItem as -1 Pin
yaminisridaran10-Oct-07 21:25
yaminisridaran10-Oct-07 21: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.