|
Using a .manifest file will not fix the XP menu bug.
HPS HwndSpy - GUI developer's aid to visually
locate and inspect windows. For the month of August
only, use coupon code CP-81239 for 30% off.
|
|
|
|
|
Thanks for the replies, much appreciated. Does this mean that if I created an owner-drawn menu instead of creating one in the dialog editor, it would show correctly? (That is, if it is okay to mix an owner-drawn menu with a dialog-based app...)
Many thanks,
KB
|
|
|
|
|
Hello,
I've written a class that 'reads' Mp3 files. It all works fine, but when a Mp3 has VBR, my calculations are incorrect!
My question:
Is there a site or something where I can find onformation on VBR?
I didn't find any...
thanks in advance!
A student knows little about a lot.
A professor knows a lot about little.
I know everything about nothing.
|
|
|
|
|
Well this isn't exactly C++ but...
I have a game (made in C++ using DirectX, so there.. C++ :P) and it encapsulates java scripts to extend its functionality. Now i was wondering if there's any way to see if a key is being pressed in java, without using the window event stuff, cause i cant create a window since its encapsulated in the game. I've looked on sun through the documentation but i can't find anything providing something to read the keyboard state, or an event model that works without creating a window first or whatever. Anyone know if its possible?
Kuniva
--------------------------------------------
|
|
|
|
|
How are you doing the embedding (also, are you using Java or JavaScript? It's not entirely clear)? I would think that the easiest way would be to just keep track of the key events in the C++ side and pass those along to the Java/JavaScript side (or rather, the Java/JavaScript side would query the C++ side for the key states).
- Mike
|
|
|
|
|
um, well the game isn't a game i wrote, its just a commercial game i have. It just links to the java scripts and provides basic events like ie clicked() which occurs when a player is clicked. The scripts are used to write mods and thus extend game functionality. An entire set of classes and functions are provided for this which link back to the main executable. I don't know much about using java in a C++ app so i don't know how exactly it's done. But so i can't just keep track of the key events in the C++ side.. I need to have a way to do this from the scripts... but i suppose it's not possible
oh and its Java, not Javascript
|
|
|
|
|
The architecture you describe is almost impossible to believe !!! That someone would interface java classes into a C++ game to provide user extendable functionalilty is implausible to say the least. I suspect that you are confused. However in case you are not
java.awt.AWTKeyStroke / javax.swing.KeyStroke is what you are looking for.
http://java.sun.com/j2se/1.4.2/docs/api/
|
|
|
|
|
Thank you.
About the game.. It really is the way i described it, the game is Vampire: The Masquerade - Redemption from Nihilistic Software. Many RP games implement some sort of scripting feature these days to let users add modules and all (like NeverWinter Nights for example). Just with Vampire, they chose to use Java instead of inventing their own scripting language for it. I'm guessing it loads all classes on startup in the JVM (A javai.dll is included in the root directory of the game) and the dll maps the function calls to the executable and vice versa. When u make a script u just have to make sure u derive it from a base class (in most cases Codex) and then there's subclasses for things, players, actors, regions, sectors, sounds, items, disciplines and so on.
Kuniva
--------------------------------------------
|
|
|
|
|
Ok here is the code...
<code> m_strOut = "scrollbar-darkshadow-Color:"+m_str1+";\r\n"+
"scrollbar-3dlight-Color:"+m_str2+";\r\n"+
"scrollbar-arrow-Color:"+m_str3+";\r\n"+
"scrollbar-base-Color:"+m_str4+";\r\n"+
"scrollbar-face-Color:"+m_str5+";\r\n"+
"scrollbar-highlight-Color:"+m_str6+";\r\n"+
"scrollbar-shadow-Color:"+m_str7+";\r\n"+
"scrollbar-track-Color:"+m_str8+";";</code>
and when I changed it to...
<code> m_strOut = "<style>\r\n"+
"{\r\n"+
"scrollbar-darkshadow-Color:"+m_str1+";\r\n"+
"scrollbar-3dlight-Color:"+m_str2+";\r\n"+
"scrollbar-arrow-Color:"+m_str3+";\r\n"+
"scrollbar-base-Color:"+m_str4+";\r\n"+
"scrollbar-face-Color:"+m_str5+";\r\n"+
"scrollbar-highlight-Color:"+m_str6+";\r\n"+
"scrollbar-shadow-Color:"+m_str7+";\r\n"+
"scrollbar-track-Color:"+m_str8+";\r\n"+
"}\r\n"+
"</style>";</code>
I get an error : error C2110: cannot add two pointers.
I don't know what is the problem.
HELP!!!!
<marquee>Universal Project</marquee>
|
|
|
|
|
You can't concatenate ptrs in a CString. So:
m_strOut = "abc"; is ok but m_strOut = "abc" + "def"; isn't. You can resolve this with:
m_strOut = "abc";
m_strOut + "def";
or:
m_strOut = "abc" + CString("def");
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
Thankyou I solved it by doing:
m_strOut = "<style>\r\n{\r\nscrollbar-darkshadow-Color:"+m_str1+";\r\n"+
"scrollbar-3dlight-Color:"+m_str2+";\r\n"+
"scrollbar-arrow-Color:"+m_str3+";\r\n"+
"scrollbar-base-Color:"+m_str4+";\r\n"+
"scrollbar-face-Color:"+m_str5+";\r\n"+
"scrollbar-highlight-Color:"+m_str6+";\r\n"+
"scrollbar-shadow-Color:"+m_str7+";\r\n"+
"scrollbar-track-Color:"+m_str8+"\r\n}\r\n</style>";
<marquee>Universal Project</marquee>
|
|
|
|
|
But
";\r\n"+"scrollbar-3dlight-Color:" shouldn't compile.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
I think it works because of the evaluation order, i.e.:
"<style>\r\n{\r\nscrollbar-darkshadow-Color:"+m_str1 Results in a CString, then
(previous CString) + ";\r\n" results in another CString, so the following concatenation is a CString + a const char* .
- Mike
|
|
|
|
|
I guess it does compile since I did it If you want I'll send you the source.
I think the \r\n makes it posibble I think. Send me an email if you want the source or executable.
<marquee>Universal Project
|
|
|
|
|
I have heard about TWAIN to scan an image.
Looking in codeproject and codeguru i saw samples about it.
However, those samples use the vendor UI.
I need to scan an image without using the vendor UI.
I need to set the resolution as well.
I will appreciate getting a sample.
Thanks in advance,
Dudi
|
|
|
|
|
what does "scan" mean? to get buffer of the image, or scan the buffer?
includeh10
|
|
|
|
|
"Scan" means scanning an image using flatbed scanner.
|
|
|
|
|
OK, i have found it.
Just setting ShowUI field to FALSE in a structure TW_USERINTERFACE.
|
|
|
|
|
as my test, calling function GetDocument() in a thread always causes program crashes, why?
includeh10
|
|
|
|
|
|
i do use raw thread instead of AfxBeginThread.
do you mean AfxBeginThread will solve the problem? if so, AfxBeginThread should have something difference inside?
thx.
includeh10
|
|
|
|
|
Theads don't see the CWnd* Maps of other threads, so you can only see the views/documents created in each thread. In your example GetDocument will be returning NULL, which you should always be testing for.
Neville Franks, Author of ED for Windows. Free Trial at www.getsoft.com
|
|
|
|
|
i got the following problem:
i'm "translating" a console-based c++ programm into a mfc-application. i have to open a file, which is located at the same directory as the executable. in my console-based programm this worked with just:
fstream file("filename",ios::in);
but in the mfc-programm this doesn't work, although i don't know why. so i'looking for a function that returns the path of the executable, or something that doesn't force me to put my file in a fixed directory or to open a openfile dialog.
any idea?
alexis
|
|
|
|
|
GetModuleFileName(0,....);
includeh10
|
|
|
|
|