|
I have a dos program (like dos program).
I want to exec this program from visualc but i do not want that that dos_program shows a
its window.
thx.
|
|
|
|
|
use
ShellExecute(m_hWnd, "open", your_programs_name, parameters, defaul_folder, SW_HIDE);
Mustafa Demirhan
|
|
|
|
|
HI
Strange kind of class
Some times I see this class like below :
LINE 1 : class CImage;
LINE 2 : class CTestpicDlg : public CDialog
LINE 3 : {
LINE 4 : // Construction
LINE 5 : public:
LINE 6 : void draw();
LINE 7 : CImage *image;
LINE 8 : CTestpicDlg(CWnd* pParent = NULL); // standard constructor
LINE 9 : }
So my question is about two thing's :
1- (CImage)class ,it hasn't any braces and !!!
2- The (CImage)class defined in cimage.lib which I append it in my project
so why I must write LINE 1, if I omit this line I get alot of errors like :
error C2143: syntax error : missing ';' before '*'
error C2501: 'CImage' : missing storage-class or type specifiers
Thank you ...
AHMAD ALWASHALI
|
|
|
|
|
LINE 1: Class CImage; is a forward reference to another class that lets the CTestPicDlg class know what to do with the LINE 7: CImage *image ptr type ... excluding LINE 1: gives compile errors cos the compiler then doesnt know what CImage is
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Thank you lauren
but (CImage)class defined in cimage.lib which I append it in my project
can you tell me please
AHMAD ALWASHALI
|
|
|
|
|
The compiler can't know anything about classes inside .lib files, they are only used in the link phase. The CImage class must be declared in a source file (.cpp or .h) so that the compiler can see it.
|
|
|
|
|
HI
One day ,the weather is very nice ,every thing
working properly .
When I work in my project by visual c++6 , but!!!
suddenly ominous message appeared it's tell me that :
Out of memory
I don't know what I did ,my project is very small.
When I open my project by (.dsw) nothing appear and
by (.dsp) the ominous message appear ...
any one can help me please ...
Thank you ...
AHMAD ALWASHALI
|
|
|
|
|
I'd hazard a guess and say you're developing under Win9x.
I had the same thing a little while ago (I'd never seen it before, even on much larger projects).
The solution I found was to setup the virtual memory settings myself, rather than let the OS manage it (actually, this isn't a bad idea on a development machine, since it can reduce swapfile fragmentation).
I hope this helps!
Andy Metcalfe - Sonardyne International Ltd (andy.metcalfe@lineone.net) http://www.resorg.co.uk
"I used to be a medieval re-enactor, but I'm (nearly) alright now..."
|
|
|
|
|
HI
Question about IPicture
As I know IPicture class can work whith custom types which
I can find it in PICTYPE enumeration (look in MSDN)
but when I went to
codeproject>> Bitmaps & Palettes >> Bitmaps
and then( Simple class for drawing pictures )
I found I can load other types like jpg, tif, gif(but tif didn't work)
Is this secrets so it most didn't apear in MSDN or what !!!
Thank you ...
AHMAD ALWASHALI
|
|
|
|
|
Hi,
Can I lock an edit box , say a password field such that no other application can acess the contents of that field.
Thanks
|
|
|
|
|
Interesting question. I suppose you could subclass the window and watch for WM_GETTEXT messages, and return an empty string or "sodoff" or whatever you want.
Oh, you should handle WM_GETTEXTLENGTH as well, to hide the length of the text.
--Mike--
http://home.inreach.com/mdunn/
The preferred snack of 4 out of 5 Lounge readers.
|
|
|
|
|
"sodoff" ... rofl ... thats cute
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
Hi!
Is this in any ways related to Cracking? If so, there would not be any chance if the NuMega SoftIce is around (most of the time is)!
As for Mike's post, still the WM_GETTEXTxxx will be caught and user/programmer will get the edit box's contents just coz it is a message and will be possible to set a break on it!
As I mentioned above, if it is Cracking related, then perhaps you could try using other methods rather than plain edit box, lock and even masking it with the * characters, you may know that the * are easily revealed. There is an article on coeguru I guess with source/demo.
Good Luck!
|
|
|
|
|
Hello,
I'm new to visual development and am stuck. I've got a main app window with several children in it. The children are DirectShow movie windows and dialog boxes I created to control the movies. When a play button is clicked I need to know which dialog box the command came from, to play the correct movie, how do I do this?
I tried to get the active window and figure it out that way but my child windows are never active, only the main parent window. If I could change this so that the dialog box where the command comes from is active things would be ok, does anyone know if this is possible?
Thanks for any help!
luedee@yahoo.com
|
|
|
|
|
Sounds like each dialog is built from the same template, so their control IDs are all the same. Hmmm...
Well, if the dialog with the play button knows what movie to play (or has some distinguishing data) you could set up a custom windows message that would be posted when the play button is hit. Create a handler in the main wind (perhaps using ON_MESSAGE macro, if MFC) to get all these notifications. When you post the message inside OnPlay, the wparam or lparam can be set with some indication of who posted the message, and your main handler can switch on that.
I know this is a little short on detail, but I think if you search this forum for ON_MESSAGE you'll get some tips.
|
|
|
|
|
I'm coming to the end of my inaugural WTL project and I've hit an odd snag. I am filling a listctrl with ID3 tages, editing them and writing them out again. I'm using someone elses ID3 class ( although it needed so much work I may as well have written it ;0) and it will NOT append a file with ID3V1 information for me. As soon as the info is there, I can overwrite it, but otherwise, I just cannot write to the file. It's not read only, and I've tried using
SetFilePointer(fHandle, 128, 0, FILE_END);
SetEndOfFile(fHandle);
SetFilePointer(fHandle, -128, 0, FILE_END);
if (!WriteFile(fHandle, "TAG", 3, &sentinel, 0))
WriteFile(fHandle, myID3.title, 30, &sentinel, 0);
WriteFile(fHandle, myID3.band, 30, &sentinel, 0);
WriteFile(fHandle, myID3.album, 30, &sentinel, 0);
WriteFile(fHandle, myID3.year, 4, &sentinel, 0);
WriteFile(fHandle, myID3.comment, 30, &sentinel, 0);
WriteFile(fHandle, &myID3.genre[0], 1, &sentinel, 0);
SetFilePointer(fHandle, 128, 0, FILE_END);
and various permutations of this, and also
CloseHandle(fHandle);
ofstream stream;
stream.open(filepath, ios::app);
stream.setmode(filebuf::text);
stream << "TAG";
stream << myID3.title;
stream << myID3.band;
stream << myID3.album;
stream << myID3.year;
stream << myID3.comment;
stream << &myID3.genre[0];
stream.close();
Can someone please tell me if I am doing something wrong, or suggest why this is not appending my file ? I've traced through and this code executes whenever a tag is not present, but nothing is being done.
Thanks.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Those API calls must be failing left and right - look at the return values and the value of GetLastError() to see what's going wrong.
--Mike--
http://home.inreach.com/mdunn/
The preferred snack of 4 out of 5 Lounge readers.
|
|
|
|
|
Invalid handle, but the handle is only invalid if the file has no id3 tag at the end.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
I have written a small class to work with mp3 files, which is not complete, yet. The tagging-function works pretty well.
If you're interested, then e-mail me at:
billgates16@gmx.de
bye,
FoxHunter
|
|
|
|
|
"... so tell us Mr Graus ... what is your impression of the fabled WTL class library and its application to curing world poverty and hunger?"
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|
It plainly rocks. I am a little nervous about using it for production code, only because I want to 'know' it a little better before I would entrust a major project to the idea that we won't get half way through and find it won't do something for us easily, but overall I am certainly enjoying learning it and finding it fun to use. Having the message map all in one place is so much easier when you're coding things in yourself rather than using classs wizard. I still don't have the hang of the DDX stuff, I'll attempt that tonight.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Is it possible for you to call LockFile or LockFileEx on the file? What error would it give if not?
|
|
|
|
|
Hi everybody,
I have a problem about WH_SHELL hook. When I use WH_SHELL hook in a dll file (as system-wide hook), it shows a very strange behavior:
Under Win9x/Me, the taskbar does not work correctly. For example, while the program is active, when i start another application, its icon does not appear in the taskbar. When I close my application the icons appear.
At first I think that it is because of my application, however when I downloaded a sample by Frederic Boulanger which also uses WH_SHELL hook, I saw that this strange thing also occurs.
NOTE that everything works fine under Win2000.
Is there anyone who knows the reason of this?
Please help
Best regards
Mustafa Demirhan
|
|
|
|
|
I was wondering if there is a way to find out when an ActiveX control has actually downloaded.
I need to pass a few parameters from my HTML page to my ActiveX, but I am having timing and synchronizing problems. The problems arise from the fact that a lot of times the method calls are made before the object has fully downloaded.
Is there any method or events that I could use to find out whether an ActiveX has downloaded?
thanks
|
|
|
|
|
ok ... this is a klunk but ...
embed an image in the page but don't put its dimensions in the tag ... that causes the browser to show nothing until the image has downloaded totally ... make the image tag after your active x tag and it might give you the time you need to download completely
theres gotta be a better way than this but i did say it was a kludge
---
"every year we invent better idiot proof systems and every year they invent better idiots"
|
|
|
|
|