|
Hi all,
I have a "small" problem.
I have an SDI with a CFormView. From the CFormView I open a dialog box
using CDialog::Create with the parent as NULL and ShowWindow.
The problem is that when I click on the CFormView the Dialog box doesn't change its Z-order. It remains on top of my SDI, thus hiding part of the SDI.
Mind you, I wish for the Dialog to remain open.
Is there any way to get over this?
Thanks in advance
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|
|
Try with this:
...
p_Dialog->Create(IDD_NEURAL_DIALOG, this);
p_Dialog->ModifyStyle(NULL, NULL, SWP_NOACTIVATE);
p_Dialog->ShowWindow(SW_SHOW);
..
|
|
|
|
|
Nope... No good.
It stays the same: The dialog over the SDI. What I need is the dialog under the SDI.
Thanks anyway.
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|
|
A little correction: try with with parent NULL:
p_CDialog->Create(ID_MY_DIALOG, NULL);
This works if you call the dialog from some other dialog window and not from main application!
|
|
|
|
|
Yeah I figured that much out.
I think this is Micro$oft's idea of a twilight zone.
Thanks
Alberto Gattegno
Software Engineer
http://www.itgil.com
|
|
|
|
|
I want manually to horizontal scroll CListBox to the right position.
I change the position of the scroll with:
CListBox* p_CListBox;
..
..
sz = pDC->GetTextExtent(str);
dx = sz.dx;
p_CListBox->SetHorizontalExtent(dx);
dx = p_CListBox->GetScrollLimit(SB_HORZ);
p_CListBox->SetScrollPos(SB_HORZ, dx, TRUE);
..
But now I can't actually scroll the view of the CListBox?
I tryed with the:
SendMessage(p_CListBox->GetSafeHwnd(), WM_HSCROLL, MAKEWPARAM(SB_ENDSCROLL, 0),0);
but no success!
(the view is scrolled correct if I click on scroll with the mouse!)
|
|
|
|
|
The code which works is:
SendMessage(p_CListBox->GetSafeHwnd(), WM_HSCROLL, MAKEWPARAM(SB_PAGERIGHT, 0),0);
but I must sent it number? of times to reach the most right HSlider position!
|
|
|
|
|
Hi.
My application was designed for Win2000 only (I use DirectX 7). And I plan to detect attempt to run this on WinNT4 , because there is error message "The procedure entry point DirectDrawCreateEx could not be located in the dynamic link library DDRAW.dll, but this message show up before WinMain call.
Thanks for advise.
|
|
|
|
|
Afaik you can't run DirectX > 3 on Windows NT 4.0. ( Execute-buffers, you've got to love them... )
-=jarl=-
|
|
|
|
|
I know this, but I need only valid error report, maybe like this:
"This program requiedWin98/2000 only"
I need to detect OS version BEFORE the program say "...Entry Point for DirectDrawCreateEx was not found..."
I think that in DDRAW.dll in DllEntryPoint there is call of DirectDrawCreateEx and i have this error message before Step IN to WinMain
|
|
|
|
|
Oh, sorry, I see. You need to load the DLL manually, ( using LoadLibrary ), then.
-=jarl=-
|
|
|
|
|
As you have found, the OS loader is trying to bring in functions / dlls that aren't there.
There are two ways around this. Actually, they are effectively the same, but you do different
things.
1/ Delay load (e.g.) ddraw.dll and catch the DirectDrawCreateEx function failure with an exception
handler, or
2/ Explicitly load the function using LoadLibrary and GetProcAddress.
Iain.
|
|
|
|
|
My problem is a simple one:
I have a dialog box. A simple one, just two lines to fill. If I press enter/return, by default dialog closes as if I have pressed ok.
I would like to capture the keyboard, and make my dialog move onto next items when enter is pressed.
I tried the following, no success:
void CEditDlg::OnKeyUp(UINT nChar, UINT nRepCnt, UINT nFlags) <br />
{<br />
AfxMessageBox("KEYUP");<br />
<br />
CDialog::OnKeyUp(nChar, nRepCnt, nFlags);<br />
}<br />
<br />
void CEditDlg::OnChar(UINT nChar, UINT nRepCnt, UINT nFlags) <br />
{<br />
AfxMessageBox("CHAR");<br />
<br />
CDialog::OnChar(nChar, nRepCnt, nFlags);<br />
}
------------------------------------------
Experience is the name every one gives to their mistakes. - Oscar Wilde
Experience is one thing you can't get for nothing. - Oscar Wilde
|
|
|
|
|
I forgot to check the dialog template in resource editor
I just changed "Default button" propoerty from OK to "Insert" button.
------------------------------------------
Experience is the name every one gives to their mistakes.
-- Oscar Wilde
Experience is one thing you can't get for nothing.
-- Oscar Wilde
|
|
|
|
|
Under Visual C++ NET the print preview in MFC can be performed only within the MDI child frame and not anymore within the main application frame as before. Does anybody know the way to get the former behavior?
Thanks!
|
|
|
|
|
Does any one know how we can reverse engineer MFC code in rational rose 2000? i've already gone through the help in rational rose and most of the stuff is outdated
|
|
|
|
|
HI,
I have to read the icons for different file types and display them .
Now if i load the common icons from a resource script it wont suffice .
as for a new/different file type it does not work . So it is obvious that
it has to be read from the registry . ( my application uses win32 api)
Any help will be appreciated.
thanks
Suman Ray
|
|
|
|
|
Look up SHGetFileInfo in the Platform SDK.
As I remember, Paul diLascio (MSDN) did a series of C++Q&A articles on all this.
Iain.
|
|
|
|
|
thanks you can do it that way,
discovered another api .
ExractAssociatedIcon(also a shell api ) to do it .
regards
Suman Ray
|
|
|
|
|
Does anyone recognize this value? Would be very helpful right now...
I get an (rare) error condition where some buffers are filled with 0xFEEEFEEE. It could be a usual allocation problem (but the CRT Debug heap doesn't seem to use this), or from a call into a 3rd party library which in turn passes the buffer into a kernel mode driver.
TIA
Peter
Those who not hear the music think the dancers are mad. [sighist] [Agile]
|
|
|
|
|
The C libraries fill memory formerly occupied by an allocation with this pattern when
it is deleted.
So, you're trying to use a deleted block of memory.
-=jarl
Look here for more on memory fill-codes
http://www.docsultant.com/articles/debug_codes.html
-=jarl=-
|
|
|
|
|
hi
to draw a String with GDI+ :
graphics.DrawString(L"Hello", -1, &font, PointF(600,100), &solidBrush);
how can i change an integer to WCHAR in parameter 1.
for exmple i want to draw figures from 1 to 100.
thanx
|
|
|
|
|
char tmp[4];
for(int i = 1 ; i < 100 ; i++) {
sprintf(tmp, "%s", i);
graphics.DrawString(tmp, -1, &font, PointF(600,100), &solidBrush);
}
You can also use eg std::string and boost::lexical_cast, but this is the simplest form I guess
HTH
|
|
|
|
|
roel_v wrote:
sprintf(tmp, "%s", i);
You obviously meant:-
sprintf(tmp, "%d", i);
|
|
|
|
|
Yes I did - shame on me
|
|
|
|