|
you talk about servers or common users computers ?
which points do you compare to ?
your question have no content sir...
moreover, this is a general question (not a programming one), so you could have asked it on the Lounge[^]...
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
As I understand it, Linux is growing on the server side at the expense of Unx rather than Windows. On the desktop very little is changing.
Kevin
|
|
|
|
|
I have a single document application. I want to create a log window in my app similar to Output window in VC++ IDE.I need to update it at runtime, and scroll it down automatically.
How can i do this?
Thanks a lot for your efforts.
All efforts are valueable.
|
|
|
|
|
You can derive your class from CScrollView. Then use a splitter window class to split your window. It's too long to explain how to do that exactly (and too specific) but there is a lot of documentation in the MSDN.
|
|
|
|
|
Here is an alternative.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
How to convert a *.dat file to *.bmp file, so that the *.bmp file can be opened in Paint.
aasstt
|
|
|
|
|
this doesn't mean nothing... a .dat can contain whatever the one who created it wanted to put in it... if it already contains a bitmap, so just rename the file...
otherwise, you'll have to know what format is used in the dat file.
TOXCCT >>> GEII power [toxcct][VisualCalc]
|
|
|
|
|
do this,
in the command prompt, type
c:\..\..ren *.dat *.bmp,
and now all the .dat files are .bmp files..
V
|
|
|
|
|
hi,
first: how to create dialog based app in win32 without using resource
and to add radio button and listbox
second: after this how modeless dialog can be created from rom that modal and to transfer data from modal and to modeless in win32
|
|
|
|
|
tamsel wrote:
to add radio button and listbox
I know the answer of this Question But forget the Api...
tamsel wrote:
how to create dialog based app in win32 without using resource
use CreateWindow (if using Win32 api) with BUTTON as Class ....
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
You could use CreateDialogIndirect to create the dialog window. It uses a template in memory in standard form but not neccessarily a resource identifier. Adding additional controls on the fly can be done with CreateWindow and specifying the appropriate class.
Not sure what you mean on your second question. There is very little difference in the dialog template between modal and modeless.
|
|
|
|
|
douglasjordan wrote:
CreateDialogIndirect to create the dialog win
Nice, I forget that api ... thanks
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Hello, I wrote a function for drawing and resizing Bitmaps with VC++ 6 on Windows XP.
It works fine on Windows XP and Windows 2000. But when I try it on Windows NT4 Sp6 there is noching paited. I receive no errors and the created Bitmap Handle is not NULL. There just draws nothing on the screen.
I´m using the IPicture Interface for loading the Bitmap/jpg Files.
Does anyone have an idea where this might come from?
Do I need to update some dlls on the NT machine maybe some MFC dlls?
I´m rather new to Windows/MFC programming. So please excuse me if it´s a silly question.
-- modified at 4:33 Wednesday 28th September, 2005
|
|
|
|
|
After a lot of testing I narrowed down the problem. The Problem is not the Loading of the Bitmap. It is the resizing. Drawing the bitmap in its original size works fine.
Here is what I do:
LoadImageFromFile( &lbmpGraphic, fileName );
// lbmpGraphic contains the loaded bitmap (HBITMAP)
// this can be drawn on Windows NT
/*++++++++++++++ Begin Resizeing ++++++++++++++*/
// initialiZE Bitmap pointer
tempDC = CDC::FromHandle( GetDC( lhWnd ));
lpbmObject = new CBitmap;
// CREATE compatible Memory Devicecontext for the target
pCdcDest = new CDC;
pCdcDest->CreateCompatibleDC( tempDC );
// create compatible Memory Devicecontext for the source
pCdcSource = new CDC;
pCdcSource->CreateCompatibleDC( tempDC );
// Create compatible bitmap for the target dc
lpbmObject->CreateCompatibleBitmap( tempDC, lrectTarget.Width(), lrectTarget.Height() );
// Initialize target dc and save old bitmap
lpbmpDestSave = pCdcDest->SelectObject( lpbmObject );
// get bitmap Info for dimensions
GetObject (lbmpGraphic, sizeof (BITMAP), &lbmpTempBitmap);
// Select Bitmap into source DC
lpbmpSourceSave = pCdcSource->SelectObject(CBitmap::FromHandle(lbmpGraphic));
// Set stretchmode
SetStretchBltMode( pCdcDest->operator HDC(), COLORONCOLOR );
// StretchBlt Picture in Dest DC
lnStretchResult = pCdcDest->StretchBlt(
0,
0,
lrectTarget.Width(),
lrectTarget.Height(),
pCdcSource,
0,
0,
lbmpTempBitmap.bmWidth,
lbmpTempBitmap.bmHeight,
SRCCOPY );
if ( !lnStretchResult )
{
test_msg(ERROR, "ERROR in StretchBlt!");
}
// Draw a black frame
pCdcDest->LineTo(lrectTarget.Width() - 1, 0);
pCdcDest->LineTo(lrectTarget.Width() - 1, lrectTarget.Height() - 1);
pCdcDest->LineTo(0, lrectTarget.Height() - 1);
pCdcDest->LineTo(0, 0);
// get bitmap from target dc
lpbmpRes = pCdcDest->SelectObject(lpbmObject);
// make a copy ( lpoutBitmap stores the result of the function )
*lpoutBitmap = (HBITMAP)CopyImage(lpbmpRes->operator HBITMAP(),
IMAGE_BITMAP,0,0, LR_COPYRETURNORG);
//Cleanup
pCdcSource->SelectObject( lpbmpSourceSave );
pCdcDest->SelectObject( lpbmpDestSave );
tempDC->DeleteDC();
DeleteObject( lbmpGraphic );
pCdcDest->DeleteDC();
delete pCdcDest;
pCdcSource->DeleteDC();
delete pCdcSource;
lpbmObject->DeleteObject();
delete lpbmObject;
lpbmpRes->DeleteObject();
Something in this code does not work on NT. Maybe I deleted to much or to less objects or in the wrong order?
Does anyone have a suggestion?
Please help.
|
|
|
|
|
When I delete the last lines:
lpbmObject->DeleteObject();
delete lpbmObject;
lpbmpRes->DeleteObject();
The Bitmap will be drawn but I will leak 1 GDI Object each call. I can not have that.
btw I like talking to myself but it doesn´t help that much...
|
|
|
|
|
I am programming a Socket enabled with SSL on server side
//get the credentials
SecurityFunctionTable m_SecurityFunc;
Status = m_SecurityFunc.AcquireCredentialsHandle(
NULL,
UNISP_NAME,//schannel package requested
SECPKG_CRED_INBOUND,//for server
NULL,
&m_SchannelCred,//structure contains the data required for //SChannel
NULL,
NULL,
phCreds,//pointer to CreHandle which receives the handle to credentials
&tsExpiry);
if(Status != SEC_E_OK )
{
::OutputDebugString(_T("error"));
}
i m getting an error .I checked the returned value of status ,it is SEC_E_INTERNAL_ERROR
i m not understand where is the problem.
Thanx in advance for any suggestion
|
|
|
|
|
When you define a dialup or broadband internet connection on your computer a name is assigned to it. This name apears in the Control Panel-> Network Connections section . I want to know how can I get programmaticaly this names .
Can anyone help me?
|
|
|
|
|
USe the SetupDi functions to get the names. They are a pain in the arse to use mind you, you will need some sample code to help you. Look in the DDK, there is some code in it .
Nunc est bibendum
|
|
|
|
|
Radu Sorin wrote:
I want to know how can I get programmaticaly this names .
Can anyone help me?
I'm not sure of an API or a function that will retrieve the names, but you might could find them under the HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Network\{4D36E972-E325-11CE-BFC1-08002BE10318} key.
"One must learn from the bite of the fire to leave it alone." - Native American Proverb
|
|
|
|
|
Hey,
A third party spyware has hooked onto some of the processes in my system. Is there a way I can unhook the dll without crashing the process.
Windows allows creation and deletion of hooks using SetWindowsHook and UnhookWindowsHookEx method. Hence a programmer can create a thread in any process by hooking onto it using one of these functions and then have that thread run....do whatever he wants and then later Unhook. In my case there is a DLL which has been loaded into a remote processes address space by a third party. I donot want that DLL there so I am trying to go into that processes address space and use FreeLibrary (Kernel32 call) to free that library and have the DLL unload. I can see the DLL unloading but for some reason the process crashes after a while. The process currently hooked is Winlogon and thus crashing it crashes my entire system.......
In short, having no handle what so ever to the hooked process (being a third party hook) is there a way I can unload that DLL without crashing the remote program ? Is there a way using FreeLibrary or any other way ???
|
|
|
|
|
the child window is a window derived from CScrollView
|
|
|
|
|
followait wrote:
the child window is a window derived from CScrollView
you have to manually notify the parent about Mouse Moving
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
cheers,
Alok Gupta
VC Forum Q&A :- I/ IV
|
|
|
|
|
Can you add a message handler for the mouse move that posts back to the parent window?
|
|
|
|
|
I post a msg, it's ok, thanks.
|
|
|
|
|
How to write the program that when I type a data and send it through TCP/IP, it will add my own header infront of the data. I really need some help.
|
|
|
|