Click here to Skip to main content
15,889,096 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: set wallpaper Pin
Parthi_Appu11-Jul-06 0:49
Parthi_Appu11-Jul-06 0:49 
GeneralRe: set wallpaper [modified] Pin
ashish dogra11-Jul-06 1:19
ashish dogra11-Jul-06 1:19 
GeneralRe: set wallpaper Pin
Parthi_Appu11-Jul-06 2:02
Parthi_Appu11-Jul-06 2:02 
GeneralRe: set wallpaper Pin
ashish dogra11-Jul-06 2:24
ashish dogra11-Jul-06 2:24 
GeneralRe: set wallpaper Pin
David Crow11-Jul-06 5:14
David Crow11-Jul-06 5:14 
GeneralRe: set wallpaper Pin
Parthi_Appu11-Jul-06 17:58
Parthi_Appu11-Jul-06 17:58 
GeneralRe: set wallpaper Pin
Hamid_RT11-Jul-06 19:44
Hamid_RT11-Jul-06 19:44 
QuestionDisplaying problem in Bitmaps Pin
rkshdixit10-Jul-06 23:25
rkshdixit10-Jul-06 23:25 
i want to display different bitmaps of digital no. in subclass static control.i have created an array of handle of HBITMAP and i am getting all the handle in constructor. when i am trying to access from a click of button in dialog its not displaying the digit.
code is below:
// this the derived class constructor
CNewstatic::CNewstatic()
{
for(int i=0;i<=11;i++)// code for getting the handle
{
HBITMAP temp = (HBITMAP)::CreateMappedBitmap(AfxGetApp()->m_hInstance, IDB_BITMAP1+i, 0, NULL, 0);
m_hBitmap[i] = (HBITMAP)::CopyImage( temp, IMAGE_BITMAP, 0, 0, LR_COPYRETURNORG | LR_COPYDELETEORG);
}

}

after a button click i am accessing the objects in a method//

void CNewstatic ::OutPut(int digit,int pos)
{
CRect rect;
GetClientRect(&rect);
m_w = rect.Width()/8;
m_h = rect.Height();
pos =0;
//CBitmap* pBitmap ;//CBitmap::FromHandle( m_hBitmap[digit]);
CClientDC dc(this);
CDC dcMem;
dcMem.CreateCompatibleDC(&dc);

//pBitmap->LoadBitmap(IDB_BITMAP1);
CBitmap* pBitmap = CBitmap::FromHandle( m_hBitmap[0]);
CBitmap* pOldBitmap = dcMem.SelectObject(pBitmap);



dcMem.SelectObject(pOldBitmap);

int f = dc.StretchBlt(m_w*pos, 0, m_w, m_h,
&dcMem, 0, 0, m_bm.bmWidth, m_bm.bmHeight, SRCCOPY);
if(f)
AfxMessageBox("Create");
else
AfxMessageBox("Not Create");
dcMem.DeleteDC();


}
it gives create message after clicking the button but image is not displayed .
please tell me the reason and solution of the problem.
AnswerRe: Displaying problem in Bitmaps Pin
Justin Tay10-Jul-06 23:45
Justin Tay10-Jul-06 23:45 
GeneralRe: Displaying problem in Bitmaps Pin
rkshdixit11-Jul-06 1:05
rkshdixit11-Jul-06 1:05 
GeneralRe: Displaying problem in Bitmaps Pin
Justin Tay11-Jul-06 6:58
Justin Tay11-Jul-06 6:58 
QuestionLoad String From Resource (String Table) Pin
mehmetned10-Jul-06 23:19
mehmetned10-Jul-06 23:19 
AnswerRe: Load String From Resource (String Table) Pin
Parthi_Appu10-Jul-06 23:30
Parthi_Appu10-Jul-06 23:30 
GeneralRe: Load String From Resource (String Table) Pin
mehmetned10-Jul-06 23:36
mehmetned10-Jul-06 23:36 
GeneralRe: Load String From Resource (String Table) Pin
toxcct10-Jul-06 23:39
toxcct10-Jul-06 23:39 
GeneralRe: Load String From Resource (String Table) Pin
mehmetned11-Jul-06 0:33
mehmetned11-Jul-06 0:33 
GeneralRe: Load String From Resource (String Table) Pin
toxcct11-Jul-06 2:23
toxcct11-Jul-06 2:23 
GeneralRe: Load String From Resource (String Table) Pin
Parthi_Appu10-Jul-06 23:50
Parthi_Appu10-Jul-06 23:50 
GeneralRe: Load String From Resource (String Table) Pin
mehmetned11-Jul-06 0:28
mehmetned11-Jul-06 0:28 
GeneralRe: Load String From Resource (String Table) Pin
mehmetned11-Jul-06 0:30
mehmetned11-Jul-06 0:30 
GeneralRe: Load String From Resource (String Table) Pin
Parthi_Appu11-Jul-06 0:37
Parthi_Appu11-Jul-06 0:37 
GeneralRe: Load String From Resource (String Table) Pin
mehmetned11-Jul-06 0:53
mehmetned11-Jul-06 0:53 
GeneralRe: Load String From Resource (String Table) Pin
Parthi_Appu11-Jul-06 0:59
Parthi_Appu11-Jul-06 0:59 
GeneralRe: Load String From Resource (String Table) Pin
David Crow11-Jul-06 5:16
David Crow11-Jul-06 5:16 
QuestionModeless Dialog in MDI app [modified] Pin
eusto10-Jul-06 23:01
eusto10-Jul-06 23:01 

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.