|
QueryDosDevice. Though, I think you can only use a drive letter to get an NT object name, meaning you'll have to loop all drive-letters until you find a match.
|
|
|
|
|
I want to receive some bitmap from client with socket. How i can start?
|
|
|
|
|
Start developping the Client server first, then u can just read the bitmpap file and send it to the server and its the job of the server to rewrite the bitmap file !
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
This is answered in this forum before, you can try search the forum!
But, to send a bitmap you just read the bitmap file in binary mode and then simply send(bitmap_data,...) !
or something!
Rickard Andersson@Suza Computing
C# and C++ programmer from SWEDEN!
UIN: 50302279
E-Mail: nikado@pc.nu
Speciality: I love C#, ASP.NET and C++!
|
|
|
|
|
Hi!
I'm using the Win NT UpdateResource API to change the main icon of a program. My code works well if I extract an icon from a module (EXE/DLL) and I replace the destination icon by this one.
Here my code:
<br />
HANDLE hUpdate;<br />
char* lpResLock;<br />
HINSTANCE hExe;<br />
HRSRC hRess;<br />
<br />
hExe=LoadLibrary ("c:\\winnt\\explorer.exe");<br />
hRess=FindResource (hExe, MAKEINTRESOURCE (10), RT_ICON);<br />
lpResLock=(char*) LockResource (LoadResource (hExe, hRess));<br />
<br />
hUpdate=BeginUpdateResource ("c:\\winnt\\calc.exe", FALSE);<br />
UpdateResource (hUpdate, RT_ICON, MAKEINTRESOURCE (1), 1036, lpResLock,SizeofResource(hExe, hRess));<br />
EndUpdateResource (hUpdate, FALSE);<br />
FreeLibrary (hExe);<br />
I would now like to do the same thing but instead of extracting an icon from an module, I would like to get the icon from an ICO file.
How can I use UpdateResource API with an ICO file?
Thks in advance!
Appstmd
http://www.appstmd.com
|
|
|
|
|
|
|
Hi,
If I create a tempfile with _open (_sopen) and _O_TEMPORARY-flag I can write to this file but I hav'nt access from an other application. Here the complete Code:
int fh = _sopen ("tempfile.ext", _O_BINARY | _O_RDWR | _O_CREAT | _O_TEMPORARY, _SH_DENYNO, _S_IREAD | _S_IWRITE);
int written = _write (fh, (void *) buffer, sizeof (buffer));
StartApplication ("tempfile.exe");
_close (fh);
Is anybody out there with an solution? I hoped, if I close my 2nd Application (he should open the tempfile for read), the system delete my tempfile automaticly.
Stephan
|
|
|
|
|
I have a code statements:
vect<cstring> strs("ddd");
find(strs.begin(), strs.end(), strs);
Building message:
error C2440: '=' : cannot convert from 'const class CString *' to 'class CString *'
|
|
|
|
|
1. what is a "vect" ?
2. what line does the error message refer to?
-c
Green's Law of Debate:
Anything is possible if you don't know what you're talking about.
|
|
|
|
|
Chris Losinger wrote:
1. what is a "vect" ?
Chris,
It looks like he migh have done something like this, maybe??:
typedef vector<CString> vect;
error C2440: '=' : cannot convert from 'const class CString *' to 'class CString *'
Could you be having a problem with a copy constructor or do you not have to deal with those when working with the CString 's?
Nick Parker
The greatest lesson in life is to know that even fools are right sometimes. - Winston Churchill
|
|
|
|
|
try
find(strs.begin(), strs.end(), CString("ddd"));
Todd Smith
|
|
|
|
|
Can anyone tell me how to programatically delete the file. Can this be achieved via CFile ???
|
|
|
|
|
Use DeleteFile , for instance.
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
|
Cfile::Remove
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Hi!
I'm looking for creating a program in which I would like to add a dialog which contains a Html Edit Control like the one we can get by using the Document/View architecture with the CHtmlEditDoc class as the Document Class.
Here a portion of my code:
BOOL CHTMLCDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CHtmlEditCtrl m_HtmlEdit;
m_HtmlEdit.Create ("",0, CRect (0,0,100,100), this, 1);
....
I get the following error:
error C2248: 'CHtmlEditCtrl::~CHtmlEditCtrl' : cannot access protected member declared in class 'CHtmlEditCtrl'
Does anyone could help me?
Thks in advance!
Appstmd
http://www.appstmd.com
|
|
|
|
|
Ummm. It's strange that the dtor is protected, but nevertheless you're doing it wrong, since in this case the control should be dynamically allocated:
BOOL CHTMLCDlg::OnInitDialog()
{
CDialog::OnInitDialog();
CHtmlEditCtrl* m_HtmlEdit=new CHtmlEditCtrl();
m_HtmlEdit->Create ("",0, CRect (0,0,100,100), this, 1);
....
Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
|
|
|
|
|
I don't know about your CHtmlEditCtrl (???) but I've tried this with CHtmlView and it works very nice. CHtmlView (like all CView's has the constructor protected)
//in your OnInitDialog
CHtmlView *pView ;
CRuntimeClass *pRtClass = RUNTIME_CLASS(CHtmlView);
pView = (CHtmlView *) pRtClass->CreateObject();
pView->Create(NULL, NULL, WS_VISIBLE | WS_CHILD, rct, this, IDC_STATIC_CTRL);
pView->Navigate2(_T("www.microsoft.com"));
Romeo JUNCU
|
|
|
|
|
Thks, the code is working now.
Thks in advance!
Appstmd
http://www.appstmd.com
|
|
|
|
|
How can I edit a ListItem in a MFC CListCtrl. I know that i should place a Edit-Box. But on which position?
How can I get the Position for the EditBox?
|
|
|
|
|
No, you don't create your own edit box. Handle the LVN_BEGINLABELEDIT and LVN_ENDLABELEDIT notifications.
--Mike--
Just released - 1ClickPicGrabber - Grab & organize pictures from your favorite web pages, with 1 click!
My really out-of-date homepage
Sonork-100.19012 Acid_Helm
|
|
|
|
|
Do you have a sample-code?
|
|
|
|
|
What do you mean edit an item? Do you mean change an item if the user clicks on it?
For example, if the user double clicks an item, you could create a dialog box with the item's current data and allow the user to change it.
Kuphryn
|
|
|
|
|
In our very own List Control articles section, there is an article on Editing Sub-Items in List Control by s.prabhakarreddy. You may find it useful...
Shog9
------
And on the pedestal, these words appear:
"My name is Ozymandias, King of Kings,
Look on my Works, ye Mighty, and despair!"
Nothing beside remains.
|
|
|
|