473,769 Members | 6,107 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DoModal returns -1 when opening dialog with flexgid

When I insert the FlexGrid control in a dialog (using controls toolbar) the
dialog fails to open on program execution (DoModal returns a -1). If I remove
the FlexGrid from the dialog, the dialog opens so it is definitely a flexgrid
related issue. This is using VC++ 6.0

I did not change any of the default FlexGrid properties yet.

Thanks
Sep 29 '06 #1
1 1355
"alexh1000" <al*******@disc ussions.microso ft.comwrote in message
news:82******** *************** ***********@mic rosoft.com...
When I insert the FlexGrid control in a dialog (using controls toolbar)
the
dialog fails to open on program execution (DoModal returns a -1). If I
remove
the FlexGrid from the dialog, the dialog opens so it is definitely a
flexgrid
related issue. This is using VC++ 6.0

I did not change any of the default FlexGrid properties yet.
More often than not, a problem like this is related to an initialization
step that you forget. If the control uses COM or a common control you'd need
to call CoInitialize() or InitCommonContr olsEx().

Regards,
Will
Sep 29 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6800
by: S.W. Rasmussen | last post by:
With the risk of being accused of multi-posting I would like to draw the attention to a serious visual basic/windows issue discussed in the microsoft.public.vb.bugs newsgroup. As pointed out below by Norman Diamond the bug may result in loss of data when saving files with the standard common dialog control. Norman Diamond describes the problem as follows: ---------- In VB6 SP6, VB6 SP5, and possibly others, the common dialog box...
3
5961
by: Clive Moore | last post by:
Is it possible to load a CDialog from my application and display it without stopping the excution of a program. I have tried calling doModal from the initinstance function but this stops the rest of the program from executing. m_pMainWnd = &dlg; int nResponse = dlg.DoModal(); // process info I have also tried calling showwindow which works ok apart from
5
3871
by: MrNobody | last post by:
I am using the no-arg ShowDialog() method hoping that the window would not be modal to any other window like the other ShowDialog(IWin32Window) method does, but when this opens it somehow becomes modal to my main window- even though I don't see how it could even be getting a reference to my main window. What I need is to open a new window but still have my main window available for interaction- the way it opens now it forces focus on this...
0
1317
by: Brent Baker | last post by:
In our application we've created some temporary dialog boxes. Rather than the usual method of 1) calling the constructor for the dialog, 2) doing other initialization 3) calling DoModal() 4) calling some functions on the dialog object to get our results We're passing in some pointers to the constructor for both setup, and retrieving the results. Then we call
1
1536
by: Jürg Fross | last post by:
Hi all, I have to recompile a MFC++ Program developped under NT4.0 in XP. We store the printer settings (DEVMODE and DEVNAMES) as part of our document. When printing in batch mode, we need to create a PrintingContext without asking the user. Here is my code fragment (I removed all error handling): BOOL CTsprintView::OnPreparePrinting(CPrintInfo* pInfo) { // we get DEVMODE and DEVNAMES from the document... .... pDoc->setContext(pInfo);
1
1748
by: kmslick | last post by:
Hello all. Not sure which group this problem best relates to, so I'm posting to both with a follow up. I started learning C# and .NET last august for a project for my employer. The project involved extending explorer by creating a context-menu extension and allow certain actions to be performed on certain files. I was able to get that up and running through much searching on google, but the overall goal of the projects seems like it...
0
1826
by: alexh1000 | last post by:
When I insert the FlexGrid control in a dialog (using controls toolbar) the dialog fails to open on program execution(DoModal returns a -1). If I remove the FlexGrid from the dialog, the dialog opens so it is definitely a flexgrid related issue. This is using VC++ 6.0 I did not change any of the default FlexGrid properties yet. Thanks
3
3840
by: gopython | last post by:
Hi all, Python:2.5 OS: Windows XP I have posted couple questions regarding the wxPython. Since I am still a newbie to Python, wxPython makes more sense to me than pyWin for gui programming. But recently my friend ask me for help on pywin32 gui programming. There is one thing that throw us off (Note. Both of us don't have any mfc background). When the "DoModal" is called, the gui will stay in loop. It is different when the "CreateWindow"...
0
3794
by: aarthiraaj | last post by:
In my user screen I have view link, if I click this link it will go to servlet and open one word document. It is opening properly, but while opening the attachment it generate one dialog box like file Open, Save or Cancel button, if I click open after that it is opening the document. But my query is it should not display this dialog box, once I click the link it should open the document automatically using HttpServletResponse. Can any one help...
0
9423
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10211
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10045
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9863
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7408
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6673
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5447
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3958
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2815
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.