Click here to Skip to main content
15,914,165 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalstd::string Pin
Shamoon11-Aug-02 20:47
Shamoon11-Aug-02 20:47 
GeneralRe: std::string Pin
Todd Smith11-Aug-02 20:54
Todd Smith11-Aug-02 20:54 
GeneralStuctures and pointer Pin
awillie11-Aug-02 17:25
awillie11-Aug-02 17:25 
GeneralRe: Stuctures and pointer Pin
Christian Graus11-Aug-02 17:34
protectorChristian Graus11-Aug-02 17:34 
GeneralRe: Stuctures and pointer Pin
Todd Smith11-Aug-02 21:01
Todd Smith11-Aug-02 21:01 
GeneralRe: View to Dialog Box Pin
Ancient Dragon11-Aug-02 17:07
Ancient Dragon11-Aug-02 17:07 
GeneralRe: View to Dialog Box Pin
Solero11-Aug-02 18:31
Solero11-Aug-02 18:31 
GeneralRe: View to Dialog Box Pin
Ancient Dragon11-Aug-02 22:57
Ancient Dragon11-Aug-02 22:57 
You can do it in the dialogs OnPaint event as shown below. Most of this was generated by the wizard when I started the project. I moved two lines to the top of the function, and added two lines to the "else" clause.


// If you add a minimize button to your dialog, you will need the code below
// to draw the icon. For MFC applications using the document/view model,
// this is automatically done for you by the framework.

void CTry1Dlg::OnPaint()
{
CPaintDC dc(this); // device context for painting
CRect rect;
if (IsIconic())
{

SendMessage(WM_ICONERASEBKGND, (WPARAM) dc.GetSafeHdc(), 0);

// Center icon in client rectangle
int cxIcon = GetSystemMetrics(SM_CXICON);
int cyIcon = GetSystemMetrics(SM_CYICON);
GetClientRect(&rect);
int x = (rect.Width() - cxIcon + 1) / 2;
int y = (rect.Height() - cyIcon + 1) / 2;

// Draw the icon
dc.DrawIcon(x, y, m_hIcon);

}
else
{
CDialog::OnPaint();
GetClientRect(&rect);
dc.DrawText("Hello World",11,rect,DT_CENTER );
}
}

GeneralEndDialog and CDialog::OnOK() Pin
nss11-Aug-02 13:48
nss11-Aug-02 13:48 
GeneralRe: EndDialog and CDialog::OnOK() Pin
Ravi Bhavnani11-Aug-02 13:55
professionalRavi Bhavnani11-Aug-02 13:55 
GeneralRe: EndDialog and CDialog::OnOK() Pin
Michael Dunn11-Aug-02 14:09
sitebuilderMichael Dunn11-Aug-02 14:09 
GeneralRe: EndDialog and CDialog::OnOK() Pin
Ravi Bhavnani11-Aug-02 14:15
professionalRavi Bhavnani11-Aug-02 14:15 
GeneralCArray and memory allocation Pin
Space Ace11-Aug-02 12:50
Space Ace11-Aug-02 12:50 
GeneralRe: CArray and memory allocation Pin
Ravi Bhavnani11-Aug-02 13:00
professionalRavi Bhavnani11-Aug-02 13:00 
GeneralRe: CArray and memory allocation Pin
Christian Graus11-Aug-02 13:03
protectorChristian Graus11-Aug-02 13:03 
GeneralRe: something like Find function? Pin
Masaaki Onishi11-Aug-02 19:58
Masaaki Onishi11-Aug-02 19:58 
GeneralRe: CArray and memory allocation Pin
Joel Lucsy12-Aug-02 3:05
Joel Lucsy12-Aug-02 3:05 
Questionwhats does it mean anyway? to translate? Pin
nss11-Aug-02 11:56
nss11-Aug-02 11:56 
AnswerRe: whats does it mean anyway? to translate? Pin
Ravi Bhavnani11-Aug-02 11:59
professionalRavi Bhavnani11-Aug-02 11:59 
GeneralRe: whats does it mean anyway? to translate? Pin
nss11-Aug-02 12:11
nss11-Aug-02 12:11 
QuestionPreTranslate message - wil it interfere? Pin
nss11-Aug-02 11:36
nss11-Aug-02 11:36 
AnswerRe: PreTranslate message - wil it interfere? Pin
Neville Franks11-Aug-02 11:43
Neville Franks11-Aug-02 11:43 
AnswerRe: PreTranslate message - wil it interfere? Pin
Michael Dunn11-Aug-02 11:54
sitebuilderMichael Dunn11-Aug-02 11:54 
GeneralRe: PreTranslate message - wil it interfere? Pin
nss11-Aug-02 11:59
nss11-Aug-02 11:59 
GeneralRe: PreTranslate message - wil it interfere? Pin
Ravi Bhavnani11-Aug-02 12:04
professionalRavi Bhavnani11-Aug-02 12:04 

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.