|
Check out http://www.codeproject.com/menu/bcmenu.asp for an owner drawn menu solution. This may be a good starting point.
|
|
|
|
|
I have picture in array of pixels (8 bit gray) I know width and hight of picture and position of pixels in picture .I would like to transfer this 8 bit value to some buffer and in one moment to show the picture on the screen(window).I would like to have this code so fast as possible.
Can someone help me?
Thank you.
|
|
|
|
|
Lookup the Windows GDI BitBlt function (there's a CDC version too). This will draw a bitmap onto a destination device at high speed.
Dave
|
|
|
|
|
Hi.
I want to know ho to get desktop's icons positions and labels.
if i use ListView_GetItemPosition(hwnd,i,&pt);
explorer crashes.
hwnd - desktop listview's handle
|
|
|
|
|
I am trying to make a backup program, but I keep running into a problem with the file sharing settings. The problem is: when a file is already open and has its share settings set to deny read or read/write access. I only need to copy the contents of the file, not modify it. I have tried using CopyFile and a file copy algorithm of my own to no avail. I always make sure to open the file as read-only. Is there a way to get around the file sharing settings? Or another idea to achieve the same effect? Somehow other backup programs get around this. Thanks.
|
|
|
|
|
Hello!
Someone knows if there is a function for drawing a line in a Consolse Appliction?
Thank you,
Asaf.
|
|
|
|
|
What sort of a line?
The console is a character-based device, so any line drawing will involve outputting characters.
|
|
|
|
|
Hi
I'm looking for a report writer to create reports generated from arrays and other nonpersistent data sources using Visual C++ 6. Does anyone have any suggestions?
Thanks.
Per
|
|
|
|
|
You can use XML datasource and XSLT stylesheets to produce DHTML reports. MSXML parser is included in IE5 and can be used with C++ code with the #import <msxml.dll> directive.
Look at the Web Services in Platform SDK.
|
|
|
|
|
Hi,
I'm looking for a tool which would generate the call graph for the entire module ie. across the projects in visual c++. Is there any tool available.
A typical situation could be a maintenance project which requires tracing function calls, which calls which etc.
Any info. would be appreciated.
Thank You
Bye
Kannan
|
|
|
|
|
I have a COM object that implements a connection point to fire events. I also have a worker thread that does some task. I pass the thread the pointer of the class that creates the thread, so that it can do calls back into the object. Some of the calls should fire events, but they don't. I'm not sure why....or how to get it to work...ANY ideas?
D.
|
|
|
|
|
I'm a beginner in COM world, but I think the problem comes from the fact that your worker thread is executing the code in the events proxy and the messages it sends are posted in the incorrect queue. Anyway, my server saw it had one client attached. I had to solve this problem, and made the server free threaded, so the events arrived to the client.
|
|
|
|
|
Hi,
Events are signaled by calling the Invoke method of an IDispatch interface supplied by container. The interface lives in the apartment of its own thread, which is also the one containing the control itself. To comply with the STA model, we can only safely call this interface's methods from the thread in which it was created. If the control wants to signal an event from a different thread it must Marshal the IDispatch interface into the IStream first and then UnMarshal it. And of course it must call CoInitialize() too.
To Marshal/UnMarshal interface pointers you can use my favorite functions: CoMarshalInterThreadInterfaceInStream(...) and CoGetInterfaceAndReleaseStream(...).
Regards,
Alex Gorev,
Dundas Software.
|
|
|
|
|
I'm using Visual C++ 6.0
In the dialog editor I created some form_views (used as property pages) and set their font size to 10 at design time.
After I added the pages to a modeless property sheet /CMyView::OnInitialUpdate()/ the pages appeared using font size 8 though. (8 is the system default)
Where did I make the mistake? How could I change the property sheet's and pages' font to bigger?
I also tried to use the following in the property pages' OnInitDialog():
SendMessageToDescendants( WM_SETFONT, UINT(HFONT(m_propertyPageFont)), 0 );
It worked more or less, but this way I'm not able to design the look-and-feel of the pages. (Texts don't fit in their space at runtime.)
I would appreciate any suggestions... Thanks in advance,
Que
|
|
|
|
|
hi,
I need to process a file which is 588 MB long and I am using MapViewOfFile to map the file into memory. the function succeeds for up to 550Mb but it starts failing after that? Why does this happen any ideas ?
thanks
karthik
|
|
|
|
|
The system is probably failing to find a contiguous block of virtual memory that large.
I would almost be willing to bet if you went to a server with IIS and Microsoft SQL running, you might not even load the 520 MB file.
I have seen systems running industrial automation software that cheese out beyond 120 MB of contiguous space.
I would suggest blocking your file into smaller, but perhaps multiple, chunks of virtual memory.
|
|
|
|
|
I want to read a nibble from an external circuit into the PC over the LPT 1 port. Can anyone give me a short lisitng for the necessary routine? Or good hints?
Many thanks in advance
cheers
|
|
|
|
|
I am trying to make multiple buttons on a page look depressed at one time. I have found where people have used bitmaps in order to do this, but the application I am working with has a large number of buttons which would require a large number of bitmaps. Is there any way besides using bitmaps/images that I can make multiple buttons on the same dialog appear pushed, depressed, when mouse clicked using any of the button styles that are possible? I have tried .SetState(true/false) but this will only work if there is a single button on a dialog.
|
|
|
|
|
Instead of creating buttons, you can create a group of checkboxes that have the "Push-Like" style, on the style property page of the checkbox in the resource editor, turned on that way you can select many of them at one and can be sunken or raised state without the checkbox connected to the text.
Hope this helps,
-Erik
|
|
|
|
|
I tried that, here are the results:
I have 3 checkbox buttons, with push-like propery set on all of them (as well as 5 other CButtons) on a dialog. When I press on a checkbox button, the button becomes depressed (I use .SetState(true/false) to do so), which is what I want. But, when I click on another checkbox button, the first checkbox button I clicked on and depressed popped back up. I tried setting the group property for the 3 checkbox buttons but this did not make any difference. Any ideas?
|
|
|
|
|
It sounds like you have them grouped. with the WS_GROUP flag. If you are still having problems, I can whip up some sample code if needed.
-Erik
|
|
|
|
|
That would be greatly appreciated. I have been tearing myself apart with this. I have tried grouped, not grouped, radio pushlike buttons, check box pushlike buttons, regular CButton buttons, everything I can think of. Anything you can give me would be greatly appreciated. Thank you very much!!!
|
|
|
|
|
Greatly appreciated assistance. Is there any way to force one of these checkbox buttons to pop back up when another button is pressed (just curious). Thanks again.
|
|
|
|
|
Yes when you mapped a variable of type control to the dialog item id, you can use the variablename.SetCheck
-Erik
|
|
|
|
|
I need to create some property pages that depends of the same dialog box, and the data stored in those property pages only differs by its owner, then I would change the caption for the assistant window when every property page would be selected.
This is my piece of code:
for (iCounter = 0; iCounter < 5; iCounter++)
{
CaptionPPAgACT.Format("Paràmeters for: %i",iCounter + 1);
m_PPag2[iCounter].m_psp.pszTitle = CaptionPPAgACT;
m_PPag2[iCounter].m_psp.dwFlags |= PSP_USETITLE;
AddPage(&m_PPag2[iCounter]);
}
Thank you in advance for your help.
|
|
|
|