|
Yaa...Need to handle WM_SIZE too
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
see me wrote: Yaa...Need to handle WM_SIZE too
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
hi all
i want to load images which is in a folder to the list box.
Some one Please help me
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
You'll need to make sure the listbox has the LBS_OWNERDRAWFIXED style.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I did this by ticking the check box Owner Draw Fixed.
Is there any other method??
OR how can i load the images to list box from a folder that specified by me????
Dream bigger... Do bigger...Expect smaller
aji
|
|
|
|
|
see me wrote: Is there any other method??
You may also need to handle the following messages:
WM_COMPAREITEM (only if the LBS_SORT style was used)
WM_DELETEITEM
WM_DRAWITEM
WM_MEASUREITEM
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
You can use also from CListCtrl i think its better than CListBox
You can see an example for your answer with CListctrl in codeproject "Thumbnail_demo"
|
|
|
|
|
I want to retrieve history of files printed on a machine using VC++/MFC/C/C++. Can any one help me out ? any ideas ?
i want the foll details:
1.Names of all files printed from machine x
2.Date and Time of printed files
3.Errors if any while printing these files
Thanks in advance,
-Mahesh
Mahesh
|
|
|
|
|
Check out the API calls FindFirstPrinterChangeNotification, FindnextPrinterChangeNotification etc.
|
|
|
|
|
Duncan Edwards Jones wrote: Check out the API calls FindFirstPrinterChangeNotification, FindnextPrinterChangeNotification etc.
AFAIK, I believe that is not the right API to accomplish that
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
Support CRY- Child Relief and You
|
|
|
|
|
|
mahesh kumar s wrote: I want to retrieve history of files printed on a machine...
You mean after they have been printed? I am not aware of such information being retained by Windows.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Unless you have the "keep printed documents" checkbox checked.
|
|
|
|
|
On what Print dialog?
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
The "Advanced" tab on the printer settings dialog.
It saves printed documented spool files (*.spl) in the spool directory - I think there are API calls to find out where they are saved.
|
|
|
|
|
Thanks for the info.
"Money talks. When my money starts to talk, I get a bill to shut it up." - Frank
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello!
I am newbie in VC++.
I am using VS 2005.While trying to compile a project, which is a non-MFC project, I was getting linking errors about duplicate symbols like...
error LNK2005: "public: class ostream & __thiscall
ostream::operator<<(char const *)" (??6ostream@@QAEAAV0@PBD@Z) already
defined in libcimtd.lib(ostream.obj) )?
but when i changed the 'Project/properties/General/Use of MFC' to 'Use MFC in shared DLL', It gets compiled successfully.
What may the problem? As I am not using any MFC functions in my project. Also I am bulding .exe and not.dll.
thx
|
|
|
|
|
sounds like one of the sub-projects is using one set of C Runtimes and another sub-project is using a different set of C runtimes.
the Use Of MFC is one way to change the C-Runtimes, there's another in Project / Properties / C/C++ / Code Generation. make sure all of your projects are using the same CRT setting.
Why donchoo take a peekchur mayn?
OK, cleeeeek
|
|
|
|
|
Thx Chris!!
Actually there is no sub-project. Is it because of other Dll's that I am using? If yes! then shud all my dll's possess same setting?
Also if i am bulding an .EXE application what is the significance of using shared dll??
thx
|
|
|
|
|
i was a little inaccurate to say that it's about sub-projects. it's really about linking libraries (or .obj files) that were compiled with one CRT flavor, while your app (or other libs/objs) uses another CRT flavor.
are you linking to any external .LIBs ?
Why donchoo take a peekchur mayn?
OK, cleeeeek
|
|
|
|
|
Thx for the reply!
Yes I am using external librararies.
I am using LIb as well as Dll.
But these libraries also not using MFC. Also when I first compiled the project, it compiled successfully with option USE MFC IN SHARED DLL. But then I cleaned the solution, and rebuild again with option USE STANDARD WINDOWS LIBRARIES and again it compiled successfully!
Does that means all libraries are linked just once..??
|
|
|
|
|
sach!! wrote: But these libraries also not using MFC
this is not an MFC problem. you just need to make sure that all your .LIBs and your EXE are built using the same C-runtime library / Code Generation settings.
Why donchoo take a peekchur mayn?
OK, cleeeeek
|
|
|
|
|
hi all i want to make the packet filtering application that take the port and ip adress and then block that port i m using this code.
what i want is to block http port so that any one cannot open website i m using vc6 with windows 2000. the code is given below.
if(::PfCreateInterface(0,PF_ACTION_FORWARD,PF_ACTION_FORWARD,false,true,&ihandle)==NO_ERROR)
{
BYTE ip[4]={202,165,250,50};
BYTE msk[4]={255,255,255,0};
BYTE dm[4]={0,0,0,0};
inFilter.dwFilterFlags = FD_FLAGS_NOSYN;//always this value
inFilter.dwRule = 0; //always this value
inFilter.pfatType= PF_IPV4; //using ipV4 addresses
inFilter.SrcAddr= (PBYTE)ip;
inFilter.SrcMask= (PBYTE)msk; //mask for local ip
inFilter.DstAddr= (PBYTE)dm; //any destination
inFilter.DstMask= (PBYTE)dm;
inFilter.wSrcPort=FILTER_TCPUDP_PORT_ANY;//any source port inFilter.wSrcPortHighRange=FILTER_TCPUDP_PORT_ANY;
inFilter.wDstPort=80; //destination port 80(http service)
inFilter.wDstPortHighRange=FILTER_TCPUDP_PORT_ANY;
inFilter.dwProtocol =(DWORD)FILTER_PROTO_ANY; //Tcp protocol
DWORD err;
err=::PfAddFiltersToInterface(ihandle,1,&inFilter,0,NULL,&fHandle);
if(err==NO_ERROR)
{
AfxMessageBox("Add Filters to interface");
if(::PfBindInterfaceToIPAddress(ihandle,PF_IPV4,(PBYTE)ip)==NO_ERROR)
Tasleem Arif
|
|
|
|
|
Hi.
I'm trying to create a list control in VC7 dialog and set images as list control icons.
Images are not showing in the list control for some reason.
this is my code,.
CDialog::OnInitDialog();
CRect rect;
m_ctrlConfigList.GetWindowRect(&rect);
int index =1;
LVCOLUMN cdcolumn;
cdcolumn.mask = LVCF_IMAGE;
cdcolumn.fmt =LVCFMT_LEFT;
cdcolumn.iImage = 0;
cdcolumn.iOrder = 1;
CBitmap bm;
bm.LoadBitmap(IDB_BITMAP6);
CImageList lstImageList;
lstImageList.Create(32,32,ILC_COLOR16,0, 4);
m_ctrlConfigList.SetImageList(&lstImageList,LVSIL_NORMAL);
int n = lstImageList.Add(&bm, RGB(255, 255, 255));
LVITEM item;
item.mask = LVIF_IMAGE | LVIF_TEXT;
item.iItem = 1;
item.iSubItem = 1;
item.iImage = n;
m_ctrlConfigList.InsertItem(&item);
Please help.
Thanks.
|
|
|
|
|
See Here[^] maybe it is some helpful to you
|
|
|
|