|
The icons on the windows system menu are made from the true type font Marlett. Does anybody know how I can use these icons? Are they created from the font at runtime (how?), or are they allocated as icons in a ressource (which?).
MS
|
|
|
|
|
Neither-Nor
see MSDN: DrawFrameControl, if should be the DFCS_CAPTIONCLOSE, DFCS_CAPTIONMAX etc. uState values
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|
|
Thanks, thats seems to be the solution.
MS
|
|
|
|
|
Hi
I want application to convert unicode enabled. so for this i am converting all datatype to wide characters.if i used only widecharacter datatypes then Is they applicable for both unicode and ASCII.
|
|
|
|
|
I suspect you want TCHAR.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
|
|
|
|
|
The wchar_t type can be used by both ANSI and Unicode applications, just like int and double can be.
But what exactly do you mean by "Unicode enabled"? Do you mean that you want the application to support Unicode text, but still run on ANSI-only systems like Win 9x/me, or you want to write a native Unicode application, that only uses the Unicode APIs, and not the ANSI ones?
Any application, regardless of an ANSI or a Unicode build, can manipulate both Unicode and ANSI data, and can even make calls to both versions of API functions. For example:
MessageBoxA( NULL, "ANSI", "MessageBox", MB_OK );
<code>MessageBoxW( NULL, L"Unicode", L"MessageBox", MB_OK );</code> When developers talk about a Unicode application, they generally mean a Unicode build of the application, which means that it is linked against the Unicode Windows API libraries, and will not run an an ANSI-only system.
There is no such thing as a TCHAR application. There is TCHAR-based code can be used to create both both ANSI and Unicode builds. TCHAR and TCHAR-based identifiers/names like _tcscpy(...) get converted to the character type for the build being done.
For example, for an ANSI build, TCHAR becomes char , _tcscpy(...) becomes strcpy(...) and MessageBox(...) becomes MessageBoxA(...) .
For a Unicode build, TCHAR becomes wchar_t , _tcscpy(...) becomes wcscpy(...) and MessageBox(...) becomes MessageBoxW(...) .
Peace!
-=- James If you think it costs a lot to do it right, just wait until you find out how much it costs to do it wrong! Avoid driving a vehicle taller than you and remember that Professional Driver on Closed Course does not mean your Dumb Ass on a Public Road! DeleteFXPFiles & CheckFavorites (Please rate this post!)
|
|
|
|
|
Hi all,
I have a C function in my dll workspace. This function is exported from the dll. I want to return value from the function. The value is of enum type. The declaration and the defination of this enum type variable is in some different .h file. so how should i export this function and get the return value.
I have exported the function by using the following statement.
__declspec(dllexport) rs_result rdiff_sig(const char *BasisPath, const char *SigPath);
i am getting error messages and they are :
error C2146: syntax error : missing ';' before identifier 'rdiff_sig'
error C2501: 'rs_result' : missing storage-class or type specifiers
fatal error C1004: unexpected end of file found
How should i solve this issue.
Please help me.
Thanks
Datta
|
|
|
|
|
If you return an enum, the program using the dll needs to know what it is, so you need to include the header file containing the declaration of the enum in your program also.
|
|
|
|
|
Yes i included the .h file and it worked.
Thanks
|
|
|
|
|
Hi all,
I have a win32 dll workspace. In this workspace i have most of the files as .c files. I want to export one of the function from this dll. The function is a static function. so for that function if i export it in this way
__declspec(dllexport) static rdiff_sig(const char *BasisPath, const char *SigPath);
i am getting one error message as below.
error C2201: 'rdiff_sig' : must have external linkage in order to be exported/imported
What should i do to solve this problem.
Thanks
Datta K.
|
|
|
|
|
I'm not an expert in C programming but I think that declaring a global function as static means that it is only accessible from within that file. Did you try what your compiler told you ? That is specify the function as extern (put the keyword extern in front of it) ?
|
|
|
|
|
I want the caption bar buttons(i.e,mim,max,and close) to be removed completely.Is it possible.
|
|
|
|
|
remove them from the system menu of your application...
|
|
|
|
|
Thanks.I have another question can we replace these by bitmap buttons with same features.Because i have added gradient color to the title bar and now look of these buttons is not good on the title bar.so only i want to remove these buttons.And i want to add bitmap buttons in their place.Is my approach good or can we modify look of existing buttons on the title bar.
|
|
|
|
|
|
Hi,
From a CPP program, I am creating a service. And from that service I am invoking an exe with CreateProcess function. The problem here is that, when that service is started locally then the exe's GUI is visble. But if the service is started from the machine thru remotedesktop connection, the exe's GUI is not visible. But I can see the exe process in task manager.
Please help me in this regards.
Thanks in advance.
Surendran
|
|
|
|
|
Hi,
If it is a service, then it is executed in local session, which is different from the one that you're operating.
You have to attach your service desktop to the one you're going to display GUI on. AFAIK, there's no way to attach your GUI to something like "global" desktop so it would be visible for all. Only one desktop can be attached at once.
I suggest, creating GUI as client app and use IPC to speak with your service. This way, your GUI may have access to the service from multiple desktops at once. use sockets, shared memory or pipes for IPC (shmem or pipe should be created in global namespace).
Regards
|
|
|
|
|
sir,
I want to invoke active-x control method.
The object for which is getting created on use of methods(CoGetClassObject , RequestLicKey ,CreateInstanceLic), but i couldn't able to invoke methods of Active-x control.
Here is the code which explains the problem. please suggest me for further action.
void CContainerView::OnRButtonDown(UINT nFlags, CPoint point)
{
IClassFactory* pclsf;
IClassFactory2* pclsf2;
IUnknown* pUnk;
ICalendar* pmydll;
BSTR lickey;
//for mmcontour clsid
static CLSID const clsid = { 0x621464c0, 0x5e90, 0x4da2, { 0x9a, 0x6b, 0x9b, 0x7f, 0xdd, 0x31, 0x91, 0x98 } };
//get the IClassFactory Interface pointer
IDispatch *pDisp = NULL;
HRESULT hr = CoGetClassObject(clsid,CLSCTX_INPROC_SERVER,NULL,
IID_IClassFactory,(void**)&pclsf);
hr = pclsf->QueryInterface(IID_IClassFactory2, (void**)& pclsf2);
if (FAILED(hr))
pclsf->Release();
IMmContrs *pObj;
//To get License key
hr = pclsf2->RequestLicKey(20,&lickey);
//To create instance of object using License key
HRESULT hr2 = pclsf2->CreateInstanceLic(NULL,NULL, IID_IOleObject ,
lickey, (void **)&pObj);
TRY
{
BOOL blTitle;
//Getting Following Error on Execution of methods in MMContour :
//Unhandled exception at 0x78303ba4 (mfc80d.dll) in Container.exe: //0xC0000005: Access violation reading location 0x00000000.
blTitle=pObj->AboutBox();
}
CATCH_ALL(e)
{
THROW_LAST();
}
END_CATCH_ALL
//finally
//{
pclsf2->Release();
}
waiting for your reply.
regards,
praveen A.
praveena@navayuga.co.in
praveen kumar agarwal.
|
|
|
|
|
Hi,
It seems that pObj is not created.
Are you certain that this ActiveX control does contain runtime license key? You should check for its availability with GetLicInfo . One of the members of LICINFO structure, fRuntimeKeyAvail, does specify if such license can be obtained, by using RequestLicKey. If there's no runtime license, you have to provide license key, manually.
Also, check hr2 for errors, when creating instance.
Regards
|
|
|
|
|
I am able to get license key. the active-x control is getting instantiated. But problem is with invoking method/properties of the control. I get access violation error.
regarding hr2, it is returning S_OK.
Thanks & Regards,
Praveen A.
|
|
|
|
|
I am working on a C++ class project in MSVC. I have declared:
class Node
{
private:
.
.
.
public
.
.
.
};
now in a separate file, I want to declare:
class Employee
{
private:
Node alphabetagamma; // for example
.
.
public:
.
.
.
};
When I do this I get compile time errors indicating that the compiler does not recognize "Node" as a type of object. I am including the header files correctly in my implementation (.cpp) files. What am I forgetting?
Thanks,
Geoff
-- modified at 5:02 Friday 1st December, 2006
|
|
|
|
|
Spherelin wrote: I am including the header files correctly in my implementation (.cpp) files
If you declare an instance of Node in your header file, then you need of course to include the header file of Node in thie file also (otherwise, the class Node is not recognized).
|
|
|
|
|
okay thanks - that fixed it!
hey so if I am entering a number via a statement like:
cin >> selection
how do I clear cin for the next use.
basically, user is going to enter a number (text entry program...for now). and then the next entry is going to be characters - like a name or state.
Right now, it seems to take the strike of the return key as the second entry.
THanks,
G
|
|
|
|
|
Dear All,
I am doing a project , which is an MFC application (MDI)
. Now its a standalone application with MS Access as the "Back end". I
have used ADO to made the connection.
Now I want to make this application to work for several clients
at the same time . I also want this application to communicate with 3
different types of Database .
1) MySQL
2) MS SQL Server
3) Oracle
My application should connect with any of the above DB , without making
any problem..
Can I make a general implementation by using ADO ?
What are the precautions I have to take to implement this ?
I think ,I have to face the problems of "concurrent write/reads " to
the DB...How can I overcome this ?
Now I am using Multiple SQL queries for multiple table updations.
Whether I can use transactions to avoid data loss during multiple table
updations...?
But I think MySQL won't support transactions...Is there any other
option?
Can any one pls give me a suggestion ...?
Thanks in advance...
vinsankar
|
|
|
|
|
Hi,
MySQL DO support transactions. Never doubt in a free software, just because it's free.
Using transactions is exactly what you need to handle concurrent access.
Regards
|
|
|
|
|