|
Assuming you're using MFC, override the OnSetActive function of the CPropertyPage derived class.
This is called every time a property page is selected.
From this function you could resize the parent sheet using GetParent()->SetWindowPos(... .
But you may not be able to get the required page size from OnSetActive because the page is resized to the largest page size. You may have to do that from other functions like OnInitDialog .
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
|
Creating a dynamic 2-dimensional array (matrix) using a pointer-to-pointer works for small matrices. If I try to allocate huge matrices (with new), not necessarily larger than the available memory, no bad_alloc exception is thrown and linux becomes very slow!
With one dimensional array (vector) it works perfectly: as soon as you exceed ram+swap a bad_alloc exception is thrown.
Can anybody confirm?
Is this due to the fact that if the matrix is huge each element of the array of pointers has to point to numerous elements and it is not guaranteed that consecutive memory is available??
|
|
|
|
|
Hi,
I am writing a mapi sample, where mapi intializing is done perfectly, also logon is also happens perfectly, but the third function that is
"HrOpenExchangePrivateStore(lpSession,&lpStore)", function always returning false value, please tell me what should give the value here for lpstore.
I am usin the following link.
http://support.microsoft.com/kb/200181/EN-US/
thanx in advance
sampath-padamatinti
|
|
|
|
|
When I need to override a function like CDocument::OnOpenDocument, in VC6 I'd use the "Add Virtual Function" from class view context menu, but it's missing in VS2008. Is the feature moved to some place else or is it missing?
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
It is available in VS 2008, only thing is that it is different from VC6.
Take Class View, right click on your document class or which ever class.
Select Properties.
One of the icons on the top is Overrides.
That is what you're looking for.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Thanks for the help, «_Superman_», I don't think I would have found it on my own.
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hello,
i have a structure and i want to change the structure data to bytearray
struct test {
char a;
int b;
};
could any one help in this regard.
Jalsa
|
|
|
|
|
did you try with memcpy.
hope that should work for you.
but, if you can let us know the purpose, we can give better suggestions.
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
I need to send the data on tcp socket before that i have MD5 the packet data data.
so i want to convert the structure data to byte.
regards
Jalsa
|
|
|
|
|
try with memcpy.
jalsa G wrote: before that i have MD5 the packet data data
can you explaing this a bit more clearer?
--------------------------------------------
Suggestion to the members:
Please prefix your main thread subject with [SOLVED] if it is solved.
thanks.
chandu.
|
|
|
|
|
Well a struct is a just bunch of (adjacent) bytes, hence you can pass the address of the struct (and the proper size) to the sending function.
Of course if endianess is a issue then you have to handle it.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
Also the byte alignment can sometimes cause problems.
For example with a byte alignment of 4 bytes, the following structure would be of 8 bytes length.
struct test {<br />
char a;<br />
int b;<br />
};<br />
Doing a memcpy will write 8 bytes to a byte array while the needed size is 5 bytes.
In such cases you would need a #pragma pack(1) before declaring the structure.
«_Superman_»
I love work. It gives me something to do between weekends.
|
|
|
|
|
Hi if possible please try to suggest me any solution for the thread Setting Font.. which
i posted below...
|
|
|
|
|
Indeed. Anyway you may send only sizeof(char)+sizeof(int) bytes. Of course then you've to make sure sizeof(int) is the same on both the sides.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
I've found the C/C++/MFC, but not found the C++ builder, does it have one for C++ builder in this website?
|
|
|
|
|
Do you mean a forum for C++ Builder? No we haven't. Anyway you try to ask your question here.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
|
How to read footer at a sector using C++/VC++
|
|
|
|
|
Hi!
I want to write to PE run on empty OS.
It help winAPI run on "Empty OS"
Please,full code & guide
Thanks : -D
-D -D -D -D -D -D
Vietnam.
by:tuan1111
modified on Monday, July 20, 2009 9:24 PM
|
|
|
|
|
You're not giving up, are you?
tuan1111 wrote: I'm reading bootloader
Try to read an English course first.
Alternatively, run your post through several, randomly selected languages on translate.google.com, I'm sure it will make more sense then.
tuan1111 wrote: I say the hard things I want them
What?
tuan1111 wrote: Please provide code
Let me correct that for you:
Pleeze sendz codez
|
|
|
|
|
The above post wouldn't be out of place in this site[^]
There is sufficient light for those who desire to see, and there is sufficient darkness for those of a contrary disposition.
Blaise Pascal
|
|
|
|
|
Hello,
I'm developing an MFC application that I'd like to provide context sensitive help for. Does MFC provide such a facility? I think that .chm files are deprecated in Windows vista - something called MAML is used instead.
My questions is, what is the modern, preferred way to create context sensitive help within MFC?
Regards,
Sternocera
|
|
|
|
|
Is there anbody out there who has a working code snippet that uses WinApi function Alphablend()?
Can Alphablend() be used with a bitmap that has no alphachannel?
Thanx
modified on Sunday, June 28, 2009 5:00 AM
|
|
|
|
|
I use it on a splash screen.
header file:
typedef BOOL (WINAPI ALPHABLEND)(HDC, int, int, int, int, HDC, int, int, int, int, BLENDFUNCTION);
typedef ALPHABLEND* LPALPHABLEND;
class ...
{
...
HINSTANCE m_hLib;
LPALPHABLEND m_lpfnAlphaBlend;
...
};
source file:
m_hLib = LoadLibrary(_T("msimg32.dll"));
if (m_hLib != NULL)
{
m_lpfnAlphaBlend = (LPALPHABLEND)GetProcAddress(m_hLib, "AlphaBlend");
}
if (m_hLib != NULL)
{
FreeLibrary(m_hLib);
m_hLib = NULL;
}
BOOL C*********::OnEraseBkgnd(CDC* pDC)
{
CDialog::OnEraseBkgnd(pDC);
if (m_lpfnAlphaBlend != NULL)
{
CRect rc;
GetClientRect(rc);
BITMAP b;
if (GetObject(m_hBitmap,
sizeof(BITMAP),
&b))
{
CDC DC;
DC.CreateCompatibleDC(pDC);
int s = DC.SaveDC();
DC.SelectObject(m_hBitmap);
BLENDFUNCTION bf = {0};
bf.BlendOp = AC_SRC_OVER;
bf.SourceConstantAlpha = 0x20;
m_lpfnAlphaBlend(*pDC,
(rc.Width() - b.bmWidth) / 2,
(rc.Height() - b.bmHeight) / 2,
b.bmWidth,
b.bmHeight,
DC,
0,
0,
b.bmWidth,
b.bmHeight,
bf);
DC.RestoreDC(s);
}
}
return TRUE;
}
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good - Use it!
|
|
|
|