|
Dear Graus
Hi
Thanks once agian for ur advice.As i written to you before i am doing this using cut and paste method by copying the contents to my window or u can say it as output display.and there only i am modifying it,say changing the font.
But i wanted to do it in another way.now i don't want to paste and put it into output display but want to change their only from where i am copying.
how it will be possible and if possible kindly give me example or please tell me about that instruction.
Thanking you in advance and once again thanks for replying.
Bye
Binay
|
|
|
|
|
I want to load a bitmap from a specified location on my hard drive eg: "C:/bg.bmp" rather then using a resource bitmap like LoadBitmap(IDB_MYBITMAP)
Any suggestions would be excellent, thanks
Ryan
|
|
|
|
|
|
Thank Mike, you rock.
I used
CBitmap bmp7;
bmp7.Attach(::LoadImage(::AfxGetInstanceHandle(),"C:\\bg.bmp", IMAGE_BITMAP,0,0,LR_LOADFROMFILE));
Worked great.
-Ryan
|
|
|
|
|
Be aware about Mike's suggestion of using LoadImage() that the flag LR_LOADFROMFILE does not work in Windows NT. If that poses a problem to you, have a look at Chris Maunder's DIBSection wrapper for Win32 and WinCE, which does the job of loading a .bmp file without resorting to LoadImage() .
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Is this documented somewhere? I found no mention of this restriction in MSDN or the KB.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|
|
Whis is a weird thing, you know, cause I wasn't able either to find this restriction on the MSDN as it is on the web. Nevertheless, my online documentation (arguably pretty much outdated, MS Visual Studio 97) says explicitly
<bold>Windows NT: LR_LOADFROMFILE is not supported.
Moreover, if you do a search on Google with
LR_LOADFROMFILE "not supported"
a number of entries appear repeating this assertion. Maybe the documentation is wrong and the guys from Microsoft silently corrected it, maybe the capability was added to NT with some SP everybody's assumed to have installed, who knows. IMHO this definitely deserves some investigation, I'll post anyting here I come up with.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
Well, after some searching on USENET archives, seems that LR_LOADFROMFILE is indeed supported since NT 4.0 (and even before than that), and the claim on the documentation is simply false, and eventually was removed. Some of the articles I found relevant to the issue are: (BTW, one of the folks is well known here in CodeProject)
- Naughter, PJ: Re: LoadImage not supported under NT?, comp.os.ms-windows.programmer.win32, 1998/01/26
- Chen, R: Re: Does LoadImage(..) work with LOADFROMFILE under NT 4.0 ?, comp.os.ms-windows.programmer.win32, microsoft.public.win32.programmer, 1998/02/04
- Naughter, PJ: Re: Loading bmp file using LoadImage on Windows NT 4.0, microsoft.public.vc.mfc, microsoft.public.win32.programmer.gdi, microsoft.public.win32.programmer.ui, 1999/01/29
So, my apologies to all, and good luck using LoadImage()
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I recently found article Q264347 regarding the behavioral differences between NT (2000 & XP) vs. Win9x. It says LoadImage() could fail in NT due to biSizeImage being invalid in the BITMAPINFOHEADER struct. But I don't get it how to remedy the invalid value prior to loading via LoadImage().
I've also recently discovered that XP doesn't have a problem loading uncompressed .BMPs, but won't load by 4-bit RLE bitmap files. What's the deal?
Cliff Hall
|
|
|
|
|
LR_LOADFROMFILE does not work in Windows NT
This is false. LR_LOADFROMFILE does work on NT.
Tomasz Sowinski -- http://www.shooltz.com
|
|
|
|
|
I am writing a quick and dirty utility to delete some files and removes a couple of directories. This is for internal use only and is to save me going to everyone's laptop and doing the deletion myself. Also several staff are interstate so I can't get to their laptop's anyway.
If you think I am not giving much credit to my colleagues inteliigence read the next sentence. I am currently fixing someone's laptop because they installed typing software for their girlfriend on the laptop running NT. A quick read of the package said not or NT.
Anyway on with the problem. ::DeleteFile() works a treat and I successfully delete all files in the directory. The directory is now empty, no other process is using this directory that I know of. No programs were running from this directory. When I call ::RemoveDirectory it fails and returns 32. The description is as follows The process cannot access the file because it is being used by another process..
This is a directory I created to add a couple of icons, .pif's and batch files to allow staff dialled in to access Novell shares. These shares are no longer valid, so I want to remove the staff's ability to try and conect. Their that stupid.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
i don't know really how to help you.. but maybe this hint will help you..
i wanted to delete a directory.. deleted all the files... perfect.
then i wanted to delete the directory -> same error..
the error accured because of a shortcut on the desktop of my computer.. pointing to a file in the directory (i've deleted).. i thought this whole behavior is VERY odd..
have a nice time
bernhard
ölaöejrktjaskdlfjklasödjfklasjdkfljasklödjflkasödjf (wer Schwedisch spricht, versteht sich selber nicht!)
|
|
|
|
|
I have a shortcut on the Desktop pointing to this directory. It maybe the problem will give it a go. thanks very much.
Michael Martin
Pegasystems Pty Ltd
Australia
martm@pegasystems.com
+61 413-004-018
"Don't belong. Never join. Think for yourself. Peace"
- Victor Stone
|
|
|
|
|
I create by ATL dll file for delphi .
out of dll file I have to provide files as .def or .lib etc ?
|
|
|
|
|
You need to provide the type library (.tlb). Delphi can import this.
|
|
|
|
|
I need provide dll for delphi another languages .
I maked extension DLL and it is not work in another languages .
Can I make a regular dll that import in own the extention DLL
and provide the last dll(that use in the first dll) ?
Please help !!!!!
:rolleyes
|
|
|
|
|
How can this circular linked list coding be implemented to be a linked list ?
#include <iostream.h>
#include <stdio.h>
#include <stdlib.h>
class Cell {
int info;
Cell *next;
Cell (int i)
{
info =i; next=this;
}
Cell( int i, Cell * n)
{
info=i;next=n;
}
friend class List;
};
class List {
Cell * rear;
public :
void put (int);
void push(int);
int pop();
int empty() {return rear==rear->next;}
List() {rear=new cell (0);}
~List() { while (!empty() ) pop (); }
};
|
|
|
|
|
Whoah!!! It's a bad idea to write your own collection classes in 99% of cases - just use STL's vector<int&rt; or list<int&rt;. Also, when the list is empty the rear pointer should be NULL because there would be no items in the list. If the rear pointer contained a valid pointer and it's next value pointed to itself then there would be one item in the list. Thus, a correct implementation would have the constructor set the rear pointer to NULL, the empty function would return (rear == NULL); and the put, push and pop would have to be modified to identify the special case of having an empty list.
Hope that's helpful. If you really need to do your own list then let me know and I'll try and give you some pointers (no pun intended ). Here are the basic charcteristics:
- have a pointer to the first or last item in the list
- each node has a pointer to the next (or previous), or both next and previous item in the case of a doubly linked list
- the first node's pPrev pointer is always NULL
- the final node's pNext pointer is always NULL
--
Andrew.
|
|
|
|
|
I'd venture a guess that he's stuck on an assignment. Why else would you write your own list ?
Having said that I have no problem helping him, he's obviously had a go at it and is asking for help from there.
Christian
As I learn the innermost secrets of the around me, they reward me in many ways to keep quiet.
Men with pierced ears are better prepared for marriage. They've experienced pain and bought Jewellery.
|
|
|
|
|
??
Just looking for a simple solution, but I haven't found one. Any ideas. I just want to separate the rows with a thin horizontal line.
Please, any response any one can give me will be greatly appreciated.
Sincerely,
Danielle (an overworked graduate student)
|
|
|
|
|
If you need to have gridlines in a CListBox, you will have to draw them yourself. There's a whole section here on owner drawn listboxes, it's not hard.
However, if you can use a CListCtrl class, you can get gridlines free, just by setting the LVS_EX_GRIDLINES extended style. Nice, eh?
|
|
|
|
|
I'm trying to throw some text at a window, such as sending "Hello" to an open Notepad window.. and I'm guessing I should use the SendInput() function. Can anyone give me a simple example of how to use this function, because I can't get anywhere with it... thanks.
|
|
|
|
|
|
I am having problems with my owner-drawn toolbar. I am programming in Win32 so, no MFC code can fix this problem.
I need to be able to get rid of the default highlight of items that have the TBSTATE_MARKED state and in the MSDN library tells me that when the dwDrawStage of the custom draw is at CDDS_ITEMPREPAINT, I should return the TBCDRF_NOMARK value but the problem is that the dwDrawStage is NEVER CDDS_ITEMPREPAINT. It is only ever CDDS_PREPAINT. Can anyone get this to work? Do I need to set each of the toolbar buttons to TBSTYLE_CUSTOMDRAW as well?
Thanks in advance,
James Bird - birdjames@bigfoot.com
|
|
|
|
|
In the prepaint stage, you need to return CDRF_NOTIFYITEMDRAW to get custom draw messages for each button.
--Mike--
http://home.inreach.com/mdunn/
"The Earth is doomed." -- Rupert Giles
your with and
|
|
|
|