|
use "far" instead.
Sorry to dissapoint you all with my lack of a witty or poignant signature.
|
|
|
|
|
hehehe
sorry
I still have memory-left-overs from the DOS days
try the following instead :-
#include "stdafx.h"
void (*pFunc)();
int main(int argc, char* argv[])
{
pFunc=(void(__cdecl*)())0xffff0000;
return 0;
}
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Oooooook, just "pFunc = (void(*)())address" is ok.
thank you very very much, thank you all, especially thank you Busterboy.
|
|
|
|
|
I am doing some jobs as to store records like information into files. I've try the Compound File implementation of the Structured Storage, but the result files seems always too big for me, even one empty file costs about 2.5k! I like the way that the Compound File acts but the file size also means a lot to me. What should I do then?
|
|
|
|
|
Avoid structured storage - not only are the files big, but the performance is terrible. I tried using SS for an app that needed to store lots of small files in a single large file and the performance really sucked!
|
|
|
|
|
when the users maximized my window,i want the window cover the Windows' taskbar,how to do it?thanks
|
|
|
|
|
Try this code out :-
HWND hTBar=::FindWindow("Shell_traywnd","");
::ShowWindow(hTBar,SW_HIDE);
AfxMessageBox("hidden");
::ShowWindow(hTBar,SW_SHOW);
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
thanks,i really appreciate it.
but just hide the taskbar seems a little terrible.my users would be surprised if they couldn't find the taskbar when minimized the window.
what i want is just to hide the taskbar behind the window when users maximized the window,i mean just let the window cover the taskbar,but not really disappear the taskbar from the screen.
can you help me?
|
|
|
|
|
ON_WM_ACTIVATE:
if (activate & fullsize)
hide_taskbar
else
show taskbar
think this should work..
bernhard
"There are three roads to ruin: women, gambling and technicians. The most pleasant is with women, the quickest is with gambling, but the surest is with technicians." Georges Pompidou
|
|
|
|
|
Hello,
I am trying to read the last 128 bytes of a compressed file(MP3)... How can I extract the last 128 bytes and display this information in a CString.. I am using CFile to open the mp3 and dumping the entire contents into a char.. I then dump that into a CString.. but the format is all wrong. Can anyone give me some pointers on how to dump the last 128 bytes of a file into a CString? If I open the file in notepad and scroll to the bottom.. I can see the information I'm trying to extract.
Thanks,
Rob
|
|
|
|
|
A CString is the wrong thing to use. I assume you're looking for an ID3v1 tag? The tag can have embedded 0 bytes, or the tag might not even be present. Use an array of 128 BYTEs instead and parse it manually. See this shell extension article where I do exactly this.
--Mike--
http://home.inreach.com/mdunn/
While I can't be correct on all matters, I can make the reassuring claim that where I am inaccurate, I am at least definitively inaccurate.
your with and
Sonork - 100.10414 AcidHelm
|
|
|
|
|
Thanks Mike!! Thats exactly what I'm trying to do. I'll give it a look in the morning.
Thanks again
Rob
|
|
|
|
|
I am converting a class to unicode and got all of it but a single instance of strlen. What should I use instead?
-Matt Newman
-Matt Newman
|
|
|
|
|
Not sure, but what about wcslen?
Nish
Sonork ID 100.9786 voidmain
www.busterboy.org
Nish is a BIG fan of Goran Ivanisevic
|
|
|
|
|
Yep it worked. Thanks.
-Matt Newman
-Matt Newman
|
|
|
|
|
Why not use the tchar macros, that way your code will work with SBCS, MBCS and UNICODE. The tchar macro for strlen is _tcslen().
---
It may be that your sole purpose in life is simply to serve as a warning to others.
|
|
|
|
|
To delete a class what I do is i go to the File View and I delete the .cpp and .h files of my class. If i go to the class wizard the class can not be found so it looks right. However, if i try to create a class of the same name of the class i just deleted it calls it class1 as opposed to just class. What i have to do is go to windows explorer and delete the .cpp and .h files which i thought i had already deleted. Then i goto the class wizard and it says something like can not find class then it asks me if it wants me to delete it. This doesn's seem like the right way to delete a class. Is it?
<marquee>click -> A Sign of Boredom <- click
|
|
|
|
|
VC has removed the files from the project, but not your hard drive. So go to the directory and delete the old class ( the filename won't have the leading 'C' in it ), and then start again.
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
One way to delete a class created by classwizard in V6.0:
Say, your class is Cabc.
Delete the abc.h and abc.cpp file in the FileView .
Delete the abc.h and abc.cpp file using the windows explorer.
Do a string search on 'abc' using 'Find in files' and click on the line containing 'abc' and '.clw' in the output window to open class wizard in the editor.
Double click on the line containing the string '.clw' in the output window.
Find the references like the following for 'abc' and delete those lines.
[CLS:Cabc]
Type=0
HeaderFile=abc.h
ImplementationFile=abcr.cpp
BaseClass=CWinThread
Filter=N
LastObject=Cabc
Also, find out the part of the .clw file as below and change the class
count number to 1 less. Delete the line containing 'Class3=Cabc'.
ClassCount=3
Class1=CMyAppApp
Class2=CMyAppDlg
Class3=Cabc
At times 'Class3=Cab' may not be with the other classes as below:
(It is a good idea to have them together.)
ClassCount=3
Class1=CMyAppApp
Class2=CMyappDlg
ResourceCount=2
Resource1=IDR_MAINFRAME
Class3=Cabc
Resource2=IDD_MYAPP_DIALOG
Finally it will be something as below:
ClassCount=2
Class1=CMyAppApp
Class2=CMyAppDlg
ResourceCount=2
Resource1=IDR_MAINFRAME
Resource2=IDD_MYAPP_DIALOG
Click on the file menu and click on save.
close the .clw window (do not forget to do this).
It is a good idea to close the workspace and start again.
|
|
|
|
|
Gosh that's a whole lot of work. Why not delete the .clw file and let VC regenerate it ?
Christian
After all, there's nothing wrong with an elite as long as I'm allowed to be part of it!! - Mike Burston Oct 23, 2001
Sonork ID 100.10002:MeanManOzI live in Bob's HungOut now
|
|
|
|
|
You are right. That works and is lot easier! Thanks Christian.
|
|
|
|
|
Hi!
I am a newbie to vc++ and I am currently trying to write a small database application. I looked in almost everything i can find about databases I could find and got along nicely so far. I am using the application wizard creating a sdi application connected to a database via odbc. this enables me to look at one table of the database. And here my troubles start: I want the user to not only look at one table, but at several if possible, having the user switch between the tables with the menu for example. So far I am adding a new class which inherets from CRecordSet and one that inherets from CRecordView which is connected to a new dialog resource. And at this point I am completly lost on how to switch between those two dialogs for the tables. Help would be much appreciated on how to solve this problem (and also if there are better approaches to make it possible to look at a second table).
Thanks
|
|
|
|
|
Have a look at the following. This allows you to create recordsets dynamically rather than the MFC way of building a recordset that is bound to one table.
http://www.codeproject.com/database/caaodbcclass.asp
Dave.
|
|
|
|
|
Hello everybody,
is there anybody who can tell me how can build a docking windows, I mean that windows that could be attached to one of the border of the main application and that can contain some dialogs or something more?
Thank you
|
|
|
|
|