|
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
|
|
|
|
|
looks like that u wanna use unicode
CString blub;
for (int i=0;i<100;i++)
{
blub.Format(L"%i",i);
graphics.DrawString(blub, -1, &font, PointF(600,100), &solidBrush);
}
...
|
|
|
|
|
When my application run it is shown in Taskbar,how can I prevent it?I want to use systemtray icon instead of it.I know how to show it in systray,but I don't know how to hide it from taskbar.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
this[^] should help you.
Cheers
Kannan
|
|
|
|
|
Thanks.
Mazy
"And the carpet needs a haircut, and the spotlight looks like a prison break
And the telephone's out of cigarettes, and the balcony is on the make
And the piano has been drinking, the piano has been drinking...not me...not me-Tom Waits
|
|
|
|
|
How can i obtain the process handle of any process under execution ??? Actually, i am writing an application that can terminate any process. For this purpose i am using API TerminateProcess():
BOOL TerminateProcess(<br />
HANDLE hProcess,<br />
UINT uExitCode<br />
)
As can be seen from the syntax, the first argument is the process handle. How can i obtain this handle when i only know is the process name ???? Is there any other alternative you suggest me instead of TerminateProcess() ???
|
|
|
|
|
For this you need to look on the following API's
CreateToolhelp32Snapshot for a snapshot of running process on your machine and on successful exec. of this function you need to iterate the processes using Process32First followed by Process32Next.
Also look at the following API's in MSDN
GetProcessModule
OpenProcess
HTH
Cheers
Kannan
|
|
|
|
|
Is it possible to have an MFC document template be able to open multiple file types?
(whatever.bla and whatever.beh for example)
|
|
|
|
|
You have to manually edit the IDR_XXXXTYPE string in the resource file to add your file types to the
File Open box.
If you search MFC for a function called
CDocTemplate::Confidence CDocTemplate::MatchDocType(LPCTSTR lpszPathName, CDocument*& rpDocMatch)
{
}
It will show how MFC chooses which template to use for any given file type. You can inherit from
C(Multi/Single)DocTemplate, and override this function to do clever "type choosing things".
You'll have to remember to trivially override the construction member as well...
As before, I hope this gives you pointers...
Iain.
|
|
|
|
|
Thanks, but what do I put in the string? I tried doing it like normal open file dialogs, but |s didn't work and I don't know what else to try...
|
|
|
|