|
I did see it. So what I really have to do is when other tabs are selected that per example the "OPEN" tab, is hiding some or all controls of the CFileDialog, and bring new ones fore.
Sjoerd
|
|
|
|
|
Right. You can make it even easier by inserting thin dialogs on the tab control, this way hiding the dialog hides all the controls--just anything you can do with the standard Windows tab control is ok.
Regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
|
|
|
|
|
Is there any control in MFC that lets you view the directory tree of your drive or a listview of files in certain directory?
If not, how can I build a list of that kind? What functions can i use? And how can I get the icons for each file listed?
Basically, i would want my app to look a bit like ACDSee, but for another purpose of course.
Thanx in advance!
|
|
|
|
|
Hello,
There is no MFC class by MS to do what you wish. However, a lot of codes exist
at the codeguru site to help. You can take a look at the following code too
http://www.codeproject.com/shell/seashell.asp
Best regards,
Paul.
Paul Selormey, Bsc (Elect Eng), MSc (Mobile Communication) is currently Windows open source developer in Japan, and open for day job or programming contract anywhere!
|
|
|
|
|
buy this book: Programming Windows with MFC 2n edition!
|
|
|
|
|
Hi,
We are using dao to connect to various typses of databases, access, oracle, and sql server. This way our clients can choose which one they want to use. We have just encountered a problem, where one of our clients tables has over 255 fields. They are using sql server. Sql Server allows you to create tables with up to 1000 fields, but using dao to access them will only allow you to create recordsets with up to 255 fields! I believe that I can't even select from TWO tables that will end up in a recordset with more than 255 fields. Does anyone have any ideas as to how to get around this problem?
Thank You
|
|
|
|
|
The problem lies deeper than DAO. The Jet database engine only supports 255 fields per table so you might be out of luck
|
|
|
|
|
Hi,
I would like to learn a bit more about programming and would like
to focus on client-server application.
Does anyone know about tips and pointers where I can learn more about
this. I would like to know what it takes to write an application like,
say ArcServe, with a set of services running on the server and a
desktop application on the client side.
Cheers.
--
Maxime Labelle
maxime.labelle@freesurf.fr
|
|
|
|
|
URGENT: Please let me know some way to convert my existing database from access97/98 to access 2k in
VC++ using DAO
|
|
|
|
|
Hi there, I'm making a typelibrary with ATL for visual basic users. Does anyone know how you can create a static function so that it appears in the <globals> section when i look at my library with the objectbrowser in VB ?
|
|
|
|
|
Hi,
Just a small query:
I want to check if a certain module (.exe, i know its path) is running ? (VC++)
Thanks a lot.
|
|
|
|
|
If you are writting the other module try creating named Mutex
// Create named mutex
hNamedMutex = CreateMutex(NULL, TRUE, "The Other App");
// Test if the programm is already running
if(GetLastError() == ERROR_ALREADY_EXISTS) {
// Do Somthing
}
If you don't ...
the you have two approaches one is to enumerate the windows by using The EnumWindows function which enumerates all top-level windows on the screen by passing the handle to each window, in turn, to an application-defined callback function. EnumWindows continues until the last top-level window is enumerated or the callback function returns FALSE
If you want to enumerate the processes.
Under Windows 95, you must use functions from the ToolHelp32 group of APIs. Under Windows NT, you use functions from PSAPI.DLL, which is available in the Platform SDK.
// Sample Code FOR NT
#include <windows.h>
#include <stdio.h>
#include "psapi.h"
#pragma comment (lib, "psapi.lib")
void PrintProcessNameAndID( DWORD processID )
{
char szProcessName[MAX_PATH] = "unknown";
// Get a handle to the process.
HANDLE hProcess = OpenProcess( PROCESS_QUERY_INFORMATION |
PROCESS_VM_READ,
FALSE, processID );
// Get the process name.
if ( hProcess )
{
HMODULE hMod;
DWORD cbNeeded;
if ( EnumProcessModules( hProcess, &hMod, sizeof(hMod),
&cbNeeded) )
{
GetModuleBaseName( hProcess, hMod, szProcessName,
sizeof(szProcessName) );
}
}
// Print the process name and identifier.
printf( "%s (Process ID: %u)\n", szProcessName, processID );
CloseHandle( hProcess );
}
void main( )
{
// Get the list of process identifiers.
DWORD aProcesses[1024], cbNeeded, cProcesses;
unsigned int i;
if ( !EnumProcesses( aProcesses, sizeof(aProcesses), &cbNeeded ) )
return;
// Calculate how many process identifiers were returned.
cProcesses = cbNeeded / sizeof(DWORD);
// Print the name and process identifier for each process.
for ( i = 0; i < cProcesses; i++ )
PrintProcessNameAndID( aProcesses[i] );
}
Hope this helps
Cheers
G. ALfadhly
<marquee>
It is Illogical to define an inventor by his invention
|
|
|
|
|
Hi,
I am trying to Terminate a process under WINNT and i am facing problems in loading the psapi.lib file.
Can i get some help???
Looking forward for a solution..
Nayan
|
|
|
|
|
These PSAPI.lib, is distributed in the Microsoft® Platform Software Development Kit (SDK).
after installing PLatform SDK make suer you also set the envirnoment parameters such as path and other thingys (run the batch file)
For the SDK download
http://msdn.microsoft.com/library/psdk/portals/mainport.htm
Hope that will help
Cheers
Alfadhly
<marquee>
If I had a hammer
|
|
|
|
|
Hi,
Just a small query:
I want to check if a certain module (.exe, i know its path) is running ?
Thanks a lot.
|
|
|
|
|
is there a way to capture the menus that pop up when any button is clicked in the tool bar controls provided in IE?
Subir
|
|
|
|
|
PrintScreen doesn't work? Try HyperSnap... search www.download.com or www.tucows.com
...or maybe you mean something else besides screen capture?
|
|
|
|
|
hi
yes i want all the info regarding the screen including the associated menus.
the problem is getting a handle to the individual menus.when i tried using GetMenu with the topmost window the return value is NULL.the problem is compounded by the fact that the structure MENUBARINFO is not recognised by my program.any pointers??
thanks
subir talukder
|
|
|
|
|
What is it you want?! The screen capture! OR the CMenu return!?
Be exact please.
|
|
|
|
|
hi
its the CMenu or rather the HMENU values that i want since i am using Platform SDK.
subir
|
|
|
|
|
for the SDK, use GetMenu() directly.
for the MFC, use a CMenu object and then the GetMenu() of that object.
|
|
|
|
|
Hello,
I guess the subject says most of what this is. I was using Delphi 5 and liked many of the components that have been made for it. I am wondering if there is any software or any way to convert Borland C+ Builder components or VCL to Visual Basic 6 or Visual Studio 6.
The main reason really is because I like the Coolform component which allows you to use an image like a skin almost. I have tried a couple skin type programs but I'm new to MVS and couldn't figure them out so this is why I am asking.
Any other help would be apreciated if you have a link or something.
Thanks
Chris Bunting
|
|
|
|
|
I have never seen any...
Everything is possible, but it's not easy to port Delphi Components to VC.
The Pascal to C++ process is not so bad, I have done it a couple of times
But Delphi uses VCL (Visual Component Library), and to easily port the components, you almost need to make a C++ VCL, not an easy task...
You can't use C++ Builder Components either, because they are also written in Pascal...
Good Luck, if you find a "Delphi Components to C++" anywhere, please let me know...
- Anders
|
|
|
|
|
You can't make them native components, but you could wrap the BCB component in an ActiveX wrapper. This would allow you to use the control in VB or VC. You would have to use Delphi's ActiveX tools though.
|
|
|
|
|
Hello. It's the first time i've made a program about hooks. So The program is very simple. I use a DLL. The keys pressed buy the user will be saved in a small Buffer till the user press ESC. Then the program should show the Buffer and stop.
Here is the DLL
_______________
#include <windows.h>
#include "Definiciones.h"
#pragma data_seg(".DATOS_COMPARTIDOS_DE_LA_DLL")
HHOOK hHookDLL = NULL;//
#pragma data_seg()
char Buffer[100] ="";
BOOL Bandera = FALSE;
BOOL WINAPI DllMain (HINSTANCE hInstDLL, DWORD fdwReason, LPVOID lpReserved)
{
switch(fdwReason)
{
case DLL_PROCESS_ATTACH:
if (lpReserved)
{
if ( hHookDLL ) // Si ya se consigió el handle, salir
return FALSE;
hHookDLL = SetWindowsHookEx( WH_KEYBOARD, (HOOKPROC)KeyboardProc, hInstDLL, GetWindowThreadProcessId(GetActiveWindow(),NULL));
}
return TRUE;
case DLL_THREAD_ATTACH:
return TRUE;
case DLL_THREAD_DETACH:
return TRUE;
case DLL_PROCESS_DETACH:
if ( hHookDLL )
{
UnhookWindowsHookEx( hHookDLL );
hHookDLL = NULL;
}
}
return TRUE;
}
LRESULT CALLBACK KeyboardProc(
int idHook, // hook code
WPARAM wParam, // virtual-key code
LPARAM lParam // keystroke-message information
)
{
if (idHook < 0)
{
return (CallNextHookEx(hHookDLL, idHook, wParam, lParam));
}
else
{
LRESULT r =CallNextHookEx(hHookDLL, idHook, wParam, lParam);
if ((wParam >= 48) && (GetKeyState(wParam) &0xF0))//
{
Bandera = TRUE;
if (strlen(Buffer) < 100)
{
Buffer[strlen(Buffer)]= (char) wParam;
Buffer[strlen(Buffer)+1] = 0;
}
}
if (wParam == VK_ESCAPE)
{
Bandera = TRUE;//<-----------THE PROGRAM SEEMS NOT TO
//<----------- CHECK THE NEW STATE
MessageBox(NULL,Buffer,"Pressed ESC",MB_OK);
}
return(r);
}
}
int RetornaBandera(void)//returns true or false that's all
{
return Bandera;
}
Here is the program which loads statically the DLL
__________________________________________________
int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance,
PSTR szCmdLine, int iCmdShow)
{
while(!RetornaBandera())//An exported function from the DLL which SHOULD
//return ESC was pressed
return 0;
}
Raúl
|
|
|
|