|
May be BHO can give you more control. For capturing that..
greatest thing is to do wot others think you cant suhredayan@omniquad.com>
messenger :suhredayan@hotmail.com
|
|
|
|
|
|
how to monitor new generated process from vc++ program
|
|
|
|
|
|
how do i set the code so that the .exe file will have the icon instead of the MFC icon?
|
|
|
|
|
go into the "Resource View" tab of your project and change both IDR_MAINFRAME icons to whatever icons you want
|
|
|
|
|
i did that but that only show in the title bar of the program, not on the .exe file that list under windows explorer.
|
|
|
|
|
Did you change them both ?
BTW - there is an MSDN article on this subject also.
__________________________________________
a two cent stamp short of going postal.
|
|
|
|
|
Hi
go to Resource View
Click ICOn
click IDR_MAINFRAME icon
Set the icon say your to both
small (16 * 16)
and Standard(32 * 32)
from the combo box in resource views side view above icon display
|
|
|
|
|
Oh, i see. never know there a combo box there. thank you!
|
|
|
|
|
The easiest way is to replace the .ico file(s) in the Res folder.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
hi!
i have created three splitter windows like microsoft outlook in MFC SDI application. The splitter windows are created in OnCreateClient() function of main frame. Now i want to hide and show the left and bottom window on some events dynamically. I have tried to use deleterow() type of functions but it is giving exception.
kindly tell me what to do? and how to resolve this issue?
The code for creating splitter windows is posted below for reference
// CODE
if (!m_wndSplitterV.CreateStatic(this,1,2))<br />
return FALSE;<br />
if (!m_wndSplitterV.CreateView (0, 0, RUNTIME_CLASS(CLeftView), CSize(150,150), pContext))<br />
{<br />
m_wndSplitterV.DestroyWindow();<br />
return FALSE;<br />
}<br />
if (!m_wndSplitterH.CreateStatic(& m_wndSplitterV,2,1,WS_CHILD|WS_VISIBLE|WS_BORDER,m_wndSplitterV.IdFromRowCol(0,1))) <br />
{<br />
m_wndSplitterV.DestroyWindow();<br />
return FALSE;<br />
}<br />
<br />
if (!m_wndSplitterH.CreateView(0, 0, RUNTIME_CLASS(CSCR1View), CSize(500,500 ), pContext)|| <br />
!m_wndSplitterH.CreateView(1, 0, RUNTIME_CLASS(CLowerView), CSize(0, 0), pContext))<br />
{<br />
m_wndSplitterV.DestroyWindow();<br />
return FALSE;<br />
}
regards
fatima
|
|
|
|
|
There's at least one article here at CP that shows how to use CSplitterWnd with changeable views. Unlike other implementations that destroy and recreate the views as necessary, this one basically keeps them in a list of some sort.
"The pointy end goes in the other man." - Antonio Banderas (Zorro, 1998)
|
|
|
|
|
Hi
I want to convert the text into transparent bitmap. How this can be done?
Regards
Neha
|
|
|
|
|
The wording of you question needs work, but here is what you need.
SetBkMode(TRANSPARENT); (the text is drawn without drawing background).
If you need to be able to move the text around via draging then you will have to create a compatible bitmap of the appropriate size and draw the text on it then drag the bitmap around on top of whatever bitmap you are placing it on. In which case you will need to use the functions: GetTextExtent (to determine the size of the bitmap to create before drawing to it) and TransparentBlt (NT/Windows 2000) or some other method for drawing doing transparent blits. An example of one way to do transparent blits is in the code provided in CDibData and another in the MSDN library.
Good luck!
INTP
|
|
|
|
|
I use ado to connect the SQL Server in VC6.0!
what type will I create the image filed in SQL Server?
and how to store the image to database from an image file?
and how to get the image file from the database?
thanks!
|
|
|
|
|
Depends how big it is and how big the rest of the row is. If it's small and there won't be much other data in the row, you can get away with a varbinary column. Otherwise, use an image column. The limit on the size of a row in SQL Server 2000 is 8000 bytes.
To write to an image column, you need to use a Parameter on your Command , using the parameter type adLongVarBinary . Set the size of the parameter to the size of your image, and use AppendChunk to set the value of the parameter.
When you get the image data, use a Recordset as normal. You can use the ReadChunk method to get the image data a chunk at a time.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
to Mike Dimmick
If I get away with a varbinary column ,
how to write to a varbinary column and read from the column?
thanks!
|
|
|
|
|
I am trying to return a WCHAR* from a function.
The WCHAR* variable will be Marshalled to managed
code with Marshal.PtrToStringUni. If I don't new it
then PtrToStringUni returns the wrong result or nothing.
This does not work.
WCHAR* GetRecorderDriveLetter()
{
WCHAR drive[4] = {0};
m_hr = (*this)->GetRecorderDriveLetter(drive, 4);
return (drive);
}
This does.
WCHAR* GetRecorderDriveLetter()
{
WCHAR* drive = new WCHAR[4];
m_hr = (*this)->GetRecorderDriveLetter(drive, 4);
return (drive);
}
What I am worried about is a memory leak.
How does the memory get freed?
Thank You
Bo Hunter
|
|
|
|
|
Ok, the reason the first isn't working is because you are returning a pointer to local routine memory. This is memory on the stack. When the routine exits, the memory is removed from the stack and will soon contain other information.
In your second example, memory will need to be freed by the caller.
Tim Smith
I'm going to patent thought. I have yet to see any prior art.
|
|
|
|
|
1) Change the variable WCHAR drive[4] as a class member.
2) Or alter the function prototype into something like this:
some_return_type GetRecorderDriveLetter(WCHAR* pDrv);
Or even wrap the WCHAR array as an user type object (struct), then:
some_return_type GetRecorderDriveLetter(DriveObj& ref);
3) Or, just as Tim said,
// ......
WCHAR* pp = GetRecorderDriveLetter();
delete[] pp;
Maxwell Chen
|
|
|
|
|
I second Maxwell's second proposal: change the function to
HRESULT GetRecorderDriveLetter( WCHAR* pDrv ); and P/Invoke as follows:
[DllImport(DLL_NAME, CharSet=CharSet.Unicode, ExactSpelling=true)]
private static extern int GetRecorderDriveLetter( StringBuilder pDrv ); Make sure the StringBuilder you pass in has an appropriate Capacity for the called function.
Stability. What an interesting concept. -- Chris Maunder
|
|
|
|
|
I am using Visual Studio.NET and the Visual C++ debugger all of a sudden started immediately hanging whenever it is invoked. I then have to control-alt-delete to shutdown VS. It isn't just the program I am trying to debug either because I have tryed to run the debugger on several other programs and the same thing is occuring. It has worked perfectly fine up to this point.
Has anyone else had this problem and if so, how did you resolve it?
Thanks in advance,
Josh
|
|
|
|
|
I have never heard about such a problem. You could try to "repair" your installation of visual studio using windowsinstaller.
Don't try it, just do it!
|
|
|
|
|
Using visual C++, can I monitor data on a serial port opened by another application?
I have an application that recieves data from a comm port. I want to write a program to idependently monitor the data that is recieved on this port, and (depending on the data) write it to a file. I don't have source to the application.
Is it possible to transparently view the data on a comm port like this?
I've tried using CreateFile() to get access to the port, but I get a "port in use" error.
Any help appreciated.
Thanks
Jim
|
|
|
|