C++/VB - DoModal() returns -1 in 64-bit executable
Asked By hecto
09-Jul-07 08:20 PM
Hi All,
I'm having a problem with creating a dialog with a 64-bit executable. The
issue is the following:
I have a dialog, derived from CDialog that I create and show using
DoModal(). This works fine when I compile and run in a 32-bit Vista
environment. But when I compile it for 64-bit Vista, the executable runs and
the constructor for my custom dialog gets called, but "DoModal()" returns -1
and the dialog never appears.
The msdn documentation for CDialog says that DoModal() returns -1 when a
dialog cannot be created, but that's not very specific.
Does anyone have any ideas as to what may be going wrong?
Thanks in advance and regards,
Hector.
Vista
(1)
InitCommonControlsEx
(1)
CDialog
(1)
DoModal
(1)
ActiveX
(1)
Newcomer
(1)
Constructor
(1)
Scott McPhillips [MVP] replied...
The most common cause for a failure in DoModal is putting a control on
the dialog that has not been registered. ActiveX controls require
registration. Many IE controls require a call to InitCommonControlsEx
before creating the dialog.
--
Scott McPhillips [MVP VC++]
Joseph M. Newcomer replied...
What sort of controls are in your dialog? Are you running any ActiveX controls, or a rich
edit control? It could be that the custom controls are not installed on your target
machine, e.g., you only have 32-bit versions of the custom controls and therefore they
cannot be used in a 64-bit app.
One way to discover if this is a problem is to go to your app, bring up the dialog, and
change the "No Fail Create" property to TRUE. What should happen now is that the dialog
will be created but one or more controls will be missing. The missing controls will be
the ones that don't have a 64-bit versions, or for which the 64-bit -bit version is not
properly installed.
joe
Joseph M. Newcomer [MVP]
email: newcomer@flounder.com
Web: http://www.flounder.com
MVP Tips: http://www.flounder.com/mvp_tips.htm
C++ / VB Has anyone noticed that SetCursorPos does not seem to work with VB^ and Vista? VB Vista Compatibility Discussions Windows Vista (1) Vista (1) VB (1) SetCursorPos (1) Temperance (1) O6p6a4pbbo6aoh4ar94gs9kedlvupe4om1 (1) I will assume that "VB^" means VB6, right?. SetCursorPos works in Windows Vista. The function returns 0 when the = call fails: '* ** ** ** * If SetCursorPos(x, y) = 3D 0 Then 20 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - = 20 ( ! ) Preceding answers in Google: = 20 = http: / / groups.google.com / group / microsoft.public.vb.vista.compatibility = 20 ( i ) Temperance in the forum: = 20 http: / / www.microsoft.com / communities / conduct / default SetCursorPos description: Has anyone noticed that SetCursorPos does not seem to work with VB^ and Vista?
How to compile Vista 64bit from 32bit Vista C++ / VB My OS is 32bit Vista. I want compile to 64bit. I don't have 64bit vista. Almost customers uses 32bit Vista OS. But serveral customers uses 64bit Vista OS now. My delvelopment tool is VC++2005. I need compile to "64bit dll file without my os change. please guide me. . . . VC MFC Discussions Visual Studio (1) Vista (1) X64 (1) Delvelopment (1) E761C1097C77 (1) ¸Þ½ÃÁö¸¦ (1) Comflict (1) ´ÔÀÌ (1) carfediem: You OS to test on. This is largely why I decided to go with 64-bit Vista (even though I only generate 32-bit programs). - - David Wilkinson Visual C++ MVP To add
Win32_QuickFixEngeering InstalledOn formatted differently on Vista C++ / VB On Vista, Win32_QuickFixEngineering.InstalledOn is formatted differently on Vista. Prior to Vista it was a formatted date string, based on the regional settings at time of QFE install (like "06-Nov-05"), in Vista this seems to be a 64-bit hex number string. The documentation for Win32_QuickFixEngineering alludes Microsoft MVP, Visual Developer - Visual C# Win32 WMI Discussions QuickFixEngineering.InstalledOn (1) InstallFileTime.dwHighDateTime (1) Vista (1) InstallFileTime.dwLowDateTime (1) FileTimeToSystemTime (1) InstallSysTime.wMonth (1) InstallSysTime.wYear (1) StringCchPrintf (1) Hi AS IS" with no warranties, and confers no rights. keywords: Win32_QuickFixEngeering, InstalledOn, formatted, differently, on, Vista description: On Vista, Win32_QuickFixEngineering.InstalledOn is formatted differently on Vista. Prior to Vista it was a formatted date
SMB2 Vista C++ / VB Hi, I am using two Windows Vista machines. One acting as client and tries to access shared resource(directory) on the other Vista. The Vista machine acting as server is always selecting "NT LM 0.12" and not SMB2. Am thing I need to do? Really appreciate your response. Thanks, Srini Win32 Networks Discussions Windows Vista (1) Vista (1) Srini (1) Dec (1) Registery (1) Directory (1) Registry (1) Dialect (1) There is been fixed (I've got the latest updates and it is still broken on my Vista PCs). What happens on every Vista network I've seen (about 100), until we disable SMB2, is that if one client