|
Hello mate,
This is what I use and it works
DWORD ReverseByteOrder(DWORD* pdwRaw)
{
unsigned char c[4];
memcpy( &c, pdwRaw, 4);
DWORD dwReturn = c[3] | (c[2] << 8) | (c[1] << 16) | (c[0] << 24);
return dwReturn;
}
Hope this helps!
|
|
|
|
|
Is there a way, to place a CFileDialog into a Propertysheet. I now there is a way, MS did it!
Please help
Sjoerd
|
|
|
|
|
MS did not use the propertysheet in a dialog. If you are refering to the
file/project dialogs in VJ++/InterDev 6.0 then take a closer look.
It is the normal tab control in the extended CFileDialog with the controls
hidden or shown depending on which tab you click--this is the normal tab control operation.
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!
|
|
|
|
|
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
|
|
|
|