|
I remarked the line you suggested and set the following.. its still doing the same thing .
dc.BitBlt(rc.left,rc.top, rc.Width(),rc.Height(), &MemoryDC, 0,0, SRCCOPY);
Could it be that i am some how not including the header in both the dc's?
Im at home so its showing the post as Anonymous.
|
|
|
|
|
Anonymous wrote:
Could it be that i am some how not including the header in both the dc's?
Possibly. But, rc.top is not going to be 0 either; it will be the height of the header. The line should read:
dc.BitBlt(rc.left,rc.top, rc.Width(),rc.Height(), &MemoryDC, rc.left,rc.top, SRCCOPY);
I'm curious as i've never tried doing this: is the header actually drawn into the buffer? Or does it get painted separately.
Good Luck
--------
This is what we've waited for
This is it boys, this is War! --Shog9 --
|
|
|
|
|
You Are the MAN!!
Thanks!
Rob
|
|
|
|
|
I'm using MAPIAddress() to allow selection of addresses. I'd like to set the default button as To/Cc/Bcc depending on which one the user is looking to add; does anyone know of a (preferably clean) way to accomplish this?
--------
This is what we've waited for
This is it boys, this is War! --Shog9 --
|
|
|
|
|
arg.. any help would be much appreciated..
i have a function called PopulateTree() which is supposed to remove all items currently in the tree, and repopulate it.
the problem is that everytime i call DeleteAllItems() and then add more items the new items never show up. ex:
m_tcReports.DeleteAllItems();
HTREEITEM hDoc = m_tcReports.InsertItem("wtf", NULL, TVI_SORT);
if i remove the DeleteAllItems() call then it will add the items everytime i call the function causing multiple copies of the same item.. but at least it adds the items.
is there something i have to do between DeleteAllItems() and adding a new item? ive tried Invalidate(), but that was to no avail..
also i've noticed that my message handler below always gets called 2 times in a row, any idea why?
ON_NOTIFY(DTN_DATETIMECHANGE, IDC_PERIODBEGIN, OnDtnDatetimechangePeriodbegin)
plz help this newbie out friendly ppl have a good weekend!
-dz
|
|
|
|
|
I think you need to do use TVI_ROOT instead of NULL in your call to InsertItem() .
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
thanks for the suggestion, but it still doesn't work.. i have tried to just delete the items one at a time in a loop instead of using deleteallitems() and then adding my items, but they still don't show up.. if i get rid of the deleteallitems() call they do show up.. i just don't get it.
-dz
|
|
|
|
|
The buttons with mnemonic could be acted pressing ALT+CHAR. But, sometimes I can press only the CHAR and the button is acted.
Anyone knows how solve this problem ?
Thanks,
Cristiano.
|
|
|
|
|
It's not a problem - it's normal behavior.
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
But it can be a unwished behavior. To call any menus's function you must press ALT to act the mnemonics and then press another key to act the menu's function.
Is there any configuration or way to avoid act the function without press ALT ?
Thanks,
Cristiano.
|
|
|
|
|
[Intentionally posted in the VC++ forum instead of the Lounge]
Have you used (or do you use) QT to develop Win/Unix GUI apps? If so, I'd be grateful for your comments. Some of us are considering using QT at work, where cost is not an issue, but performance, ease of use, and good tech support is. Our apps are used primarily by hardware engineers, and the types of GUIs we build have a lot of graphical displays.
Thanks,
/ravi
"There is always one more bug..."
http://www.ravib.com
ravib@ravib.com
|
|
|
|
|
Is there some way to programmatically set a system environment variable? SetEnvironmentVariable() only sets it for the current process... I need to "permanently" set one.
Any ideas?
J
"I am wise enough to therefore not spout my ill informed opinion as if it were remotely related to fact." - Christian Graus
|
|
|
|
|
Arrrr. Nevermind... You just set the values into the registry under HKEY_CURRENT_USER\Environment.
J
"I am wise enough to therefore not spout my ill informed opinion as if it were remotely related to fact." - Christian Graus
|
|
|
|
|
ANyone knows how to change the status bar height? There seems to be no mention of it.
Thanks in advance!!
|
|
|
|
|
Try adjusting your StatusBar height by SetWindowPos or MoveWindow...
// pSB is your Status Bar
CStatusBar* pSB = GetMessageBar();
pSB->SetWindowPos(...)
// OR
pSB->MoveWindow(...);
Mike M
WinInsider.com
|
|
|
|
|
The RGB function takes 8 bits each for Red, Green & Blue - making it a total of 24 bits. So, how does one write a program that would exploit the full 32 bit support of any decent graphics card?
Thanks in advance.
|
|
|
|
|
Your video card will still only support an 8 bit channel for Red Green and Blue, however it can then hold an alpha channel that can be used to hold other data, for transparent, or alpha belnding, for instance.
Build a man a fire, and he will be warm for a day Light a man on fire, and he will be warm for the rest of his life!
|
|
|
|
|
GDI doesn't really support the 4th channel (except for a function or two in Win2K and XP). GDI+, does support the alpha channel, though. Take a look at the GDI+ tutorials on this site.
-c
ABSURDITY:
A statement or belief manifestly inconsistent with one's own opinion.
|
|
|
|
|
More advanced color formats would probably require DirectX or OpenGL.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
"32-bit" graphics cards are by and large just 24 bits stuffed into 32 bits. Why? Because it's faster to move 32-bit aligned data than 24-bit aligned data.
If they use the high 8 bits for anything, it's for transparency information, and that's not used on the primary surface anyway, only for textures and blitted surfaces.
I wrote an article on 16-bit and 32-bit graphics for Windows Developers Journal; it's here.
--
Tim
Tim Lesher <tim@lesher.ws>
http://www.lesher.ws
|
|
|
|
|
When you look at 3d programming, you might have 8R,8G,8B,8Z where the Z is the Z-depth of the pixel. This would be the frame buffer.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|
|
Greetings:
I have an application using CHTMLView which creates multiple HTML files based on user input. I have a print option but I want to be able to print ALL html files in a directory, not just the currently viewed HTML file. Is there any predefined class / function that will accept an HTML file and print it silently (no dialog box) in the background?
Thanks in advance for any info.
|
|
|
|
|
I have CPropertySheet inside CDialog instead the control with ID - IDC_PROPSHEET_WINDOW.
I have 7 identical CPropertyPage, but with different labels.
The code of realization is given below.
But if tabs are placed more than in one line, there is the mistake of drawing connected by that the top line of tabs is visible only.
Code of realization in OnInitDialog() the following.
m_sheet.AddPage(&m_pageMyPage1);
m_sheet.AddPage(&m_pageMyPage2);
m_sheet.AddPage(&m_pageMyPage3);
m_sheet.AddPage(&m_pageMyPage4);
m_sheet.AddPage(&m_pageMyPage5);
m_sheet.AddPage(&m_pageMyPage6);
m_sheet.AddPage(&m_pageMyPage7);
m_sheet.Create(this, WS_CHILD | WS_VISIBLE);
m_sheet.ModifyStyleEx (0, WS_EX_CONTROLPARENT);
TC_ITEM item;
item.mask = TCIF_TEXT;
TCHAR szText [100];
CString sTitle;
for (int i = 0; i < 7; i++)
{
sTitle.Format(_T("Long label %d"), i);
lstrcpy(szText, sTitle);
item.pszText = szText;
m_sheet.GetTabControl ()->SetItem (i, &item);
}
RECT rect;
HWND hwnd;
GetDlgItem(IDC_PROPSHEET_WINDOW, &hwnd);
ASSERT(hwnd);
if (hwnd)
{
::GetWindowRect(hwnd, &rect);
ScreenToClient(&rect);
m_sheet.SetWindowPos(NULL, rect.left, rect.top, 0, 0, SWP_NOZORDER | SWP_NOSIZE | SWP_NOACTIVATE);
}
Most likely a problem that at addition CPropertyPage they have small length of labels and hold in one line.
And when I change label of the tab on the text with greater long tabs occupy more than one line.
Thus control ceases correctly them to display.
One of decisions, by default in label of the template CPropertyPage to place the text of long not less maximal length of the future label, then all is drawn normally.
Whether there are some more decisions of this problem?
Best regards,
Eugene Pustovoyt
Eugene Pustovoyt
|
|
|
|
|
Hi,
I am writing a program, I want it to display datas in the view.When you press a menu item ,the view display some data,and when you press another menu item,
the view was made to empty and display another data.How to do it? It seems CView::invalidate ()does not do the thing well.Can anyone tell me? Thank you.
YES, I am here.
|
|
|
|
|
You have to override OnPaint to control how the data is rendered.
And an FYI: "data" is the plural form. "datum" is singular.
Tim Smith
I know what you're thinking punk, you're thinking did he spell check this document? Well, to tell you the truth I kinda forgot myself in all this excitement. But being this here's CodeProject, the most powerful forums in the world and would blow your head clean off, you've got to ask yourself one question, Do I feel lucky? Well do ya punk?
|
|
|
|