|
oh, i didn't look much you're right...
but bad naming convention then !!!
|
|
|
|
|
It is passed as a parameter to the thread function (at least, it looks like). But anyway, it is a very bad idea to call this function from within another thread.
|
|
|
|
|
|
I want to paint some bitmaps for the Title bar and the Menu bar in a MFC application. How can we get the dimensions of the title bar or menu bar so that we could paint it accordingly?
I searched MSDN and it told I could use the call GetTitleBarInfo() for info on the title bar. But, the type of the parameter passed PTITLEBARINFO is not defined in Windows. Can anyone help me out?
Thank you,
AJ
|
|
|
|
|
|
I saw this on the MSDN, but if you try to use it with Microsoft Visual C++ 6.0, it gives a compilation error saying that TITLEBARINFO in undefined.
Thanks
AJ
|
|
|
|
|
I found the solution....the WINVER has to be defined as 0x0500 for 98, 2000 or later. After this it compiles without errors....
|
|
|
|
|
|
I posted here yesterday for this weird problem I am facing in MFC but I haven't got any replies in this forum. The problem - I have added an MFC class to my automation enable MFC "Full Server". While Adding the class, I selected the base class to be CCmdTarget and Selected the "Creatable by TypeId" option. The wizard generated the code but when I tried registering my server, the registry entry for this particular Class was NOT created in registry for some reason.
Finally, I have figured out the issue to be following -
The wizard adds IMPLEMENT_OLECREATE_FLAGS macro instead of IMPLEMENT_OLECREATE macro. If I change the wizard generated code to use IMPLEMENT_OLECREATE my class is getting registered. What I don't understand is why the wizard generated code is not working!!! (After looking at the macro code, I realize that it should work)
Does any one out here know about this issue? I am using VS .NET 2003
S o h a i l K a d i w a l a
To Err Is Human; to Debug, Divine
modified 21-Apr-21 21:01pm.
|
|
|
|
|
I m trying to block some key combination for e.g ctrl + s . I m creating 3rd party DLL file for my application.
can any1 help me out ?
vaibhav
|
|
|
|
|
Use SetWindowsHookEx() to set up a WH_KEYBOARD hook. Return a nonzero value from the your hook procedure to kill the keystroke.
|
|
|
|
|
See here[^] if its helpfuls
|
|
|
|
|
how many arguments we can pass to the new process?
Is there any limit on arguments or the size of buffer
that we are giving to CreateProcess as second parameter??
Harshal
|
|
|
|
|
Is there any limit on arguments or the size of buffer
that we are giving to CreateProcess as second parameter??
lpCommandLine
[in, out] Pointer to a null-terminated string that specifies the command line to execute. The maximum length of this string is 32K characters.
Windows 2000: The maximum length of this string is MAX_PATH characters.
The Unicode version of this function, CreateProcessW, will fail if this parameter is a const string.
The lpCommandLine parameter can be NULL. In that case, the function uses the string pointed to by lpApplicationName as the command line.
If both lpApplicationName and lpCommandLine are non-NULL, the null-terminated string pointed to by lpApplicationName specifies the module to execute, and the null-terminated string pointed to by lpCommandLine specifies the command line. The new process can use GetCommandLine to retrieve the entire command line. Console processes written in C can use the argc and argv arguments to parse the command line. Because argv[0] is the module name, C programmers generally repeat the module name as the first token in the command line.
If lpApplicationName is NULL, the first white-space – delimited token of the command line specifies the module name. If you are using a long file name that contains a space, use quoted strings to indicate where the file name ends and the arguments begin (see the explanation for the lpApplicationName parameter). If the file name does not contain an extension, .exe is appended. Therefore, if the file name extension is .com, this parameter must include the .com extension. If the file name ends in a period (.) with no extension, or if the file name contains a path, .exe is not appended. If the file name does not contain a directory path, the system searches for the executable file in the following sequence:
The directory from which the application loaded.
The current directory for the parent process.
The 32-bit Windows system directory. Use the GetSystemDirectory function to get the path of this directory.
Windows Me/98/95: The Windows system directory. Use the GetSystemDirectory function to get the path of this directory.
The 16-bit Windows system directory. There is no function that obtains the path of this directory, but it is searched. The name of this directory is System.
The Windows directory. Use the GetWindowsDirectory function to get the path of this directory.
The directories that are listed in the PATH environment variable.
The system adds a null character to the command line string to separate the file name from the arguments. This divides the original string into two strings for internal processing.
I win because I have the most fun in life...
|
|
|
|
|
Can you explain what do you need exactly?
|
|
|
|
|
A simple example:
I have a non-mode dialog ,and there are one Button, one ListBox in it.
Aim:
When the ListBox is empty the Button state is Disable, otherwise is Enable. And I want to use ON_UPDATE_COMMAND_UI message to do it.
Thanks very much!
|
|
|
|
|
|
I have developed a static library in Visual Studio 2005 using C and C++.
Now I would like it to be available in Visual Basic applications.
Currently I build a library file and include that and the header file of prototypes and build the solution.
I have included a typical libray function and my question is what do I need to do to allow access in VB.
Data Structure
static char EventText[][60] = {
"WAPI-000 Successfully Completed. ",
"WAPI-001 Initialisation Has Failed. ",
"WAPI-002 Failed to set the voltage level for coupling mode.",
...
...
etc
"WAPI-049 Failed to Write a Frame "};
}
Prototype in Header file
char * GetEventText429( UINT event_id);
}
The code of the function
char * GetEventText429( UINT event_id )
{
return &EventText[event_id][0];
}
e.g. Data structure, call in header file and code of function.
Many thanks,
Andy.
|
|
|
|
|
VB cannot use C/C++ static libraries. you'll need to put your code inside a DLL which exports functions using the stdcall convention.
|
|
|
|
|
Hi all,
The CFileDialog has on the bottom-right
corner a button labeled as "open".
How can i change the label into "save" ?
Thanx in advance,
Desmo16.
|
|
|
|
|
Did you read the documentation about the function ? (it's on MSDN).
If you read it, you would have seen that the first argument to the function is a boolean that specify if the file dialog is a load or save dialog box.
|
|
|
|
|
damn it !!!
i gave you the link to the constructor CFileDialog::CFileDialog()[^]... you didn't even bother reading it
msdn says :
bOpenFileDialog
Set to TRUE to construct a File Open dialog box or FALSE to construct a File Save As dialog box.
|
|
|
|
|
toxcct wrote: damn it !!!
cool cool buddy.
Nobody can give you wiser advice than yourself. - Cicero
|
|
|
|
|
brahmma wrote: cool cool buddy
seriously... why answering to people when they don't listen to you...
|
|
|
|
|
I'm sorry you're right.
I didn't think it was so easy, I supposed i had to use
fd.m_pOFN->something to do it.
I found that immediately after the post.
Excuse me again.
|
|
|
|