Click here to Skip to main content
16,016,076 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: Choosing between WinMain and main in MC++ Pin
Nish Nishant7-May-02 14:04
sitebuilderNish Nishant7-May-02 14:04 
GeneralRe: Choosing between WinMain and main in MC++ Pin
Rama Krishna Vavilala7-May-02 15:05
Rama Krishna Vavilala7-May-02 15:05 
GeneralRe: Choosing between WinMain and main in MC++ Pin
Nish Nishant7-May-02 15:10
sitebuilderNish Nishant7-May-02 15:10 
GeneralRe: Choosing between WinMain and main in MC++ Pin
Rama Krishna Vavilala7-May-02 15:38
Rama Krishna Vavilala7-May-02 15:38 
GeneralAre there any easy methods to... Pin
Nish Nishant3-May-02 14:04
sitebuilderNish Nishant3-May-02 14:04 
GeneralRe: Are there any easy methods to... Pin
James T. Johnson3-May-02 14:40
James T. Johnson3-May-02 14:40 
GeneralRe: Are there any easy methods to... Pin
Nish Nishant3-May-02 14:42
sitebuilderNish Nishant3-May-02 14:42 
GeneralRe: Are there any easy methods to... Pin
James T. Johnson3-May-02 15:07
James T. Johnson3-May-02 15:07 
Nish [BusterBoy] wrote:
As if I know how to do that with GDI

Ask (ok imply) and ye shall receive Smile | :)

Courtesy of MSDN

// Create a normal DC and a memory DC for the entire screen. The 
// normal DC provides a "snapshot" of the screen contents. The 
// memory DC keeps a copy of this "snapshot" in the associated 
// bitmap. 
 
hdcScreen = CreateDC("DISPLAY", NULL, NULL, NULL); 
hdcCompatible = CreateCompatibleDC(hdcScreen); 
 
// Create a compatible bitmap for hdcScreen. 
 
hbmScreen = CreateCompatibleBitmap(hdcScreen, 
                     GetDeviceCaps(hdcScreen, HORZRES), 
                     GetDeviceCaps(hdcScreen, VERTRES)); 
 
if (hbmScreen == 0) 
    errhandler("hbmScreen", hwnd); 
 
// Select the bitmaps into the compatible DC. 
 
if (!SelectObject(hdcCompatible, hbmScreen)) 
    errhandler("Compatible Bitmap Selection", hwnd); 
 
// Hide the application window. 
 
ShowWindow(hwnd, SW_HIDE); 
 
//Copy color data for the entire display into a 
//bitmap that is selected into a compatible DC. 
 
if (!BitBlt(hdcCompatible, 
        0,0, 
        bmp.bmWidth, bmp.bmHeight, 
        hdcScreen, 
        0,0, 
        SRCCOPY)) 
  
        errhandler("Screen to Compat Blt Failed", hwnd); 
 
// Redraw the application window. 
 
ShowWindow(hwnd, SW_SHOW);
James

Simplicity Rules!

[Edit: You obviously won't need the calls to ShowWindow, you can just call Show and Hide on the form Smile | :) ]
GeneralRe: Are there any easy methods to... Pin
Nish Nishant3-May-02 15:15
sitebuilderNish Nishant3-May-02 15:15 
GeneralRe: Are there any easy methods to... Pin
James T. Johnson3-May-02 15:22
James T. Johnson3-May-02 15:22 
GeneralRe: Are there any easy methods to... Pin
Christian Graus5-May-02 20:33
protectorChristian Graus5-May-02 20:33 
GeneralRe: Are there any easy methods to... Pin
Neil Van Note5-May-02 21:24
Neil Van Note5-May-02 21:24 
GeneralRe: Are there any easy methods to... Pin
Neil Van Note5-May-02 22:21
Neil Van Note5-May-02 22:21 
GeneralRe: Are there any easy methods to... Pin
Nish Nishant6-May-02 17:12
sitebuilderNish Nishant6-May-02 17:12 
GeneralRe: Are there any easy methods to... Pin
Neil Van Note6-May-02 17:16
Neil Van Note6-May-02 17:16 
GeneralRe: Are there any easy methods to... Pin
Rama Krishna Vavilala3-May-02 14:58
Rama Krishna Vavilala3-May-02 14:58 
GeneralRe: Are there any easy methods to... Pin
Nish Nishant3-May-02 15:02
sitebuilderNish Nishant3-May-02 15:02 
GeneralRe: Are there any easy methods to... Pin
James T. Johnson3-May-02 15:05
James T. Johnson3-May-02 15:05 
QuestionC++ IJW - Any good intro? Pin
Nish Nishant3-May-02 5:57
sitebuilderNish Nishant3-May-02 5:57 
AnswerRe: C++ IJW - Any good intro? Pin
Nish Nishant3-May-02 7:27
sitebuilderNish Nishant3-May-02 7:27 
GeneralRe: C++ IJW - Any good intro? Pin
Kannan Kalyanaraman6-May-02 19:55
Kannan Kalyanaraman6-May-02 19:55 
AnswerRe: C++ IJW - Any good intro? Pin
Tom Archer3-May-02 7:29
Tom Archer3-May-02 7:29 
GeneralRe: C++ IJW - Any good intro? Pin
Nish Nishant3-May-02 7:37
sitebuilderNish Nishant3-May-02 7:37 
GeneralRe: C++ IJW - Any good intro? Pin
Tom Archer3-May-02 10:05
Tom Archer3-May-02 10:05 
GeneralEssential Guide To Managed Extensions For C++ advice Pin
Joao Vaz3-May-02 5:20
Joao Vaz3-May-02 5: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.