|
That is what we found as well. Also we got DIME working between ASP.NET (IIS) and Tomcat. It wasn't easy but it works.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
How can i load the icon from antother application/process and set it as the icon for a MFC list control item
|
|
|
|
|
hi!
I never did THIS but... here is a code sample
how to load some ressource from a DLL
extern "C" DllExport BYTE* GetLogo(int &nSize) {
DWORD dw;
HRSRC hRes = FindResource(g_hInstance,_T("IDR_LOGO"),_T("Images"));
dw = GetLastError();
HGLOBAL hg=LoadResource(g_hInstance,hRes);
LPVOID lpRes=LockResource(hg);
nSize = SizeofResource(g_hInstance,hRes);
dw = GetLastError();
return (BYTE*)lpRes;
}
I think you have just to get the HINSTACE to the app you want, and then load the ICON from it!
good luck!
|
|
|
|
|
dear fellow i making final project of video compression mpeg to mp3.... i also need to build media player and codec for it....
i need help for codec because in MFC i don,t hv any idea about codec kindly help me
if any body could help kindly mail me at moeen_ud_din@hotmail.com or leave a messsage here thanks
|
|
|
|
|
The DirectX SDK (DirectShow) is one of the best starting points for writing codecs. You can download it from microsoft.
If you can keep you head when all about you
Are losing theirs and blaming it on you;
If you can dream - and not make dreams your master;
If you can think - and not make thoughts you aim;
Yours is the Earth and everything that's in it.
Rudyard Kipling
|
|
|
|
|
I have a project that will use a tabbed control (property pages?) as the primary interface. The tabs are arranged in such a way as to guide the user in the proper order of steps. Anyway, given that I need a title bar, a menu bar and possibly a toolbar - and eventually the whole thing needs to be sizeable, which is the best interface to use: MDI, SDI, or Dialog based?
I've done a lot of C++ coding, but have very little experience in "starting from scratch" - so I plan to use the wizard in Microsoft's Visual C++ to get me started.
Any suggestions, pointers to articles, etc. would be greatly appreciated.
Thanks!!
|
|
|
|
|
Do you need multiple document support? If not, then you can rule that app structure out. From what you have been saying, a SDI style app with a CFormView view class. That would probably be your easiest straightforward path to take.
Keep in mind that you could use a CDialog-based application structure. Toolbar(s) can be added to a dialog and of course a menubar. There are articles on this site of how to add a toolbar to a dialog. Skim the articles on this page for help on adding resizability and toolbars to a dialog: http://www.codeproject.com/dialog/[^]
I hope this helps. Good luck in your programming efforts!
Happy Programming and God Bless!
Internet::WWW::CodeProject::bneacetp
|
|
|
|
|
Thanks, bneacetp. I've been doing some more study since my post, and at this point I think I'm leaning toward the learning curve of the SDI style - since I'll eventually need most of what it does (including printing from the app, resizing, etc)
Thanks, also, for the well wishes!
Happy Programming and God Bless to you, as well!
-The Pilgrim
"There are no absolutes" is an absolutley illogical statement...
|
|
|
|
|
I have a MFC Dialog which contains a Bitmap. When the application is run the dialog is always on top and I cant have any other Windows placed over it.
I have looked at the Dialog settings and cant find any that would cause this effect (problem).
Have I overlooked anything as I want to place the dialog in the background when required.
grahamfff
|
|
|
|
|
|
I have a "Generic CWnd" class named CData. This class will hold all of my data for the program. The "instance" is created in the CMainFrame constructor. Serveral dialog classes are created and launched fron the CData class. However, I cannot get the data from those dialogs realized or recognized by CMainFrame::m_CData(my instance of CData class in CMainFrame). The dialogs are created "modeless" in CData; and while active CData gains the data; but when returned to CMainFrame the data is not there in CData.
Any ideas?
LAM
Programming! - Isn't it Great!
See you in CyberSpace!
|
|
|
|
|
Sorry if sounds patronising
have made the CDialog objects or the getter methods public in the CData class?
If you clarify what your are trying do.
|
|
|
|
|
what is Wrong in my Code Follow .Why Add Text not display in Listview Control Write by C API
#include <windows.h>
#include "stdafx.h"
#include <commctrl.h>
#include "resource.h"
#include <stdio.h>
HINSTANCE G_hInst;
HWND G_hwnd;
HWND hComBox;
BOOL Init_Listview(HWND );
int Add_Item(HWND hwndListView,LPTSTR textItem);
void Add_SubItem(HWND hwndListView,LPTSTR textSubItem,int col);
BOOL CALLBACK DialogProc(HWND hWnd, UINT Message, WPARAM wParam, LPARAM lParam);
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, PSTR szCmdLine, int iCmdShow)
{
G_hInst=hInstance;
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls.dwICC = ICC_LISTVIEW_CLASSES;
InitCtrls.dwSize = sizeof(INITCOMMONCONTROLSEX);
BOOL bRet = InitCommonControlsEx(&InitCtrls);
DialogBoxParam(hInstance, MAKEINTRESOURCE(IDD_DIALOG), NULL, (DLGPROC)DialogProc,0);
return 0;
}
BOOL Init_Listview(HWND hwndListView)
{
//SetExtendedStyle(LVS_EX_GRIDLINES|LVS_EX_CHECKBOXES|LVS_EX_FULLROWSELECT );
HIMAGELIST himlSmall;
HIMAGELIST himlLarge;
LPTSTR lpszCols[] = {TEXT("Column Name"),TEXT("Data type"),TEXT("Length"),TEXT("Allows Nulls"),0};
LVCOLUMN lvColumn;
//initialize the columns
lvColumn.mask = LVCF_FMT | LVCF_WIDTH | LVCF_TEXT | LVCF_SUBITEM|LVS_EDITLABELS;
lvColumn.fmt = LVCFMT_LEFT;
lvColumn.cx = 100;
for(int x = 0; lpszCols[x]!=NULL; x++)
{
//make the secondary columns smaller
if(x)
lvColumn.cx = 100;
lvColumn.pszText = lpszCols[x];
//InsertColumn(x,&lvColumn);
ListView_InsertColumn (hwndListView, x, &lvColumn);
}
himlSmall = ImageList_Create(16, 16, ILC_COLORDDB | ILC_MASK, 1, 0);
himlLarge = ImageList_Create(32, 32, ILC_COLORDDB | ILC_MASK, 1, 0);
if (himlSmall && himlLarge)
{
/*
HICON hIcon;
//set up the small image list
hIcon = LoadImage(g_hInst, MAKEINTRESOURCE(IDI_DISK), IMAGE_ICON, 16, 16, LR_DEFAULTCOLOR);
ImageList_AddIcon(himlSmall, hIcon);
//set up the large image list
hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISK));
ImageList_AddIcon(himlLarge, hIcon);*/
ListView_SetImageList(hwndListView, himlSmall, LVSIL_SMALL);
ListView_SetImageList(hwndListView, himlLarge, LVSIL_NORMAL);
}
return TRUE;
}
/////////////////
int Add_Item(HWND hwndListView,LPTSTR textItem)
{
LVITEM lvItem;
int iItem=SendMessage(hwndListView,LVM_GETITEMCOUNT,0,0);
memset(&lvItem,0,sizeof(lvItem));
lvItem.mask = LVIF_TEXT|LVIF_DI_SETITEM|LVIF_STATE;
lvItem.iItem = iItem;
lvItem.iSubItem =0;
lvItem.pszText = textItem;
return ListView_InsertItem(hwndListView,&lvItem);
}
////////////////////////////////////
void Add_SubItem(HWND hwndListView,LPTSTR textSubItem,int col)
{
int row=0;
LVITEM lvItem;
row = SendMessage(hwndListView,LVM_GETITEMCOUNT,0,0);
row=row-1;
lvItem.mask = LVIF_TEXT|LVIF_DI_SETITEM|LVIF_STATE;
lvItem.iItem = row;
lvItem.iSubItem = col;
lvItem.pszText = textSubItem;
SendMessage(hwndListView,LVM_SETITEM,0,(LPARAM)&lvItem);
}
//////////////////////////////////////////////
BOOL CALLBACK DialogProc(HWND hDlg, UINT Message, WPARAM wParam, LPARAM lParam)
{
int iSelect=0;
HWND hList=NULL;
switch(Message)
{
case WM_INITDIALOG:
{
InitCommonControls();
// OleInitialize();
hList = GetDlgItem(hDlg,IDC_LIST);
DWORD dwExStyle = LVS_EX_FULLROWSELECT|
LVS_EDITLABELS|LVS_EX_GRIDLINES |LVS_EX_HEADERDRAGDROP|LVS_EX_CHECKBOXES|LVS_OWNERDRAWFIXED ;
Init_Listview(hList);
ListView_SetExtendedListViewStyle(hList,dwExStyle);
//Add_Item(hList,TEXT("hang 1"));
}
break;
case WM_COMMAND:
{
switch(LOWORD(wParam))
{
case ID_BTN_DELETE:
EndDialog(hDlg,0);
break;
case ID_BTNADDITEM:
Add_Item(hList,TEXT("Add Item text"));
break;
case ID_BTNADDSUBITEM:
{
Add_SubItem(hList,TEXT("Add Sub Item"),1);
Add_SubItem(hList,TEXT("Add Sub Item"),2);
Add_SubItem(hList,TEXT("Add Sub Item"),3);
Add_SubItem(hList,TEXT("Add Sub Item"),4);
}
break;
}
break;
}
break;
case WM_NOTIFY:
{
switch(LOWORD(wParam))
{
case IDC_LIST:
if(((LPNMHDR)lParam)->code == NM_CLICK)
{
// do some stuff here
iSelect = SendMessage(hList,LVM_GETNEXTITEM,-1,LVNI_FOCUSED); // return item selected
ListView_SetBkColor(hList, RGB(0,255,0));
}
if (((LPNMHDR)lParam)->code == NM_HOVER)
{
// xuli chuout lan o day
ListView_SetBkColor(hList, RGB(0,255,0)); // blue component of color
}
if (((LPNMHDR)lParam)->code==NM_SETFOCUS)
{
}
}
break;
}
break;
case WM_CLOSE:
{
EndDialog(hDlg,0);
return 0; // kill dialog
}
break;
}
return FALSE;
}
Doan code above Not display Text of Item and text SubItem
When Click Mouse on button AddItem or Button Add subItem
who discover Problem Please Show me.
Huynh van sen
|
|
|
|
|
Check out http://www.codeproject.com/listctrl/listview.asp for a good intro to Listviews under Win32 API using C.
|
|
|
|
|
how to get hash from BYTE *pass to HCRYPTHASH hHash using
CryptCreateHash and CryptHashData
//in this program hash doesn't change =(
HCRYPTPROV hCryptProv;
CryptAcquireContext(&hCryptProv, NULL, NULL, PROV_RSA_FULL, 0);
HCRYPTHASH hHash;
CryptCreateHash(hCryptProv,CALG_MD5, 0, 0, &hHash);
CryptHashData(hHash,pass,strlen(fPass)+1,0);
|
|
|
|
|
You're just missing the final step.
1. Get a CSP handle - CryptAcquireContext()
2. Create a hash object and specify hash algorithm - CryptCreateHash()
3. Add data to hash - CryptHashData() or CryptHashSessionKey()
4. Keep doing 3 until added all data
5. Finish hash and get result :
::CryptGetHashParam(hnd, HP_HASHVAL, BUFF, &BUFFLEN, 0); // BUFF is hash value
or,
::CryptSignHash(hnd, T, NULL, F, BUFF, &BUFFLEN); // BUFF is result signature
or,
::CryptVerifySignature(hnd, BUFF, BUFFLEN, pub, NULL, F); // BUFF is signature to verify
Each of these functions will finish the hash (i.e. add any algorithm required padding), meaning that any subsequent calls to CryptHashData() or CryptHashSessionKey() will fail. However, you can call any of these 3 multiple times safely, the hash is only 'finished' (padded) once.
...cmk
Save the whales - collect the whole set
|
|
|
|
|
Does anybody know how to draw the background for toolbars and rebars so that they match the currently selected XP colour scheme (blue, olive or silver). Th latest version of Office implements this so I assume it is possible to retrieve the background details via some API. The visual styles help in MSDN is very brief so any help you can give will be appreciated.
Steve.
Systems AXIS Ltd - Software for Business ...
|
|
|
|
|
|
Actually, I don't think Office uses a 'public' API for this. If you run Office 2003 on Win2K you still get the same visual effects, even though Win2K doesn't support those effects itself.
Software Zen: delete this;
|
|
|
|
|
|
How can I use C++ Dll that contains class in Delpphi&& Help!! SOS!!
|
|
|
|
|
Short answer: not possible cos delphi cannot use C++ obj/lib/dll files.
in anycase, u cannot use the dll with a c++ if u dont have the lib file. i believe though there are some tools that can create a lib file from a dll (msvc++ has one i think)
Bikram Singh
|
|
|
|
|
>> delphi cannot use C++ obj/lib/dll files.
That is not entirely accurate.
They cannot use each others classes but they can access C calling convention exported functions from DLL’s.
So the long answer is you would have to un-object orient the C++ class in a C++ DLL by exposing the functionality through a set of C style functions. Then the Delphi application can call the functions in the C++ DLL.
"No matter where you go, there your are." - Buckaroo Banzai
-pete
|
|
|
|
|
Hi,
I need to implement Span tag with style (overline etc) in vc++ can body help me out plz...
Helping hands are greater than Praying lips
lokesh
|
|
|
|
|
Hi
I want to set span tag with style(overline etc) and all to a text how do i do it? Thanx in advance
lokhes
|
|
|
|
|