|
Hi all,
i want indentify all mouse click event in PreTranslateMessage,
but when i use WM_LBUTTONDOWN than WM_LBUTTONDBLCLK portion never called,
please tell me how can i identifies all events seprately.
please help me for this.
thanks in advance.
|
|
|
|
|
Greetings folks!
I created a DIB section with 4 bits per pixel, so 16 colors. I selected this DIB into a DC and am trying to draw into it using FillSolidRect and Ellipse, but all i get are zeroes in the pixel data. I specified the palette entries when creating the DIB, i also tried creating a CPalette from the DIB's palette and selecting it for the DC before drawing but no matter what i do i get nothing but zeroes. All the drawing code succeeds, so there's no visible indication of failure. What might i be doing wrong here? Here's some stripped down code:
unsigned char BIHeadMem[sizeof(BITMAPINFO) + 16 * sizeof(RGBQUAD)] = {0};
BITMAPINFO &BIHead = *(BITMAPINFO *)BIHeadMem;
BIHead.bmiHeader.biSize = sizeof(BIHead.bmiHeader);
BIHead.bmiHeader.biBitCount = 4;
BIHead.bmiHeader.biClrImportant = 0;
BIHead.bmiHeader.biClrUsed = 0;
BIHead.bmiHeader.biCompression = BI_RGB;
BIHead.bmiHeader.biSizeImage = 0;
BIHead.bmiHeader.biXPelsPerMeter = 0;
BIHead.bmiHeader.biYPelsPerMeter = 0;
BIHead.bmiHeader.biWidth = 32;
BIHead.bmiHeader.biHeight = -32;
BIHead.bmiHeader.biPlanes = 1;
for (int I = 0; I < 16; I++)
{
BIHead.bmiColors[I].rgbRed = BIHead.bmiColors[I].rgbBlue = BIHead.bmiColors[I].rgbGreen = (BYTE)I;
BIHead.bmiColors[I].rgbReserved = 0;
}
void *DummyPixels;
CBitmap bmp;
bmp.Attach(CreateDIBSection(NULL, &BIHead, DIB_RGB_COLORS, &DummyPixels, NULL, 0));
CDC memDC;
memDC.CreateCompatibleDC(NULL);
memDC.SelectObject(&bmp);
memDC.FillSolidRect(0, 0, fSizeCache.WellSize, fSizeCache.WellSize, RGB(0, 0, 0));
CPen pen;
CBrush brush(RGB(2, 2, 2));
pen.CreatePen(PS_SOLID, 1, RGB(1, 1, 1));
memDC.SelectObject(&brush);
memDC.SelectObject(&pen);
memDC.Ellipse(0, 0, 32, 32);
When i check the memory pointed at by DummyPixels , it's all zeroes, if i write to this memory "manually" the palette indexes from 0 to 15 i get what i expect when blitting the DIB to antoher DC, so the DIB itself should be ok. I guess the problem here is something completely obvious and i am just not aware of it. Thanks in advance for any help.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> "It doesn't work, fix it" does not qualify as a bug report. <
> Amazing what new features none of the programmers working on the project ever heard of you can learn about when reading what the marketing guys wrote about it. <
|
|
|
|
|
I have a toolbar that uses a drop-down list. The list is owner-drawn and based on CListBox. It's displayed when the user pressing a button in the toolbar. When the toobar is floated outside the main window and the list is dropped, the list is clipped to the main window. Anyone know how to override that behavior?
I tried changing the parent from the main window to the desktop window but the draw messages don't get reflected to the list box.
I tried it with and without the WS_CHILD attribute.
|
|
|
|
|
I need a MFC app which I can give a directory and it will create a list of all files within that directory and sub directories. From this list it will then check the last time each file was modified. What would be the best way of going about this? I think of several ways of doing it but would like an opinion on what other people think would be the best way forward. Thanks.
|
|
|
|
|
FindFirstFile, FindNextFile, should do it quite easily. Just need to look at what you need to pass to it in terms of parameters. Or use CFileFind for straight MFC.
|
|
|
|
|
Hi all,
i m using Edit box control with multiline and want return property.
here i am paste very long file in this edit box but when i paste here full file data not paste and also when i trying to write some thiing its not written, while i m not use SetLimitText any where.
please tell me how can i paste any length of data in edit box.
thanks in advance.
|
|
|
|
|
|
i alraedy mention thet i already use it.
|
|
|
|
|
Ok, I couldn't get that from your language.
Now, what exactly is the problem, you are neither able to paste anything nor able to type anything? Is that edit box readonly by any chance?
|
|
|
|
|
when I tried CEdit::GetLimitText(), it returned 30,000. This is in contrast with what is described here in remarks http://msdn.microsoft.com/en-us/library/bb761647%28VS.85%29.aspx[^]. I think your problem is when exceeding this 30,000 characters. Try calling CEdit::SetLimitText() with much bigger value and count the number of characters you could paste/type.
|
|
|
|
|
A multi-line edit control can only hold 64K characters. Use a richedit control instead.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
what is the max limit of rich edit?
|
|
|
|
|
If I were to guess, I'd say 2GB, possibly 4GB. See here.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Man who follows car will be exhausted." - Confucius
|
|
|
|
|
A c++ project, I want to use it in the tomcat, so I need transmit it to WSDL file and then transmit this wsdl file to war package.
I only know use the C# to write web service but I donot know how to transmit this c++ project to web service?
|
|
|
|
|
You mean you want to use your C# code in C++? Why do you want to use C++?
In C++, if you want to use web service from scratch I'm afraid it will not be easy.. you will have to do it manually (HTTP, TCP/IP sockets, XML, SOAP).
Aisteru
|
|
|
|
|
thanks, I prepare to use the java to write one web service
|
|
|
|
|
Hi,
I want to read a text in an excel file. I am using the folowing code.
HRESULT hr;
CLSID clsid;
hr = CLSIDFromProgID(L"Excel.Application", &clsid);
BOOL bRet = objApp.CreateDispatch(clsid);
objBooks = objApp.GetWorkbooks();
objBooks.Open("C:\\tmp\\1.xls", VOptional, VOptional,VOptional,VOptional,VOptional, VOptional,
VOptional, VOptional, VTrue, VFalse, VOptional, VOptional);
It is working in a test applicaiton. But i am using the same code in my development project, CreateDispatch function gets failed.
Anyone knows the reason?
Thanks,
|
|
|
|
|
|
Hi,
I am using RasSetCustomAuthData API to set my custom auth info before calling RasDial API.
here is the code piece:
int nError = ::RasSetCustomAuthData(
myphonebook,
myphonebookentry,
(BYTE *)&myCustomAuthData, myCustomAuthData.dwSize );
Here value of myCustomAuthData.dwSize is 2708 . and the size of myCustomAuthData stracture is also 2708. but after calling this function is writting around 5k of data in the .pbk file.
After calling this RasSetCustomAuthdata() api the .pbk file is having entry some thing like this.
CustomAuthData=31444243FFFFFFFF940A0000940A000007000000A800000008000000430054000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
CustomAuthData=000000000000000000000000000000000000000000000000000000000000000000000000
Birajendu
SonicWALL
Bangalore
India
|
|
|
|
|
Hello,
I have a problem.
I have installed a printer driver in 64-bit machine (say PC-1)and shared it.
Now if I try to install the printer (which is already shared in PC-1) in a 32-bit machine (say PC-2), I am able to install it.
But actually it shouldn't happen.
And also I have that the reverse case is also working.
Please show me a way restrict this.
Thanks in advance.
Regards,
msr
|
|
|
|
|
They are both different machines.
That is why you're able to install it.
|
|
|
|
|
I didn't get your point. Can you just explain me.
I agree that both are different machines. But they are of different configurations too.
My requirement is to restrict it.
Regards
msr
|
|
|
|
|
How do you want to restrict it?
Do you want to administer one machine to not be able to install the driver?
Or do you want to write a software to prevent driver installation?
|
|
|
|
|
msr_codeproject wrote: (say PC-1)and shared it.
Why have you shared it if you do not want the other PC to access it?
Just say 'NO' to evaluated arguments for diadic functions! Ash
|
|
|
|
|
My requirement is,
A printer shared in a 32-bit machine should be accessible to only 32-bit machines.
And also same case with 64-bit machines.
Now tell me how to restrict it.
Regards
msr
|
|
|
|