|
1. I drawed my BITMAP in primary surface and I would like to know the command using in clear surface.
2. I would like to know the surface using method more than two surface(I require the example).
|
|
|
|
|
You can BitBlt using BLACKNESS as the method ( instead of SRCCOPY ) or WHITENESS if you prefer.
Ta_Tee473 wrote:
I would like to know the surface using method more than two surface(I require the example).
What you talking about, Willis ?
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
Hello
I want to update menu when user select an other language.
I call "ModifyMenu" then "UpdateWindow" but changes are done only when mouse is going over the text.
Is anybody can help me?
|
|
|
|
|
You may want to try using RedrawWindow instead. You could also try using the UPDATE_COMMAND_UI which is called continuously when the menu is displayed.
Hope that helps
Dor
|
|
|
|
|
Thank you.
I used "DrawMenuBar" and it's is allright.
|
|
|
|
|
I have vb program.It has only one form.I am running my exe which is written in win32 application in vc++.i want to draw the lines on the vb form by using the vc++ program exe.
|
|
|
|
|
suresh_sathya wrote:
I have vb program.It has only one form.I am running my exe which is written in win32 application in vc++.i want to draw the lines on the vb form by using the vc++ program exe.
The first thing that comes to mind wrt communication between programs written by different languages is a DLL
( or maybe COM ). You could have your DLL, written in VC++ that your VB program can use in its program.
If the (VB) program is already build, I guess you could always try and subclass the window (form) and directly
draw on the surface.
Post more info on these programs. Are they in development, or are they already build and cannot be changed? Why VB and VC++, can you not convert one to the other?
I'm sure if its possible then someone outthere will post a reply
china
|
|
|
|
|
I am writing a simple console application with MFC support in order to connect to Database using ADO. But having problems in the initial stages.
The main program looks something like this:
int _tmain(int argc, TCHAR* argv[], TCHAR* envp[])
{
_ConnectionPtr m_pConnection;
HRESULT hr;
if(!AfxOleInit())
{
printf("\n COM initialization failed");
}
hr = m_pConnection.CreateInstance( __uuidof( Connection ) );
if (SUCCEEDED(hr))
printf("\n createInstance successful");
else
printf("CreateInstance unsuccessful");
The problem is that CreateInstance is failing. Please tell me the problem if you find out.
Oh yea, i added following lines in StdAfx.h:
include <comdef.h>
#import "C:\program files\common files\system\ado\msado15.dll" \
no_namespace \
rename( "EOF", "adoEOF" )
|
|
|
|
|
You need to initialise the COM library by calling ::CoInitialize()
eg:
if( FAILED(::CoInitialize(NULL)) )
{
AfxMessageBox(IDS_ERROR_COM_INITIALISE, MB_OK | MB_ICONEXCLAMATION);
return FALSE;
}
Chin
|
|
|
|
|
Hi .. i have a problem with vc++ ... i have made a mfc wizard mdi aplication and i've added a new class Info .. now i want to delcare a global instance of this class but i don't know were to put it exactly ... i put it in the app but error ... i have made a bew file adn included it in the project but error of memory or something like that .. please help me ... and excuse my bad english
|
|
|
|
|
You can add a member object of the class to your CWinApp derived class. Now you can use AfxGetApp() to get a pointer to your CWinApp derived object. Cast this to your actual derived class and use the member object directly. This way you can avoid using a global.
Regards,
Nish
Author of the romantic comedy
Summer Love and Some more Cricket [New Win]
Review by Shog9
Click here for review[NW]
|
|
|
|
|
Does anybody know if you can have nested CLists. Ive tried putting a CList into a struct and then making a CList of that struct but it gave out a whole lot of errors.
Cheers
Dor
|
|
|
|
|
First the obligatory disclaimer - CList is garbage. Use std::list instead.
What you may have is something like this:
list<list<int>> mylist;
which looks like a list of lists of ints, but instead you have the two >> symbols next to each other, which the compiler interprets as a shift operator. If that is your probilem, just insert a space.
Christian
We're just observing the seasonal migration from VB to VC. Most of these birds will be killed by predators or will die of hunger. Only the best will survive - Tomasz Sowinski 29-07-2002 ( on the number of newbie posters in the VC forum )
Cats, and most other animals apart from mad cows can write fully functional vb code. - Simon Walton - 6-Aug-2002
|
|
|
|
|
yes, you can.
what kind of errors?
-c
To explain Donald Knuth's relevance to computing is like explaining Paul's relevance to the Catholic Church. He isn't God, he isn't the Son of God, but he was sent by God to explain God to the masses. /. #3848917
|
|
|
|
|
Dear all,
I met a question.I want to detect if the host over lan installs MS Terminal
Service.Can you give me a correct way?
Thanks in advance
|
|
|
|
|
I want set a file,eg.test.txt,with read only and hide attribute,How can ido?
Thank you!
|
|
|
|
|
SetFileAttributes
The SetFileAttributes function sets a file's attributes.
BOOL SetFileAttributes(
LPCTSTR lpFileName, // file name
DWORD dwFileAttributes // attributes
);
Parameters
lpFileName
[in] Pointer to a string that specifies the name of the file whose attributes are to be set.
Windows NT/2000: In the ANSI version of this function, the name is limited to MAX_PATH characters. To extend this limit to nearly 32,000 wide characters, call the Unicode version of the function and prepend "\\?\" to the path. For more information, see File Name Conventions.
Windows 95/98: This string must not exceed MAX_PATH characters.
dwFileAttributes
[in] Specifies the file attributes to set for the file. This parameter can be one or more of the following values. However, all other values override FILE_ATTRIBUTE_NORMAL. Attribute Meaning
FILE_ATTRIBUTE_ARCHIVE The file is an archive file. Applications use this attribute to mark files for backup or removal.
FILE_ATTRIBUTE_HIDDEN The file is hidden. It is not included in an ordinary directory listing.
FILE_ATTRIBUTE_NORMAL The file has no other attributes set. This attribute is valid only if used alone.
FILE_ATTRIBUTE_NOT_CONTENT_INDEXED The file will not be indexed by the content indexing service.
FILE_ATTRIBUTE_OFFLINE The data of the file is not immediately available. This attribute indicates that the file data has been physically moved to offline storage. This attribute is used by Remote Storage, the hierarchical storage management software in Windows 2000. Applications should not arbitrarily change this attribute.
FILE_ATTRIBUTE_READONLY The file is read-only. Applications can read the file but cannot write to it or delete it.
FILE_ATTRIBUTE_SYSTEM The file is part of the operating system or is used exclusively by it.
FILE_ATTRIBUTE_TEMPORARY The file is being used for temporary storage. File systems attempt to keep all of the data in memory for quicker access rather than flushing the data back to mass storage. A temporary file should be deleted by the application as soon as it is no longer needed.
Return Values
If the function succeeds, the return value is nonzero.
If the function fails, the return value is zero. To get extended error information, call GetLastError.
Remarks
The following table describes how to set the attributes that cannot be set using SetFileAttributes.
Attribute How to Set
FILE_ATTRIBUTE_COMPRESSED To set a file's compression state, use the DeviceIoControl function with the FSCTL_SET_COMPRESSION operation.
FILE_ATTRIBUTE_DEVICE Reserved; do not use.
FILE_ATTRIBUTE_DIRECTORY Files cannot be converted into directories. To create a directory, use the CreateDirectory or CreateDirectoryEx function.
FILE_ATTRIBUTE_ENCRYPTED To create an encrypted file, use the CreateFile function with the FILE_ATTRIBUTE_ENCRYPTED attribute. To convert an existing file into an encrypted file, use the EncryptFile function.
FILE_ATTRIBUTE_REPARSE_POINT To associate a reparse point with a file, use the DeviceIoControl function with the FSCTL_SET_REPARSE_POINT operation.
FILE_ATTRIBUTE_SPARSE_FILE To set a file's sparse attribute, use the DeviceIoControl function with the FSCTL_SET_SPARSE operation.
Requirements
Windows NT/2000: Requires Windows NT 3.1 or later.
Windows 95/98: Requires Windows 95 or later.
Header: Declared in Winbase.h; include Windows.h.
Library: Use Kernel32.lib.
Unicode: Implemented as Unicode and ANSI versions on Windows NT/2000.
Thinking in difference!
|
|
|
|
|
|
How do you handle a click or a double click of the title bar? I've tried adding WM_LBUTTONDOWN and WM_LBUTTONDBCLK but they were never called when the user clicked on the titlebar.
-Raffi
|
|
|
|
|
Try WM_NCLBUTTONDOWN and WM_NCLBUTTONDBLCLK .
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
|
Yeah, good point.
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
How do you add them. Neither is in the class wizard, and I've tried manually writing them in but they never get called.
I've tried puttingON_WM_NCLBUTTONDOWN() in the cpp, afx_msg void OnNcLButtonDown( UINT nHitTest, CPoint point); in the header, and I added the function to the cpp, but it never gets called. Why doesn't it work?
|
|
|
|
|
What sort of a window is this?
---
Shog9
If I could sleep forever, I could forget about everything...
|
|
|
|
|
Child window of an MDI.
-Raffi
|
|
|
|