|
You can't. It's a one-way algorithm because data gets lost...
First there is a shift right that will "kill" 20 bits, and then the upper 16 bits get lost by the and operation. Additinally there is a addition, which makes it almost impossible to find out what the original summands had been.
Don't try it, just do it!
|
|
|
|
|
Hi
I need to use the AllowSetForegroundWindow method, available since Windows ME.
I downloaded the last Platform SDK, and installed Visual Studio .NET 2002 because the new libraries aren`t compatible with VC6.
The problem is that when i build the project it still give me the error "undeclared identifier" with the AllowSetForegroundWindow method...
Then I added the compiler options
/D"_WIN32_WINNT>=0x0502"
/D "WINVER>=0x0502"
but im still getting the error.
The Project directories are pointing to the platform SDK path...
I dont know what else do.
Any advice is welcomed
Thanks
|
|
|
|
|
Find the declaration of AllowSetForegroundWindow in the header file and look at the #ifdef statements... that's the easy way to find out what is making trouble.
Don't try it, just do it!
|
|
|
|
|
i did what you said, and this is what it say...
#if(_WIN32_WINNT >= 0x0500)
WINUSERAPI
BOOL
WINAPI
AllowSetForegroundWindow(
__in DWORD dwProcessId);
so... setting /D "_WIN32_WINNT >= 0x0500" should do it work... but it doesn`t
|
|
|
|
|
The method EndMenu, implemented in the same release that AllowSetForegroundWindow works...
I hate Microsoft
|
|
|
|
|
I see that EndMenu() is governed by WINVER having a value >= 0x0500. By default, it has a value of 0x0501 so it satisifes the (preprocessor's) condition.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Kharfax wrote:
/D"_WIN32_WINNT>=0x0502"
/D "WINVER>=0x0502"
This won't work. You can't use the comparison operator in place of the the assignment operator.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
I don`t know, that is what Microsoft says that should be defined in
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/windowing/windows/windowreference/windowfunctions/allowsetforegroundwindow.asp
I tried just using the assignament but still doen`t work :S
|
|
|
|
|
Kharfax wrote:
I don`t know, that is what Microsoft says that should be defined in
There's nothing on the link that you provided that indictaes the required values of WINVER or _WIN32_WINNT . The only requirement I found was in winuser.h which indicates that _WIN32_WINNT must have a value >= 0x0500. To see what value it does have, you'll need to put in a few lines of code. The easiest way would be to add the following at the earliest possible moment (e.g., right inside of main() or WinMain() ):
char s[8];
sprintf(s, "%#x", _WIN32_WINNT); Then set a breakpoint on that statement and check the value of s .
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
|
Did you try using a debugger tool?
|
|
|
|
|
Just because no one responded to your post does not mean that no one (here) knows the answer. Perhaps the right person did not read your post.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
yes, Bob! i surely tried to debug the code by using the VC++ built-in debugger.
and DC! how can i make my msgs accessible for ones who know and want to answer?
thanks for your attention
|
|
|
|
|
ilostmyid2 wrote:
and DC! how can i make my msgs accessible for ones who know and want to answer?
That's the $64,000 question! Even if you posted your question at a time when the VC++ forum is most busy, there is no guarantee that your post will be read. It's a crap shoot at best. Good luck!
From my experience, the post's subject must be meaningful and terse. The post's body must be short, relevant, and to the point. Folks don't like spending their free time wading through meaningless code snippets, comments, etc. only to find the poster wanted something entirely different. I also don't like threads to drag on past a half dozen posts or so. By that time the original intent has been lost and you end up on several other tangents instead.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
Hi , I am new to VC++, I have a edit control on a dialog box and in one of the functions I am assigning some text to a variable m_edit = "Test". m_edit is the member variable asigned to the edit box using the class wizard. Run time whenI see the dialog box even after the assignment the dit controls text is not changing. what should I do to make the value assigned visible on the edit box
|
|
|
|
|
If m_edit is a control (not data) member (i.e. m_edit is of type CEdit ), do the following:
m_edit.SetWindowText ("Test");
to set the edit control's text.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
m_edit is of type CString and is a data memebr variable...
|
|
|
|
|
You need to call UpdateData() .
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Use: DDX_Text(pDX, IDC_EDIT1, m_edit);
and after assigning the values use:
m_edit = "Test";
UpdateData( false );
http://www.priyank.in/
|
|
|
|
|
Is there an easy way in C++ to tell if a number divides evenly?
|
|
|
|
|
Smells like homework. See the "%" operator.
/ravi
My new year's resolution: 2048 x 1536
Home | Articles | Freeware | Music
ravib@ravib.com
|
|
|
|
|
Thank you for reminding me about the modulus operator. I forgot about it.
|
|
|
|
|
I was wondering if anyone knew how to owner draw and/or change color of images within an CImageList. I have tried lots of things none of which seem to work. I have a list of colors that relate to an index number. I would like to draw a bitmap/icon next to my corresponding data in a list view of the correct color.
I have tried creating a bitmap, drawing in a memory DC and then calling CImageList::Add() with my bitmap -- not working. I have tried, getting a bitmap from CImageList::GetImageInfo() and drawing in it -- not working... maybe I'm not doing something right? Anyone had any luck with this and possibly have some sample code?
Thanks
|
|
|
|
|
I've researched this topic on my compiler, microsoft visual studio, and I've done everything that the tutorial said to do, but I can't get it to work. i want to have colors cycling through each of the letters in a certain sentence, lets say..."hello." I'd want two or three colors to cycle left to right at a certain interval in which I set. the tutorial said I have to set some sort of table or something. thanks.
dudeoffrance
|
|
|
|
|
Is this even close to what you are after?
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|