|
ns wrote:
So this is fine, right?
NO!!!
When you call DoModal a dialog is created and shown and a message loop is started. Now when you call EndDialog in one of the message handlers the dialog is destroyed, the message loop exited and then DoModal returns and the value it returns is the value you passed to EndDialog. Get it?
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Finally
Thanks,
ns
|
|
|
|
|
No it's not fine. DoModal will not return until the dialog is closed. Therefore your EndDialog will be called for a dialog that no longer exists.
It only makes sense to call EndDialog from a member function of the dialog. EndDialog is only relevant for modal dialogs and, by definition, the calling thread can't continue while a modal dialog is open.
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Appreciate the responses. I didnt really realize what modal meant..
|
|
|
|
|
"Yikes, please no!!! Ouch, that hurts." (Sound of your modal dialog talking) .
A method like EndDialog() should only be called from within the dialog itself. To terminate a dialog from its parent, post it a custom message that causes the dialog to execute an orderly shutdown. (See my earlier reply about hidden commands).
/ravi
Let's put "civil" back in "civilization"
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Hi,
Just wondering if it is possible to parse MP3 files with DirectSound. I want to get access to the raw music data and change it, like you could do with a .wav file
Pankaj
Without struggle, there is no progress
|
|
|
|
|
No. You need DirectMedia (part of the Directx sdk).
DirectSound plays audio sample buffers described by a standard WAVEFORMATEX structure.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
If I do:
CProgressCtrl *pBar = (CProgressCtrl*)GetDlgItem(IDC_PROGRESS1);
long hPbHandle = (long)pBar->GetSafeHwnd();
than if I do
(long)m_Progress1.GetSafeHwnd();
where m_Progress1 is the name of the control.
Thanks,
ns
|
|
|
|
|
|
I'm passing the handle to a dll which sends me messages> Well, done the first way I get the message. Done the second way, it doesnt get past the senmessage in the dll, and an exception occurs in the client. With one method, the progressbar gets PBM_STEPIT, but not with the other..
Thanks,
ns
|
|
|
|
|
Are you sure m_Progress1 in correctly mapped to Windows control in DoDataExchange or elsewhere?
Put the breakpoint in the second version and check the members of m_Progress1.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
Problem in setting japanese font to list or tree control.
Following is the sequence in which I encounter the problem.
1) Create a list or tree control with some items having japanese characters.
2) Set a font that does NOT support japanese characters using SetFont() function.
3) Using Setfont set a font which supports japanese characters.
4) Now, the items in the list/tree control display junk characters.
5) Only if the list/tree control is refreshed (that is, if all the items are deleted and added again) then the items are displayed properly.
I want to change the font in list/tree control directly without deleting and adding the items in the control.
Please suggest how this can be done.
|
|
|
|
|
I am at my hairs' end trying to solve this puzzle.
What section of the VC++ options produces a definition file?
I am currently trying to build a regular MFC DLL. Everything compliles OK, except for linking. It tells me that It cannot open the ??.def file.
<font color="#009933">
Linking...
LINK : fatal error LNK1104: cannot open file ".\MyDLL.def"
Error executing link.exe.</font>
Does anyone know what would prevent the compiler creating this definition file and why is it interfare with an otherwise perfectly written piece of code?
Gracias.
|
|
|
|
|
Compiler doesn't create .def file. It's created by default by Project Wizard. Can you check if there's one in your project?
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
A def file is the a part of the project (you can see it in the workspace) and you write there the name of all functions that your dll is exporting. However, sometimes the linker will try to modify it (only the first line of it). So, most likely that your .def file is missing (has been deleted) or is read-only.
Best regards,
Alexandru Savescu
|
|
|
|
|
My def file is indeed missing from my project.
In this case does VS auto-generate this missing file (with all the export functions), or is this a job that has to be done manually? (nooooo).
-chin-
|
|
|
|
|
First ensure if you really need .def file. It's needed only if you plan to export your functions by ordinal. If you export by name, then __declspec(dllexport) is enough.
Tomasz Sowinski -- http://www.shooltz.com
*** Vodka. Connecting people. ***
|
|
|
|
|
When I tried out this set of classes to connect to Access 2000 tables, I got the following error.
Code : 80004005
Code Meaning : Unspecified error
Source : MS jet database engine
Description : Could not find installable ISAM
Can someone suggest how to get over this problem.
(I have tried to including Msrd2x40.dll and Msjet40.dll in the project)
|
|
|
|
|
Contains the database any linked external tables?
Pavel
Sonork 100.15206
|
|
|
|
|
I need to show in a 3D graph the evolution
of a flight. So I have to show some fixed points,
the flying object and its wake (each one with a
different color). Then I'd like to have the
possibility to move the 3D system in order to
view my objects from different position.
Which is the most appropriate way to do that ??
I have seen that OGL allows to do something similar...
and I have found some classes that manages OGL library...
Can OGL library be usefull for my problem ??
|
|
|
|
|
OGL can be used for game developpement (low fps) But i guess u can use it for ur application
Papa
Murex Co.
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I would recommend to make a renderer wrapper so that it fits both OpenGL and DirectX. Doing so, you are cross-platform.
MS quote (http://www.microsoft.com/ddk) : As of September 30, 2002, the Microsoft® Windows® 2000 DDK, the Microsoft Windows 98 DDK, and the Microsoft Windows NT® 4.0 DDK will no longer be available for purchase or download on this site.
|
|
|
|
|
Hi,
This has probably been asked a million times before, but how do i convert a bitmap .bmp to a .ico file that i can use for the application icon in visual c++? Using a bitmap straight does not work, at least not 24bit ones.
Inserting a bitmap by cutting and pasting a bmp from
another program (CTRL-C, CTRL-V etc.) change the colors, so that doesn't work.
/Per
|
|
|
|
|
|
Take a look:
hr=m_schema->add(_bstr_t(m_szNS), _variant_t(m_szXSD)); This code returns S_OK but in fact it fails.
The same in VB:
On Error GoTo err_xsd
schema.Add txt_namespace.Text, txt_xsd_file.Text will jump to err_xsd label, where i can obtain all the information i need about the error using Err .
Do you know how could i do it in VC++?
rechi
|
|
|
|