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

C / C++ / MFC

 
AnswerRe: How can I convert a Device-Dependent Bitmap(DDB) to a DIB and then save it? Pin
Christian Graus5-Jul-02 21:22
protectorChristian Graus5-Jul-02 21:22 
GeneralDebugging DLL in VS .NET Pin
5-Jul-02 19:45
suss5-Jul-02 19:45 
GeneralDoModal problem Pin
chen5-Jul-02 19:20
chen5-Jul-02 19:20 
GeneralRe: DoModal problem Pin
bryce5-Jul-02 19:37
bryce5-Jul-02 19:37 
GeneralRe: DoModal problem Pin
chen5-Jul-02 19:58
chen5-Jul-02 19:58 
GeneralRe: DoModal problem Pin
Michael Dunn5-Jul-02 21:08
sitebuilderMichael Dunn5-Jul-02 21:08 
GeneralRe: DoModal problem Pin
Bugra Barin5-Jul-02 21:13
Bugra Barin5-Jul-02 21:13 
GeneralRe: DoModal problem Pin
chen5-Jul-02 22:40
chen5-Jul-02 22:40 
Thanks for replys.

I have checked the resource ID, there is no problem.
By step debug, I found that the problem is at the creation of the window.

In CMyDlg I have the following function
BOOL CMyDlg::OnInitDialog()
{
CDialog::OnInitDialog();

frame_window = new CFrameWnd();
CRect rect;
GetClientRect(&rect);
rect.bottom -= 10;
BOOL bCreate = frame_window->Create(NULL, "",
WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, rect, this, 0);
CRuntimeClass* run_time_class =RUNTIME_CLASS(CGraphView);
if (run_time_class != NULL)
{
grview = reinterpret_cast<cgraphview*>(run_time_class->CreateObject());
};
frame_window->GetClientRect(&rect);
bCreate = grview->Create(NULL, "", WS_CHILD | WS_VISIBLE | WS_CLIPCHILDREN, rect,
frame_window, 1);

grview->SetAxisProps("X-Axis", "", 4, GRAPH_X_AXIS, TRUE);
grview->SetAxisProps("Y-Axis", "", 4, GRAPH_Y_AXIS, TRUE);
grview->SetGraphWorldCoords(0, POINTS_X_RANGE, -1, 1, TRUE);

return TRUE;
}

It will call the grview creat function.
It is:

BOOL CGraphView::Create( LPCTSTR lpszClassName, LPCTSTR lpszWindowName, DWORD dwStyle, const RECT& rect, CWnd* pParentWnd, UINT nID, CCreateContext* pContext)
{
BOOL b = CScrollView::Create( lpszClassName, lpszWindowName, dwStyle, rect, pParentWnd, nID, pContext);

m_splitter.CreateStatic(this, 1, 2, WS_CHILD | WS_VISIBLE);
m_splitter.SetRowInfo(0, 100, 0);
m_splitter.SetColumnInfo(0, 100, 0);
m_splitter.SetColumnInfo(1, 100, 0);
m_splitter.CreateView(0, 0, RUNTIME_CLASS(CGraphContainer), CSize(200, 200), pContext);

//This code cannot be implemented ! -----------
m_splitter.CreateView(0, 1, RUNTIME_CLASS(CPointsView), CSize(200, 200), pContext);
// ---------------------

pointsview = (CPointsView*)m_splitter.GetPane(0, 1);
grafix = (CGraphContainer*)m_splitter.GetPane(0, 0);
//set minimum size for CPointsView
m_splitter.SetScrollStyle(0);
m_splitter.RecalcLayout();
bSplitterCreated = TRUE;

RECT r;
GetClientRect(&r);
m_splitter.MoveWindow(0, 0, r.right - r.left, r.bottom - r.top);

//no scrolling at all - at least for now
CSize sizeTotal;
sizeTotal.cx = sizeTotal.cy = 0;
SetScrollSizes(MM_TEXT, sizeTotal);

return b;
}

Would you please this: in order to splite the window how to set
the correct size of the window?

Thanks in advance!



chen
GeneralWinsock/AcceptEx Pin
unknown soldier5-Jul-02 18:38
unknown soldier5-Jul-02 18:38 
GeneralRe: Winsock/AcceptEx Pin
NormDroid6-Jul-02 0:08
professionalNormDroid6-Jul-02 0:08 
Questionmsdn search box...resizable drop down....how do they do it? Pin
bryce5-Jul-02 17:25
bryce5-Jul-02 17:25 
AnswerRe: msdn search box...resizable drop down....how do they do it? Pin
Michael Dunn5-Jul-02 17:50
sitebuilderMichael Dunn5-Jul-02 17:50 
GeneralRe: msdn search box...resizable drop down....how do they do it? Pin
bryce5-Jul-02 19:32
bryce5-Jul-02 19:32 
GeneralRe: msdn search box...resizable drop down....how do they do it? Pin
bryce5-Jul-02 19:34
bryce5-Jul-02 19:34 
QuestionCan you change process name at runtime? Pin
5-Jul-02 16:24
suss5-Jul-02 16:24 
AnswerRe: Can you change process name at runtime? Pin
Mike Nordell6-Jul-02 6:31
Mike Nordell6-Jul-02 6:31 
GeneralRe: Can you change process name at runtime? Pin
Daniel Lohmann6-Jul-02 7:06
Daniel Lohmann6-Jul-02 7:06 
GeneralSorry you misunderstood Pin
6-Jul-02 15:44
suss6-Jul-02 15:44 
GeneralRe: Sorry you misunderstood Pin
Daniel Lohmann7-Jul-02 2:27
Daniel Lohmann7-Jul-02 2:27 
GeneralI'm sure there was not... Pin
7-Jul-02 6:22
suss7-Jul-02 6:22 
GeneralRe: I'm sure there was not... Pin
Daniel Lohmann7-Jul-02 6:38
Daniel Lohmann7-Jul-02 6:38 
GeneralDES ECB encryption Pin
skysurfer5-Jul-02 13:59
skysurfer5-Jul-02 13:59 
GeneralRe: DES ECB encryption Pin
Chris Losinger5-Jul-02 18:45
professionalChris Losinger5-Jul-02 18:45 
GeneralDrawing unicode characters using TextOut and CString Pin
alibobba5-Jul-02 13:49
alibobba5-Jul-02 13:49 
GeneralRe: Drawing unicode characters using TextOut and CString Pin
Michael Dunn5-Jul-02 17:52
sitebuilderMichael Dunn5-Jul-02 17:52 

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.