|
A CRichEdit can handle almost any amount of text.
Just remember to call AfxInitRichEdit before trying to display the dialog.
Who is 'General Failure'? And why is he reading my harddisk?!?
|
|
|
|
|
I am trying to place a high resolution bitmap on a Picture control. I resize the image to fit on the picture control.
However I lose some resolution (its quite bad).
I did try and load the image as a jpg and gif and wmf but keep getting the error:
c:\Task_Emu\Task_Emu.rc(339): error RC2170 : bitmap file res\PrimaryFlight.gif is not in 3.00 format
I have looked at the properties of the Picture control and Bitmap (set to True colour).
Are they antthing I can do to get the bitmap (or jpg) displayed a bit better. I expect some lose of resolution, but just want it a bit better if possible
Regards,
Sweep123.
|
|
|
|
|
How much are you resizing it?
|
|
|
|
|
Quite a bit!
The original image was done in CoralDraw and converted to bmp format (size ~2.MB).
Other programs, Paint, PaintShopPro display the detail, its just the Picture control seems to break it up a bit.
All I want was a bit more detail if possible.
Does that help?
|
|
|
|
|
I'm not sure this will help, but you could try StretchBlt'ing the image to a DIBSection in RAM and displaying that.
|
|
|
|
|
Hi.
My question is how does a server knows if the connection is suddenly gone for example if the hardware connection is broken? Usually a server will send alive messages etc to the client so the client will know. But how does a server know if that side is gone when it is not shutdown "gracefully?"
Is there a function call to help with this?
Thanks in advance.
|
|
|
|
|
i suppose there will be "ping, pong" packets to ensure the client is still alive!
Don't try it, just do it!
|
|
|
|
|
If TCP connection goes down, your implementation will notice you (FD_CLOSE). But the timeouts are very long if e.g. the network cable was just disconnected, you prolly want to test on your own.
|
|
|
|
|
Hi
Can anybody help me? I have a https-file on a server in the internet and want to get the file.
The adress look like:
https://ss004.ak.se/http://ss005.ak...productLogo.gif
This is not the right adress is only a example.
I managed to get a CInternetSession pointer and with that I made a GetHttpConnection to get a pointer to CHttpConnection. With that pointer I know I need to make a OpenRequest() but from that point on I have no clue what to write next.
What do I have to do for that???
Thanks
D
|
|
|
|
|
Hi ,
i have also done the same thing once but using Wininet APIS
i can guide u how to use them.
To use the HTTP WinInet functions
Call the InternetOpen function to initialize an Internet handle.
InternetOpen creates the root HINTERNET handle used to establish the HTTP session. The HINTERNET is used by all subsequent functions.
Call InternetConnect using the HINTERNET returned by InternetOpen to create an HTTP session.
When calling InternetConnect, specify INTERNET_DEFAULT_HTTP for the nServerPort parameter and INTERNET_SERVICE_HTTP for the dwService parameter.
InternetConnect uses the handle returned by InternetOpen to create a specific HTTP session. InternetConnect initializes an HTTP session for the specified site, using the arguments passed to it and creates HINTERNET that is a branch off the root handle. InternetConnect does not attempt to access or establish a connection to the specified site.
Call HttpOpenRequest to open an HTTP request handle.
HttpOpenRequest uses the handle created by InternetConnect to establish a connection to the specified site.
Call HttpSendRequest using the handle created by the HttpOpenRequest to send an HTTP request to the HTTP server.
Call InternetReadFile to download data.
–Or–
Call InternetQueryDataAvailable to query how much data is available to be read by a subsequent call to InternetReadFile.
Call InternetCloseHandle to close the handle created by HttpOpenRequest.
Call InternetCloseHandle to close the HTTP session created by InternetConnect.
Call InternetCloseHandle to close the handle created by InternetOpen.
in this way u can download ur file
Abhishek Srivastava
Software Engineer (VC++)
India ,Noida
Mobile no 9891492921
|
|
|
|
|
I did that too but it works only with http files if I am not wrong. It doesn't work with https web pages !
The problem is how to handle the SSL.
How can that be done in C++ ?
Especially if it is a page that need a login
Thank you very much for any answer !
Marcello
|
|
|
|
|
You could maybe use URLDownloadToCacheFile .
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
hi !
I have a control derived from CWnd and I create an instance of it on a dialog.
The problem is that the control does not get the keyboard focus when I click
on it. What am I missing ?
Thanks.
PS:I work with VC 5.
|
|
|
|
|
I dunno, theres alot you could have done if your control is derived from CWnd.
Maybe make sure that your control inside your dialog resource has tab stop checked?
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
did you create the control with enabled bit set.
I Touched Osama Bin Ladens Bushy Beard
|
|
|
|
|
Hello !
I want to have a check box in front of each data in the list box that enable the user to select the datas he wants. Is this functionnality in the CListBox or do I need to subclass the control ?
Thanks
|
|
|
|
|
Try to use CListCtrl instead.
In Report View it can handle check box-es on the first column automatically.
Set extented style to LVS_EX_CHECKBOXES.
|
|
|
|
|
Ok, thanks
I'll try this
|
|
|
|
|
A CListBox is a list of string items.
That having said, if you want to have check box buttons instead of string items, then the best way would be to derive a new class from the CListBox and override the DrawItem member function. This function is safe to use: by selecting a certain type of return value, you can tell Windows what type of drawing you did. For example, if draw it completely yourself, then windows doesn't need to draw it anymore. If you don't want to draw a particular cell, you can let Windows do it.
Here is a CodeProject link to help you get started: Michael Dunn's article[^]
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
I would poke around the Visual C++ section under comboboxes and listboxes someone has probably already written such a control.
Cheers
The word of the day is legs, let's go back to my house and spread the word
|
|
|
|
|
|
hi!,
i have put a CTreeCtrl in my view class,
i create it on my View::OnCreate and insert some items in
my View::OnInitialUpdate().
i would like to handle messages when i click on treeCtrl items
but how will achieve this?
should i subclass this treeCtrl or is there another way?
what will i do for the future controls user actions.(like Buttons, Edits...)?
thanks for ur help,,,
atilla.
just listening to you...
|
|
|
|
|
You can capture notification events (WM_NOTIFY) from the tree control in your parent window class's message map.
The implementation of the message map entry is as follows:
ON_NOTIFY( <notification message>, <control ID>, <member fxn> ) The above is a message-map entry in the parent window's message map which owns the tree control.
You then declare a member function member fxn that handles the notification message.
For more information about notifications and how they work, visit this link on the MSDN site.
For a list of notification messages sent by a tree control, see this site, again on the MSDN.
-Antti Keskinen
----------------------------------------------
The definition of impossible is strictly dependant
on what we think is possible.
|
|
|
|
|
Hi !
The project I'm working on is being made with Visual Studio 6. I used to have my project on a specific location on my disk, and some weeks ago, I changed the location.
We are using CVS as the soruce control.
I have the following problem with some classes : if I try to add a new method, I get this error message :
D:\Work\sylvie\src\Utilities\JSUtility.cpp(579) : error C2039: 'applyTransformationToList' : is not a member of 'JSUtility'
c:\scripts\sylvie\src\utilities\jsutility.h(45) : see declaration of 'JSUtility'
As you can see, instead of looking at the header file of JSUtility in D:\Work\sylvie\src\Utilities, the compiler looks at c:\scripts\sylvie etc...
This is an old location. To get rid of this message, the only way I found is to do a 'rebuild all' of the project.
I tried to look in the .dsp and .dsw files if this old location was still written somewhere but didn't find anything !
Have you got an idea on what's going on and how I could solve this problem ?
Thanks for your help !
Jerome
|
|
|
|
|
This information is kept in precompiler header file (.pch). Rebuild All helps because it removes this file.
|
|
|
|