|
Thanks!
Daniel
---------------------------
Never change a running system!
|
|
|
|
|
I have recently taken over development of an application that uses modal dialogs for everything and they are designed to overlap each other (full screen windows ce device). This scenario worked fine until a request came in to 'skin' the app for use on the local machine while demoing the program.
I can get the first dialog converted over to be a child view and run in my 'skin' container dialog but soon as I try showing the other screens, they go modal which takes a way any control of the skin. Plus the dialogs begin competing with each other and begin overdrawing each other (raw painting to the screen, and now child controls).
Finally it seems that the message pump for key presses stays with the first child even if set focus is sent to the new child dialog that is sitting on top.
My question is this: How would I make modal modelesss dialogs - ie I want to behave as if they were modal but not be modal to the skin dialog so it can still receive mouse clicks and key presses. I feel this would also help with the competition of the drawing code so the screen doesn't swap between dialogs.
Please Help.
Sincerly,
Clint Singer
|
|
|
|
|
You can look at how MFC implements DoModal, and do something similar to that.
Basically a modal dialog is just a modeless dialog, where a second message pump has been placed on the stack in order to process the messages, and the parent window of the modal dialog has been disabled to prevent focus from going back to the parent window.
When you create your own message loop, one other thing to be aware of is that you will need to be sure to call IsDialogMessage to dispatch your dialog messages. THis is how the tab control and other special dialog functionality is performed.
Good Luck
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
Hi, all
I created a Dropdown ComboBox. now I want to handle the CBN_EDITCHANGE message. At that time, how can I get the text in the editbox of the combobox box? I know one way is to use UpdateData, but it will update all the data include other controls, how can I just get the text of the combobox?
Thanks in advance
|
|
|
|
|
if MFC:
int CComboBox::GetLBText( int nIndex, LPTSTR lpszText ) const;
void CComboBox::GetLBText( int nIndex, CString& rString ) const;
if Win32:
CBN_EDITCHANGE
idComboBox = (int) LOWORD(wParam); // identifier of combo box
hwndComboBox = (HWND)lParam; // handle to combo box
So: use ::GetWindowText with the window handle as the Handle of the combobox, hope this help
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I have been trying for days to figure out how to force tapi to connect at 2400 baud no matter what modem is connected to the com port, i have tried every concievable method in the documentation for setting the baud rate, with TAPI promptly ignoring ever one of them, i know this because i have a line analyzer telling me what is coming out the back end. What is the magic trick to force modems to only dial 2400 baud without user intervention, and stop auto - negotiating baud rates. AT commands will not help as they very considerably between vendors. Maybe this is just impossible!
|
|
|
|
|
What code are you trying to use to set the baud rate? What TSPI is the modem using for its TAPI functionality?
I've found this article useful for serial comms,
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnfiles/html/msdn_serial.asp[^]
it uses BuildCommDCB for setting the baud rate.
Michael
"I've died for a living in the movies and tv.
But the hardest thing I'll ever do is watch my leading ladies,
Kiss some other guy while I'm bandaging my knee."
-- The Unknown Stuntman
|
|
|
|
|
I have a simple problem with MFC and VS6 - I want to display a progress bar whilst I'm loading a lot of data. The load happens in a method of my class, which is created under the application's document class. My simple question is - how do I get hold of the parent window needed to create the CProgressCtrl? Can I use GetFocus() somehow?
cheers
Andrew
|
|
|
|
|
how do i write the programe.....
i want to pass a para in Vb to VC and show in VC
please hejp me~~~~~~~~
in VB:
public sub form_mousedown(...)
'sent a message to VC
'and display in VC file,
'the message just like "Hi,Wellcome to VB and VC"
end sub
and i don't konw how to write those code in VC
because i have never learned VC,so i really need to everyone helps...
can you write a simple code to me,let me see the file in VC
and write a dll file make the qeustion can work ...
i really need your help....thanks~~~~~~~~`Good luck
|
|
|
|
|
Post a message to the VC++ Application and there implement a callback that will be called for u
afx_msg LRESULT memberFxn(WPARAM, LPARAM);
But u should know a bit of VC++ o do that im sure
|
|
|
|
|
|
Why evil??
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
can you write a simple code for me???
i really don't know how to write code in VC....
so....
help me thanks~~~~~~~~~~~~~~
|
|
|
|
|
Hi
I just wanna know how i can embed SQL in C++. By the way i have this relational schema
HOTEL (Hotel_No, Hotel_Name, Address)
GUEST (Guest_No, Guest_Name, Address)
ROOM (Room_No, Hotel_No, Type, Price)
BOOKING (Hotel_No, Guest_No, Date_From, Date_To, Room_No)
Where it asks what is the total income, for the month of July 2001, from occupied rooms at all the Sheridan Hotels.
I'm trying to program it in SQL in SQL Analyzer, but i have never experienced programming with this transact SQL before. In the first instance, it is like Pascal to me, (IF ..END IF, BEGIN)Does anyone know any hints or tips regarding above problem???
All helps are highly appreciated!
|
|
|
|
|
You have a number of choices;
(a) write a stored procedure in T-SQL and call that from your app, passing in your date range
(b) write a select statement, and use any of OLE DB, ATL Data consumer classes, ODBC or even ESQL/C to do it
(c) Use something like Crystal Reports.
More seriously, if you want to issue a simple SQL statement, then something like the ATL classes are almost a no-brainer. There's a Wizard you can use to get you started, with a simple example, and then just tweak bits from it's generated output to go on.
It's sometimes confusing, with Accessors and commands, datasources and sessions, but read through the on-line help and it does make sense.
Steve S
[This signature space available for rent]
|
|
|
|
|
Hi all,
Here's my issue. I'm using CString and here's what I setting it to:
...
tempString += _T("<basefont size="" 2""="">\n");
...
yes I am building an HTML file.
The problem is with the quotes. For some odd reason, when the string is assigned into tempString ALL of the quotes are removed so it looks like this in the debug window:
<basefont size="2">
WHY? I use this method in many other places and it comes out just fine, which should be:
<basefont size="2">
Anybody have any ideas at all? I do this all over the place, but this doesn't work in one case in my application. I don't understand at all. Any help and suggestions are greatly appreciated.
Thanks!
Dan
|
|
|
|
|
put a \ before each "
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
Okay, so in a past project I had used IDL to expose a UDT i had in a dll to an excel spreadsheet. The DLL in that case was a straight C++ DLL, no MFC.
In this case I have an MFC DLL. I want to expose a UDT to the excel spreadsheet. I have tried, but it does not work. I have the UDT defined in my IDL file, but when I use "references" tool in excel, I dont have access to the type? The code is below. Am I doing something wrong here?
<code>
[
uuid(A1CCE58E-553D-4394-828C-5227D4526293),
helpstring("Topic Conversion Library For Tag List")
]
library TopicConversionLib
{
typedef struct _vb_topic_data
{
short t_num;
float t_value;
BSTR t_name;
} VbTopicData;
[
helpstring("topic stuff"),
dllname("topic_conversion.dll")
]
module topic_conversion
{
};
}
Ryan Baillargeon
Software Specialist
Fuel Cell Technologies Inc.
|
|
|
|
|
Don't you need to tag the typedef with a uuid?
Steve S
[This signature space available for rent]
|
|
|
|
|
How do you use the VbTopicData?
|
|
|
|
|
I ran a sample app for a splash screen, and now even though other apps are okay, my main app is crashing at !ProcessShellCommand(cmdInfo) whivch I stepped into, and its at the switch:
BOOL CWinApp::ProcessShellCommand(CCommandLineInfo& rCmdInfo)
{
BOOL bResult = TRUE;
switch (rCmdInfo.m_nShellCommand)
{
Another mfc program does fine! The sample I ran had a file pair: cmdline.cpp and .h.
Here are its contents:
#include "stdafx.h"
#include "cmdline.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
void CCommandLineInfoEx::ParseParam(const TCHAR* pszParam, BOOL bFlag, BOOL bLast)
{
if (bFlag) {
m_options[pszParam] = "TRUE";
m_sLastOption = pszParam;
} else if (!m_sLastOption.IsEmpty()) {
m_options[m_sLastOption] = pszParam;
m_sLastOption.Empty();
}
CCommandLineInfo::ParseParam(pszParam, bFlag, bLast);
}
BOOL CCommandLineInfoEx::GetOption(LPCTSTR option, CString& val)
{
return m_options.Lookup(option, val);
}
I dont know whats gone wrong, but none of my saved versions are working, and I know for a fact they were before I ran this sample. I actually ran another splashscreen app too, but it didnt have a file called cmdline.* (if thats the problem).
Help! I am devastated! What has gone wrong on my machine?
Appreciate your help,
ns
|
|
|
|
|
My main app has the splashscreen classes in it, but the earlier versions dont. They arent working either...
Appreciate your help,
ns
|
|
|
|
|
Don't panic. I feel kinda guilty since it was me who directed you to the code
Have you supressed the m_pMainWnd setting in InitInstance ? That could be the cause. If this is not the problem, try erasing any trace of DiLascia's code from your project (.cpp s, .h s), delete the Debug and Release dirs and rebuild. Hope this works. Tell me back what happened.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Sorry> I didnt mean to make you feel bad - you didnt know! Besides the sample is working fine! Even if I comment out all his stuff, it crashes> What is weirder is that I have 20 old versions saved as I go along. These arent working either. So something has happened to the environment, not the code> I installed my app on a different machine(2 actually) - it works fine there. My registry looks okay too ....
A coworker is right now in the process of transferring her data onto a new pc she just got, so I''ll use her old machine till my new 2.8 gig comes in( not ordered yet). Its just very puzzling though. In the meantime I am learning about HTML help workshop, and an independent sample app that will merge databases,so I am not totally crippled....this stuff will keep me busy till I can inherit her old pc.
THis makes me so scared to try new things off the web....and yet it didnt install anything...just ran code(which did something that my app doesnt like).
Appreciate your help,
ns
|
|
|
|