|
Perry Bruins wrote:
it seems the tab key has absolutely no effect whatsoever.
You need to call IsDialogMessage() in your message loop for the standard keyboard navigation to work.
Perry Bruins wrote:
Secondly, how can I specify the order in which the focus will traverse?
Tab order is the same as the Z-order of the controls. Use SetWindowPos() to change the Z-order.
--Mike--
Ericahist | CP SearchBar v2.0.2 | Homepage | RightClick-Encrypt | 1ClickPicGrabber
"That probably would've sounded more commanding if I wasn't wearing my yummy sushi pajamas."
-- Buffy
|
|
|
|
|
Hi all
how I make my own Agent Character storage(.acs file) in VC++. can u tell me the format of (.acs file).
Thanks
|
|
|
|
|
In the following code which is a selfdeleting code on NT i cant seem to understand why the call CloseHandle((HANDLE)4); is there?
what is this 4 value that is casted to a HANDLE?
<br />
#include <windows.h><br />
<br />
int main(int argc, char *argv[])<br />
{<br />
char buf[MAX_PATH];<br />
HMODULE module;<br />
<br />
module = GetModuleHandle(0);<br />
GetModuleFileName(module, buf, MAX_PATH);<br />
CloseHandle((HANDLE)4);<br />
<br />
__asm <br />
{<br />
lea eax, buf<br />
push 0<br />
push 0<br />
push eax<br />
push ExitProcess<br />
push module<br />
push DeleteFile<br />
push UnmapViewOfFile<br />
ret<br />
}<br />
<br />
return 0;<br />
}<br />
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
|
I can't be the only one that thinks this can't be true, or you'd never be able to create more than one active file mapping for a given process?
Steve S
|
|
|
|
|
Yeah, I must not have interpreted it correctly. I don't really understand it, so I won't even try to interpret again. Anyone else?
|
|
|
|
|
Having read the thread, I think the answer is simpler. There's a qualifying comment that says mapping the file for the current EXE always returns 4.
I suspect that this is 'true' because the EXE is already mapped to address 00400000, and it's just something happening to obfuscate the value returned, or there's some shifting/misreading going on.
In other words, the code is committing suicide in a fancy way by unmapping itself from memory while it's executing. The CPU pipeline cache may then probably prevent a page fault while it terminates.
Steve S
|
|
|
|
|
Or for any other orelse they will overlap, right?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi There!!
I'm gettin' mad with these debug errors:
game.obj : error LNK2001: unresolved external symbol _IID_IDirectDraw4
Debug/game.exe : fatal error LNK1120: 1 unresolved externals
And note that I added the ddraw.lib in the 'Link' section, installed DirectX 9 SDK(and is at the top of the 'directories'list) and included ddraw.h in the source code... but the compilers is still gettin' these cursed errors!!!
What can I do?!?!?
|
|
|
|
|
Try linking with "dxguid.lib" ... should fix that error :> and btw, DirectDraw has version 7 and isnt going any further then that, just as a smal note :>
|
|
|
|
|
i need to write a C++ program to access the system environment variables..can someone help me out in this regard!
ranjani
|
|
|
|
|
|
or
int main(int argc, char* argv[], char* envp[])
u can loop on envp till its null
or
GetEnvironmentVariable
SetEnvironmentVariable
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
I've got some confusing code to try and fix. It appears to be using CDO to send a message and it works fine from the command line. however, from an NT service it fails due a MAPI Logon error. I know this is usually to do with the profile, but I now think it's down to CDO as if I replace the CDO logon code with a standard MAPILogonEx() call, it logs on with no problem. I guess it may be down to the parameter the previous developer wasn't passing in at logon time, for example, MAPI_NT_SERVICE. I don't know how to do this in CDO and I cannot find any documentation.
Can anyone help?
Can anyone suggest any links to info?
Here's a brief summary of the code I need to get working:
1. CLSIDFromPogID() returns "MAPI.Session " CLSID .
2. CoCreateInstance() on the MAPI CLSID returns IDispatch interface.
3. Calls the Logon() method on the IDispatch interface with several parameters (this is where I believe I should be able to pass my extra parameters), but how?
4. Call GetIDsOfNames() to get the DISPID for the method required.
5. Call IDispatch::Invoke() with the named member ID
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Windows does not load the user's configured profile when logging on as a service. This may be the source of your problem.
You could try calling LoadUserProfile before calling Logon .
|
|
|
|
|
No, I'm definitely specifying the user profile and password if necessary. They are passed as the first two parameters to the Logon method via MAPI's IDispatch interface. I know it works just fine as an NT service because, as I said, replacing the CDO code with Extended MAPI, works fine. Unfotunately, if I were to use Extended MAPI there is a lot of extra work to do replacing all the existing code...
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Sorry, I mean 'user's profile' in the sense of the registry entries under HKEY_USERS and mapping HKEY_CURRENT_USER to the appropriate key under HKEY_USERS . This is not done for a batch, service or network logon, it's only done by USERENV.EXE for an interactive logon.
|
|
|
|
|
That's not a problem. I specify the MAPI_EXPLICIT_PROFILE flag. All I need to do then is specify a valid profile and password if required.
"The folly of man is that he dreams of what he can never achieve rather than dream of what he can."
"If you think education is expensive, try ignorance."
|
|
|
|
|
Converting std::wstring to std::string and the other way around, anyone knows a good way to do this? :>
|
|
|
|
|
String Conversion Macros on MSDN will satiates ur need
The chosen One
|
|
|
|
|
I wrote a bunch of functions to do this kind of thing here[^].
"Sucks less" isn't progress - Kent Beck [^]
Awasu 1.1.3 [^]: A free RSS reader with support for Code Project.
|
|
|
|
|
Please help and correct me if I am using the incorrect method (I am only learning). What I am trying to do is save a frame from a buffer to a .bmp file. The buffer contains the bits of a bmp image which is 768 * 576 * 32bit. Here is the code that I have been trying to get to work.
CBitmap FrameBitmap;
CFile myBmpFile("Captures/test.bmp", CFile::modeCreate | CFile::modeReadWrite);
//Create the storing archive.
CArchive arStore(&myBmpFile, CArchive::store);
//Create the CBitmap
FrameBitmap.CreateBitmap(768,576,1,32,pImageBuffer);
if(FrameBitmap.IsSerializable())
{
FrameBitmap.Serialize(arStore);
}
//Close the archive and the file
arStore.Close();
myBmpFile.Close();
Thanks
Dave
|
|
|
|
|
|
You've indicated what you want to do, but have not indicated what is actually happening. Are you getting compiler/linker errors? Is an assertion firing? Have you single-stepped through the code to see what is going on? Something a little more detailed than "Here is some code that is not working." leaves a lot to be desired.
Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?
|
|
|
|
|
I am not getting any errors at all, all that is happening is the test.bmp file is being written to the hard drive its size is 0kb and it will not open in an image editor. It seems like it does not contain any information.
I have also tryed the following method to no avail, this following method creates a valid .bmp file with all the correct dimensions which will open in an image editor, problem is the whole image is black. I am not sure what to do with the RGBQUAD bmPallette[1]; & bmInfo.bmiColors = bmPallette; and i guess this could be the problem in this method:-
BITMAPFILEHEADER bmfHeader;
BITMAPINFO bmInfo;
BITMAPINFOHEADER bmiHeader;
//RGBQUAD bmPallette[1];
bmfHeader.bfType = 0x4D42;
bmfHeader.bfSize = (sizeof(BITMAPFILEHEADER) + sizeof(BITMAPINFO) + (768*576*4));
bmfHeader.bfOffBits = (bmfHeader.bfSize - (768*576*4));
bmfHeader.bfReserved1 = 0;
bmfHeader.bfReserved2 = 0;
bmiHeader.biBitCount = 32;
bmiHeader.biClrImportant = 0;
bmiHeader.biCompression = BI_RGB;
bmiHeader.biHeight = 576;
bmiHeader.biPlanes = 1;
bmiHeader.biSizeImage = 0;
bmiHeader.biWidth = 768;
bmiHeader.biClrUsed = 0;
bmiHeader.biSize = sizeof(BITMAPINFOHEADER);
bmiHeader.biXPelsPerMeter = 2834.6;
bmiHeader.biYPelsPerMeter = 2834.6;
//bmInfo.bmiColors = bmPallette;
bmInfo.bmiHeader = bmiHeader;
DWORD dwBitsSize = bmfHeader.bfSize;
CFile file("Captures/test.bmp", CFile::modeCreate | CFile::modeReadWrite);
file.Write((LPSTR)&bmfHeader, sizeof(bmfHeader));
file.Write((LPSTR)&bmInfo, sizeof(bmInfo));
file.Write((LPSTR)&pBuffer, sizeof(pBuffer));
file.Close();
Thanks
Dave
|
|
|
|