I found a solution (may be little amateuristic, but works). Generate an MFC class fown Shockwave Flash ActiveX. Override the PreTranslateMessage
: BOOL CShockwaveFlash::PreTranslateMessage(MSG* pMsg) { // TODO: Add your specialized code here and/or call the base class if(pMsg->message == WM_RBUTTONDOWN) { //Wow wasn't right click dude! pMsg->message = WM_LBUTTONDOWN; } return CWnd::PreTranslateMessage(pMsg); }
The job is done!
johnnyXP
Posts
-
Disable popup menu in Macromedia Flash ActiveX -
Disable popup menu in Macromedia Flash ActiveXAs you propably know when you right click on Flash ActiveX control you get a popup menu with at least one entry: "About Macromedia Flash Player". I know that is not legal (without license from Macromedia) to change the methods of the control, but i just wondering if there is any way to kill the popup when user right clicks the control. Thanks in advance.
-
Bitmap button dose not displayedI have created a SDI application (with no Document/View) support. I 'm trying to attach a
CBitmap
button, but dose not displayed at all. Here is my code (that handles theWM_CREATE
message on theCChildView
class):int CChildView::OnCreate(LPCREATESTRUCT lpCreateStruct) { if (CWnd::OnCreate(lpCreateStruct) == -1) return -1; // TODO: Add your specialized creation code here RECT rect; rect.left = 20; rect.right = rect.left + 20; rect.top = 100; rect.bottom = rect.top + 20; CBitmapButton bnPlay; if(bnPlay.Create(NULL, WS_CHILD|WS_VISIBLE|BS_OWNERDRAW, CRect(&rect), this, IDC_BN_PLAY)==0) { AfxMessageBox("BnPlay cannot be created", MB_ICONSTOP); return -1; } //IDB_BNPLAY is the resource bitmap bnPlay.LoadBitmaps(IDB_BNPLAY/*, 0, 0, 0*/); bnPlay.SizeToContent(); return 0; }
The result of this code is an empty window... :mad: -
Set client rectangle:~ The question is straight: any ideas how i can set the client area of an mfc dialog?
-
Icon association with non-executable fileI don't know if here is the right place for this question. I'm creating a setup project in Visual Studio .Net and i want to register a file type (say .jk) with a custom icon. In VS enviroment the only way to do this (i think) is to associate the file type with an executable. But this is not my case. I want the file .jk just to have my icon and nothing more. As you know there are files in Windows that display custom icons but are not associated with executables, so when you double click them you get a shell "Open With" dialog. Any ideas how to deal with this?
-
Rezide dialog based application windowI had pass wrong value to the
pWndInsertAfter
parameter toSetWindowPos
. Thans for your time. -
Rezide dialog based application windowThis is a simple question. I have a dialog based application window and i want to resize it before displayed on the screen. I used the
PreCreateWindow
and theSetWindowPos
withinOnInitDialog
but without success. What i'm doing wrong? -
MSXML DOM helpI' ve got it. Thanks.
-
MSXML DOM helpI have the MSXML SDK documentation. Actually i can't understand how to iterate throw all "album" nodes and also how to iterate within an album node to get all tracks... I have do the same job in C# with .NET framework, but i can't in MSXML ...
-
MSXML DOM helpI'm trying to use MSXML 4 DOM to parse a xml document in Visual C++, but without success. A snippet of the xml structure is a following: Can anyone give me a code snippet to parse album label, track label, sndUrl, txtUrl attributes to a CString? Please help! Thanks in advance for any answers.
-
MSXML DOM helpI'm trying to use MSXML 4 DOM to parse a xml document in Visual C++, but without success. A snippet of the xml structure is a following:
-
Help with SetItemData/GetItemData of CTreeCtrlI have a dialog based class named CJKDlg, with a tree control with name treeTracks. In the JKDlg.h i have defined the following structure:
struct _itemData { CString strData; };
In the OK click event i have the following handler:void CJKDlg::OnBnClickedOk() { CStdioFile stdFile; CString str; if(! stdFile.Open("test.txt", CFile::modeRead)) { AfxMessageBox("Cannot find initialization file", MB_OK, MB_ICONSTOP); return; } TVINSERTSTRUCT tvInsert; tvInsert.hParent = NULL; tvInsert.hInsertAfter = NULL; tvInsert.item.mask = TVIF_TEXT; HTREEITEM hAlbum, hItem; char ch; CString albumTitle, trackTitle, trackPath; _itemData* pItemData = new _itemData(); while(stdFile.ReadString(str)) { ch = str.GetAt(0); if(ch=='$') { albumTitle = str.Right(str.GetLength()-1); //TRACE1("%s\n", albumTitle); tvInsert.item.pszText = albumTitle.GetBuffer(albumTitle.GetLength()); hAlbum = m_treeTracks.InsertItem(&tvInsert); pItemData->strData = "OK"; m_treeTracks.SetItemData(hAlbum, DWORD(pItemData)); } } delete pItemData; }
In last a double-click event handler for the tree control:void CJKDlg::OnNMDblclkTreeTracks(NMHDR *pNMHDR, LRESULT *pResult) { HTREEITEM hItem = m_treeTracks.GetSelectedItem(); ASSERT(hItem); _itemData* pItemData = new _itemData(); pItemData = (_itemData *)m_treeTracks.GetItemData(hItem); if(pItemData) { TRACE1("%s\n", pItemData->strData); } delete pItemData; *pResult = 0; }
The TRACE macro dose not display the "OK" string. Instead in the output window a white space displayed. Can anyone help me with this please? -
Transparent ActiveXHi to all. I'm trying to programm Macromedia's Flash ocx under Visual C++. It is known that this control cannot support transparent background. But there are in the market third party programms that enable transparency in the control. Can give me a help how to make transparent the background of the control? Thank's bros.
-
CString to LPCTSTRHow i can convert a CString to LPCTSTR? I can't found an easy solution for this. Please give a help. Thank's bros.