|
|
|
I know, PreTranslateMessage.
But, What do you mean ?
You mean, i can use WM_CHAR message in PreTranslateMessage ???
Or no ? use PreTranslateMessage itself ?
My month article: Game programming by DirectX by Lan Mader.
Please visit in: www.geocities.com/hadi_rezaie/index.html
Hadi Rezaie
|
|
|
|
|
I have created a number of Active X controls useing MFC and I have tested them in the Active X control Container and they work fine - but when i try to get them to work in IE they don't seem to work.
Does anyone have any examples of what needs to be done to get the active x control to work in IE?
thanks
|
|
|
|
|
What do you mean they don't work? They don't load? IE shows an error message? IE formats your hard drive?
--Mike--
http://home.inreach.com/mdunn/
#include "buffy_sig"
|
|
|
|
|
I'm working with really simply stuff, I'm just following a text bok word for word mouse click for mouse click, and it works exatcly fine in Active X control container. but I've tried to get them to work in IE but they won't
what happens in IE is -
the box where the control should be is shown with a picture symbol
then the page is loading
then the control just stops with out displaying anything and a red x symbol is shown
I'm placed an AfxMessgaeBox call in the InitInstance function and it gets called! in IE. but the OnDraw methode doesn't seem to be called before it stops.
Does any one a simple control that is useing MFC and works in IE. I even just run the Active X wizard in VC++ 6.0 and complied. ran fine in Active X control Container but same result in IE. Please help? I'm totally stuck.
|
|
|
|
|
I have placed TVINSERTSTRUCT as a memeber in a self-defined struct, as follows:
struct MyStruct
{
int data;
TVINSERTSTRUCT tvins;
// etc...
}
When the user clicks on button A, and having selected a particular tree item, i want to amend the value of the member 'data' which is in the same struct as the selected tree item.
I tried to use GetSelectedItem(), bt it returns a HTREEITEM. How do i know which node doe sit belong too?
Thanks in advance.
|
|
|
|
|
I think you are thinking about it backwards. It is probably easier to add your data to the TreeView items. You can accomplist this by using the lParam in the TVITEM. Whenever an item is selected, handle the TVN_SELCHANGED message for your treeview and retrieve the data and modify accordingly.
Mike
Some Code follows:
HTREEITEM tvAddItem( HTREEITEM hParent, LPSTR szText,
HTREEITEM hInsAfter, int iImage,
LPVOID pvData ) // pvData would just be your MyStruct *
{
HTREEITEM hItem;
TVITEM tvI = {0};
TVINSERTSTRUCT tvIns = {0};
// The pszText, iImage, and iSelectedImage members are filled out.
// make sure we set the flag for TVIF_PARAM
if( iImage == -1 )
{
tvI.mask = TVIF_TEXT | TVIF_PARAM;
}
else
{
tvI.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE | TVIF_PARAM;
}
tvI.pszText = szText;
tvI.cchTextMax = lstrlen (szText);
tvI.iImage = iImage;
tvI.iSelectedImage = iImage;
tvI.lParam = (LPARAM) pvData;
tvIns.item = tvI;
tvIns.hInsertAfter = hInsAfter;
tvIns.hParent = hParent;
// Insert the item into the tree.
hItem = TreeView_InsertItem( iv_ctlTreeView.m_hWnd, &tvIns );
return( hItem );
}
// update the data from the TreeView in the SELCHANGED event
// selchange WM_NOTIFY, TVN_SELCHANGED
LPNMTREEVIEW pnTree = (LPNMTREEVIEW) lParam;
MyStruct *pMyStruct;
pMyStruct = (MyStruct *) pnTree->itemNew.lParam;
|
|
|
|
|
I'm using the IE COM object in a program I'm writing, but I'm using it mostly to display files and folders in the user's file system. It's working well except for one problem: there's no way that I can find to set the view style (e.g. List/Icon/Report/Small Icon). Is there any programmatic way of doing this?
Thanks,
Karim
|
|
|
|
|
Sorry for the obvious question, but if you're writing an application presumably in MFC??, and all you care about is files and folders, you should be using the Common Control, CFileDialog.
If you truly WANT to use the IE COM object for this... well, I've never done that but I imagine it closely resembles the MFC object, CWebBrowser. I'd look into that.
|
|
|
|
|
I use the IWebBrowser interface as an ActiveX control to view the files(their contents), and I don’t know how to get hold of its(WebBrowser) automation servers history list, not just navigation through the GoForeward, GoBackward. Also the applications run as not the COM servers.
Thanks, Alexandre
Software developer
|
|
|
|
|
Hi,
I am having this error after compiling the program at line:
rsTemp->Open (SourceTemp, Connect, adOpenForwardOnly, adLockReadOnly, -1);
OR
rsTemp->Open (SourceTemp, Connect, 0, 1, -1);
does anyone know how to repair it?
I am using #import "msado15.dll" and _COM_SMARTPTR for _Recordset
I have the SAME code in other testing program and it works fine. Why ?
thank you
|
|
|
|
|
the problem was in stdafx.h -- after dropping these two lines:
#include "afxdb.h"
#include "afxdao.h"
program works.
|
|
|
|
|
Hi,
I have a question.
How can i have the option of viewing my bmp image in different sizes. (twice as big, tripple,..)
Thanks
Ehsan
Ehsan Behboudi
|
|
|
|
|
Use StretchBlt.
Tomasz Sowinski -- http://www.shooltz.com.pl
|
|
|
|
|
I got a problem in my MFC Application. I have loaded a bitmap in my childwindow with scrollbars. But when I scroll the picture, the picture starts flickering really bad.
Can Anyone help me out.
Vikas
|
|
|
|
|
You need to handle OnEraseBackground to make sure it doesn't erase the background before it is drawn. Also, if you're drawing in OnDraw, use OnPrepareDC instead.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
HI,
I cant understand what u are talking about?
I am not getting OnPrepareDC Option in the Class that I have created.
The problem is whatever I am drawing I am using OnDraw function within my Class.So If I have put that part of code in OnPrepareDC how do I do it.?
Vikas
|
|
|
|
|
You have created a class, or derived it from an MFC class ? Either way, the first port of call is OnEraseBackground. Try that first, and if it doesn't help, I'll be happy to offer more advice, but I'd like to know what your class is derived from.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
I need to disable/enable access to system menu of Child MDI window at run-time. Is it possible?
Petr Mezulanik
|
|
|
|
|
It's a property of the window. Try SetWindowLong, at a guess.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
Hi! I am interested in computer animation and I don't know if I could use visual c++/MFC to make it. All I want is to have a sort of an application that shows a flash screen with animation on it and sounds maybe and I don't know if I could do it in MFC. So if you have tried using MFC/Visual C++ making such things please help me?
|
|
|
|
|
You can create a window that shows Flash in an MFC app. I think from memory it's an ActiveX control you add. If you get stuck, LMK, I have a project kicking around where I did it.
Christian
#include "std_disclaimer.h"
People who love sausage and respect the law should never watch either one being made.
The things that come to those who wait are usually the things left by those who got there first.
|
|
|
|
|
If you are talking about a splash screen. Then just go to add to project->visual C++ folder and click on splash screen. It will automatically generate a CSplash class that will do this flash screen that you are talking about. If you are talking about something else then Oh well.
Big Man On Campus
|
|
|
|