Click here to Skip to main content
16,016,134 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralCenter dialog to the screen Pin
RomTibi9-Apr-08 5:52
RomTibi9-Apr-08 5:52 
GeneralRe: Center dialog to the screen Pin
David Crow9-Apr-08 5:58
David Crow9-Apr-08 5:58 
GeneralRe: Center dialog to the screen Pin
Hamid_RT11-Apr-08 7:10
Hamid_RT11-Apr-08 7:10 
GeneralProb with Bitmap Pin
Schehaider_Aymen9-Apr-08 5:16
Schehaider_Aymen9-Apr-08 5:16 
QuestionRe: Prob with Bitmap Pin
David Crow9-Apr-08 5:20
David Crow9-Apr-08 5:20 
GeneralRe: Prob with Bitmap Pin
Schehaider_Aymen9-Apr-08 5:30
Schehaider_Aymen9-Apr-08 5:30 
GeneralRe: Prob with Bitmap Pin
Schehaider_Aymen9-Apr-08 5:39
Schehaider_Aymen9-Apr-08 5:39 
GeneralRe: Prob with Bitmap Pin
Mark Salsbery9-Apr-08 5:44
Mark Salsbery9-Apr-08 5:44 
There's no reason to extract the HBITMAP from a CBitmap into a separate variable.
The handle is available from the CBitmap object any time.

That aside, you need to separate the global variable definitions from the code that
initializes them.  For example:

CNeLoPApp theApp;<br />
CBitmap bitmap;<br />
HBITMAP hBitmap = NULL;<br />
<br />
BOOL 
CNeLoPApp
::InitInstance()<br />
{<br />
    bitmap.LoadBitmap(IDB_BITMAP1);<br />
    hBitmap = (HBITMAP) bitmap.GetSafeHandle();

  ...

Mark



Mark Salsbery
Microsoft MVP - Visual C++

Java | [Coffee]

GeneralRe: Prob with Bitmap Pin
Schehaider_Aymen9-Apr-08 5:48
Schehaider_Aymen9-Apr-08 5:48 
GeneralRe: Prob with Bitmap Pin
Mark Salsbery9-Apr-08 6:07
Mark Salsbery9-Apr-08 6:07 
GeneralRe: Prob with Bitmap Pin
Schehaider_Aymen9-Apr-08 6:13
Schehaider_Aymen9-Apr-08 6:13 
GeneralRe: Prob with Bitmap Pin
Mark Salsbery9-Apr-08 6:17
Mark Salsbery9-Apr-08 6:17 
GeneralRe: Prob with Bitmap Pin
Hamid_RT10-Apr-08 23:52
Hamid_RT10-Apr-08 23:52 
Questionhow to block IPv6 traffic on Win Xp Pin
Ather Zaidi9-Apr-08 5:13
Ather Zaidi9-Apr-08 5:13 
AnswerRe: how to block IPv6 traffic on Win Xp Pin
led mike9-Apr-08 5:51
led mike9-Apr-08 5:51 
GeneralLeaning C++, annoying compile/link error Pin
Jan Sommer9-Apr-08 5:03
Jan Sommer9-Apr-08 5:03 
GeneralRe: Leaning C++, annoying compile/link error Pin
David Crow9-Apr-08 5:24
David Crow9-Apr-08 5:24 
GeneralRe: Leaning C++, annoying compile/link error Pin
Jan Sommer9-Apr-08 5:39
Jan Sommer9-Apr-08 5:39 
GeneralRe: Leaning C++, annoying compile/link error Pin
CPallini9-Apr-08 5:39
mveCPallini9-Apr-08 5:39 
GeneralRe: Leaning C++, annoying compile/link error Pin
Rajesh R Subramanian9-Apr-08 5:44
professionalRajesh R Subramanian9-Apr-08 5:44 
GeneralRe: Leaning C++, annoying compile/link error Pin
CPallini9-Apr-08 5:48
mveCPallini9-Apr-08 5:48 
GeneralMicrosoft Sam Pin
codeinelogic9-Apr-08 4:40
codeinelogic9-Apr-08 4:40 
QuestionRe: Microsoft Sam Pin
David Crow9-Apr-08 4:48
David Crow9-Apr-08 4:48 
GeneralPlease verify the function Pin
bibhakar9-Apr-08 2:53
bibhakar9-Apr-08 2:53 
GeneralRe: Please verify the function Pin
Iain Clarke, Warrior Programmer10-Apr-08 0:08
Iain Clarke, Warrior Programmer10-Apr-08 0:08 

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.