|
How do I prevent the NEW Dialog box from coming up when I add a new view to a SDI app
|
|
|
|
|
I need some help with these API calls:
My GetExitCodeProcess() function is failing...
The exception window displays:
"unhandled exception in Bond.exe [Kernal32.dll]
0xC000005, Access Violation
Can anyone tell me what might be wrong with
the following code, is it my handle?
HWND hWnd = ::FindWindow("XLMAIN", NULL);
DWORD pid; //variable to hold the process ID.
DWORD dThread; // Variable to hold (unused) thread ID
dThread = GetWindowThreadProcessId(hWnd,//Handle to window
&pid);// Address of process ID
HANDLE hProcess; //Handle to existing process
//PROCESS_ALL_ACCESS Specifies all possible access flags for the process object.
//PROCESS_QUERY_INFORMATION Enables using the process
//handle in the GetExitCodeProcess and GetPriorityClass //functions to
//read information from the process object.
//SYNCHRONIZE Windows NT/2000: Enables using the process //handle in any //of the wait functions to wait for the //process to terminate.
LPDWORD lpExitCode = 0;
hProcess = OpenProcess( PROCESS_QUERY_INFORMATION, FALSE,
pid);
// the following statement cause an access violation:
//"unhandled exception in Bond.exe [Kernal32.dll]
//0xC000005, Access Violation
//why? please help.
BOOL bResult = GetExitCodeProcess(hProcess, lpExitCode);
|
|
|
|
|
DWORD &exitCode = 0;//<-- this line
hProcess = OpenProcess( PROCESS_QUERY_INFORMATION, FALSE,
pid);
// the following statement cause an access violation:
//"unhandled exception in Bond.exe [Kernal32.dll]
//0xC000005, Access Violation
//why? please help.
BOOL bResult = GetExitCodeProcess(hProcess, &exitCode); //<-- this line
|
|
|
|
|
I know this is kinda stupid question, but say I load a picture, but I want it to be able to change bitmap while I work with the program, MSDN I think get the following two explenations:
Syntax
Control.Picture[ = cFileName ]
Settings
cFileName
Specifies a .bmp, .gif, .jpg or, .ico file.
And:
object.Picture [= picture]
The parts of the Picture property syntaxes are described in the following table.
Part Description
picture A string expression specifying a file containing a graphic, as described in Settings.
Settings
The settings for picture are described in the following table.
Setting Description
(None) (Default) No picture.
Bitmap Specifies a graphic. You can load the graphic from the Properties window at design time. At run time, you can also set this property using the file name of a bitmap.
So lets say I have a picture with the string m_SelBmp
And a bitmap with ID: IDB_BMP
Should I call like this:
dunno.m_SelBmp[ = IDB_BMP ]
The funny thing here is that I know API much better than MFC...
|
|
|
|
|
I am creating a dialog based application using ATL. I want to minimize the size and and remove dependencies on MFC. All was well until I attempted to insert an ActiveX control using the Project/Add to Project/Components and Controls method commonly used. The problem is the control added by that method generates wrapper classes based on CWnd which the ATL project does not understand. I can also add an activeX control by right clicking on the resource form but no wrapper classes are generated. So my question is what is the simplest way to add an ActiveX control to the ATL based application? Will I need to use smart pointers/or IDL paths, etc, to access the ActiveX object like any other COM object?
|
|
|
|
|
Environment: Windows 9X, NT, 2000 VC++ 6.0
Can anyone tell me how CRichEditCtrl allocates memory? Is it movable or non-movable. I can't seem to find anything on the MSDN site. I'm trying to develop a real-time machine tool controler, and can't afford the latency that would be imposed by a virtual memory swap. I need to have the entire file (which is potentially quite large) in physical memory, assuming that there is enough physical memory to support this. Any help would be greatly appreciated.
|
|
|
|
|
Hi!
Is it possible to send dynamically generated text to a CHTMLView ?
Thank you,
Alwin
|
|
|
|
|
Hello everyone,
Can somebody help me with changing the font of menubar text in Visual C++?
Thanks alot,
Jeff
|
|
|
|
|
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
|
|
|
|