|
Have you tried this forum?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
Just checking. When I saw "VB" in your post, I just wanted to make sure you knew this was the VC++ forum.
Anyway, the problem needs to be narrowed down a bit before it can be effectively diagnosed. Debugging a whole application with the minimal information you've provided is akin to finding a needle in a haystack.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
I am sorry but I dont need to debug my app, I was asking people who enconter that problem if they can share information
|
|
|
|
|
You are receiving an exception error in your application but you are not interested in debugging it.
What information are you wanting others to share (that does not directly lead to a bug being fixed)?
There are many reasons, including the one I provided, why that exception could be thrown. Regardless of why it gets thrown, don't you think it's something you might want to address?
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Florian Szoke wrote:
sorry but I dont need to debug my app
sorry you need to do the dirty work of your own app.
Florian Szoke wrote:
I was asking people who enconter that problem if they can share information
Its a rare Case you will be extreamly lucky if you find one.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
yes , it is rare... and I did't find anything on the internet just that small definition from MSDN
|
|
|
|
|
I was typeing to fast and I mist a word "you".
I am sorry but I dont need you to debug my app, I was asking people who enconter that problem if they can share information
|
|
|
|
|
Florian Szoke wrote:
I was typeing to fast and I mist a word "you".
If you slow down little bit more you won't miss the missing letters too.;)
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
I am having a problem with a control "keeping" focused.
I have a tree control. When I double click on it, and hit a node, I want to set focus to another control (an edit control), so that I can start typing and have the key strokes go to the edit control.
Just like VC does when you double click on a node in the workspace tree and it takes you to a text editor.
Except that of course this doesn't seem to work.
So I made a simple test case - ran the MFC wizard and created an explorer style app.
Add a OnLButtonDblClk handle to the tree control and in it added code to get the right pane control, and set focus to it.
Sure enough, same behaviour - the right pane temporarily gets the focus but DOES NOT RETAIN IT !!!!!
Is there some magical procedure I have to follow?
Do I need to sacrifice virgins? Goats? Call up the Evil One?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Jim Crafton wrote:
Is there some magical procedure I have to follow?
no there is no magical solution in programming.
Jim Crafton wrote:
Do I need to sacrifice virgins?
errr, if you could send one to me.
Any ways back to the problem,
I believe the best place to set the focus onto another window is in TVN_ITEMEXPANDED notification.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
Hmm, ok, I'll try that, but what about the general principal - is the act of "dbl clicking" some how sending a second focus message back to the control you dbl clicked on so that it stays focused? Plus what do you do if the iten has no children? Then it will NOT recv a TVN_ITEMEXPANDED will it, as there is nothing to expand!?
Curiously, I even try *posting* a WM_SETFOCUS message to the edit control, which had the weird effect of activating the edit's caret, so it was flashing on and off, but the focus was still with the tree control! And keyboard input still went to the tree control!
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
Muwahhhhhaaaahaahaa!
Eureka!
The key is to NOT allow the Default WndProc to get called!
So in MFC land:
void CLeftView::OnLButtonDblClk(UINT nFlags, CPoint point)
{
CMainFrame* frm = (CMainFrame*)AfxGetApp()->GetMainWnd();
CFocusTestView* view = frm->GetRightPane();
view->SetFocus();
}
Note: I commented out the call to the super classes handler. If I put this back, I get the weird behaviour again. Bizarre, but it works. I wonder what weird hidden things this breaks?
¡El diablo está en mis pantalones! ¡Mire, mire!
Real Mentats use only 100% pure, unfooled around with Sapho Juice(tm)!
SELECT * FROM User WHERE Clue > 0
0 rows returned
|
|
|
|
|
yes it will happen, but dont comment it out,instead put it as the first line in the method.
MSN Messenger.
prakashnadar@msn.com
Tip of the day of visual C++ IDE.
"We use it before you do! Visual C++ was developed using Visual C++"
|
|
|
|
|
I'm using SQLExecDirect() to process 'INSERT INTO' statements. I was doing them one insert at a time, but this seems to be slow. I don't wanna use SQLBulkOperations() because that requires binding of the columns which really doesn't seem to be appropriate seeing as this is an import from MySQL to a .dbf or .xls and is pretty dynamic. The problem is this. The regular insert stament works but I'm trying to get one to work like this:
INSERT INTO tblPeople (Firstname,Lastname) VALUES ('John','Doe');
INSERT INTO tblPeople (Firstname,Lastname) VALUES ('Jane','Doe');
INSERT INTO tblPeople (Firstname,Lastname) VALUES ('Mary','Doe');
with the above statements all in one string. The text is formatted right, but the odbc error I get is 'connection error'. Can anyone help? thanks
If it's broken, I probably did it
bdiamond
|
|
|
|
|
'connection error' is a message I had for myself that was cut and paste in the wrong place. So that isn't the error. I do have an odbc error handler, but I'm not getting a message or error number when the statement doesn't execute
If it's broken, I probably did it
bdiamond
|
|
|
|
|
You can only execute query batches against providers that support query batches, such as MSSQL Server and Sybase.
onwards and upwards...
|
|
|
|
|
thanks!
If it's broken, I probably did it
bdiamond
|
|
|
|
|
I have an application with an edit control. I need to write integer values to it...but I want to be able to change the font size to make the number as large as possible. I would also like to set the color. Can someone tell me how to set the font and color?
Thanks.
Jerry
|
|
|
|
|
Assuming the edit control is owned by a dialog, declare a font object in the dialog's class. Then in the OnInitDialog() method, create the font, and call the edit control's SetFont() method.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
|
You'll find that all CWnd derived classes will be similar.
classes? we don't need no stinkin' classes.
|
|
|
|
|
Hello, everyone,
I'd like to know how to handle the help button in property page. In my property page, there are OK, Cancel, Apply and Help button. For OK, Cancel and Apply button, it is easy to handle. I just go to ClassWizard->Message Maps to add function OnOK, OnCancel and OnApply, and then put code into the functions. But I don't know how to handle the help button.
What I can only think of is to get the rect of IDHELP button and then handle the mouse left click message. But I think there should be more straightforward way to handle it.
If you know how to handle it, please drop me a couple lines.
Thanks a lot in advance.
Bin
|
|
|
|
|
Add the following statement to the sheet's message map:
ON_COMMAND(ID_HELP, OnHelp) In the function that creates the sheet object, add:
sheet.m_psh.dwFlags |= PSH_HASHELP;
page1.m_psp.dwFlags |= PSP_HASHELP;
page2.m_psp.dwFlags |= PSP_HASHELP;
...
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|