Click here to Skip to main content
15,919,879 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Thread & Class Pin
Blake Miller3-May-04 10:49
Blake Miller3-May-04 10:49 
GeneralHelp: I cannot use getline(...) Pin
GavinWang2-May-04 17:19
GavinWang2-May-04 17:19 
GeneralRe: Help: I cannot use getline(...) Pin
Maxwell Chen2-May-04 18:02
Maxwell Chen2-May-04 18:02 
GeneralRe: Help: I cannot use getline(...) Pin
Henrik Stuart2-May-04 18:47
Henrik Stuart2-May-04 18:47 
GeneralRe: Help: I cannot use getline(...) Pin
Anonymous2-May-04 19:30
Anonymous2-May-04 19:30 
GeneralRe: Help: I cannot use getline(...) Pin
Maxwell Chen2-May-04 19:31
Maxwell Chen2-May-04 19:31 
GeneralRe: Help: I cannot use getline(...) Pin
GavinWang2-May-04 19:35
GavinWang2-May-04 19:35 
GeneralFunction PreSubclassWindow() Pin
ChuThaiDuong2-May-04 17:04
ChuThaiDuong2-May-04 17:04 
I have a class ( CPolyBtn)
This Function the PreSubclassWindow() allow . When the only one framework then the project is ok. But When I have two frameworks then the project is a error in this Function ASSERT(0). I don’t process. You help me.

void CPolyBtn::PreSubclassWindow()
{
// TODO: Add your specialized code here and/or call the base class
ModifyStyle(0, BS_OWNERDRAW);

if (m_edges.size()==0)
{
ASSERT(0);
}
else
{
m_rgn.DeleteObject();
SetWindowRgn(NULL, FALSE);

m_pPoints = new POINT[m_edges.size()];
for (int i=0;i<m_edges.size();i++)
{
="" m_ppoints[i]="m_edges.at(i).start;
"
="" if="" (i="">0)
{
ASSERT(m_edges.at(i-1).end == m_edges.at(i).start);
}
}

m_rgnWnd.CreateRectRgn(0,0,0,0);

// couldn't find a way to expand a region. so, we'll
// offset the region in 8 directions and combine the
// results. yes, this is a hack.

CRgn temp;
temp.CreatePolygonRgn(m_pPoints, m_edges.size(), ALTERNATE);

temp.OffsetRgn(-1,0);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);
temp.OffsetRgn(0,1);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);
temp.OffsetRgn(1,0);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);
temp.OffsetRgn(1,0);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);
temp.OffsetRgn(0,-1);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);
temp.OffsetRgn(0,-1);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);
temp.OffsetRgn(-1,0);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);
temp.OffsetRgn(-1,0);
m_rgnWnd.CombineRgn(&temp, &m_rgnWnd, SIMPLEREGION);

// once you use a region in SetWindowRgn, you're not allowed to do *anything* else with it
// so, we'll make a copy.
m_rgn.CreateRectRgn(0,0,0,0);
m_rgn.CopyRgn(&m_rgnWnd);

SetWindowRgn(m_rgnWnd, TRUE);

if (m_bmpID!=0)
{
if (!m_bmp.LoadBitmap(m_bmpID))
{
ASSERT(0);
}
}

if (m_bmpIDD!=0)
{
if (!m_bmpD.LoadBitmap(m_bmpIDD))
{
ASSERT(0);
}
}
}


CButton::PreSubclassWindow();
}


Hello
Questionhow to do write to a file with a std::string Pin
kfaday2-May-04 16:35
kfaday2-May-04 16:35 
AnswerRe: how to do write to a file with a std::string Pin
Maxwell Chen2-May-04 16:59
Maxwell Chen2-May-04 16:59 
AnswerRe: how to do write to a file with a std::string Pin
Henrik Stuart2-May-04 18:34
Henrik Stuart2-May-04 18:34 
AnswerRe: how to do write to a file with a std::string Pin
David Crow3-May-04 2:33
David Crow3-May-04 2:33 
Generalarrays that are pass Pin
bishead2-May-04 15:53
bishead2-May-04 15:53 
GeneralRe: arrays that are pass Pin
Christian Graus2-May-04 16:17
protectorChristian Graus2-May-04 16:17 
GeneralRe: I need a little more help Pin
bishead2-May-04 17:21
bishead2-May-04 17:21 
GeneralRe: I need a little more help Pin
Paul Ranson3-May-04 1:14
Paul Ranson3-May-04 1:14 
GeneralRe:Thanks Paul Pin
bishead3-May-04 7:28
bishead3-May-04 7:28 
GeneralTab order of controls in dialog Pin
Kuniva2-May-04 11:06
Kuniva2-May-04 11:06 
GeneralRe: Tab order of controls in dialog Pin
Ravi Bhavnani2-May-04 11:18
professionalRavi Bhavnani2-May-04 11:18 
GeneralConsole Window Pin
Daniel13242-May-04 9:39
Daniel13242-May-04 9:39 
GeneralRe: Console Window Pin
Dominik Reichl2-May-04 9:50
Dominik Reichl2-May-04 9:50 
GeneralRe: Console Window Pin
Daniel13242-May-04 10:49
Daniel13242-May-04 10:49 
GeneralRe: Console Window Pin
Dominik Reichl3-May-04 1:17
Dominik Reichl3-May-04 1:17 
GeneralRe: Console Window Pin
Daniel13243-May-04 5:48
Daniel13243-May-04 5:48 
GeneralTextBox Pin
bishead2-May-04 8:35
bishead2-May-04 8:35 

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.