|
hi,
thanks for the reply
i've notice that regserver is what i need to regsiter COM dll.
i have an other file which is COM exe (server) i need to perfrom \regserver
on it....
how do i do that in the script? (sorry, but i didn't find it in the help )
thanks again
Yaron
Ask not what your application can do for you,
Ask what you can do for your application
|
|
|
|
|
How can I find out the video fomat(MPEG,DIVX,XVID,MPEG2) of a file using MFC/ATL?
|
|
|
|
|
Visit this site first.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Must be a simpler way than this, using windows API.
|
|
|
|
|
Some file types have structures available (e.g., BMFORMAT, BITMAPINFO, BITMAPINFOHEADER) but the file still needs to be read into those structures. Other file types have an accompanying SDK that can be used.
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Hi,
if i invoke an MFC dialog based app, a UI comes up which has a few controls over it say an OK button. If i step into the code to see its x,y coordinates and also its height and width i do a GetWindowRect and then ScreenToClient. But whatever value i get at runtime does not correspond to what is stored for that control in the corresponding .rc file. What transformations are required to perform to land up at the right control properties.
|
|
|
|
|
|
1. We do pCtrlWnd->GetWindowRect(&rect); where pCtrlWnd is any control on the MFC UI.
2. Next we do m_pParentWnd->ScreenToClient(&rect); where m_pParentWnd is the parent window handle.
3. The rect so obtained contains position & size information about the control with respect to the client’s co-ordinate system.
4. We find that the values obtained in the previous point do not match with the control co-ordinates mentioned in the VC++ RC file (viz. GROUPBOX "Original",IDC_GPB_ORIGINAL,7,6,137,89 will give some changed values for the rect obtained in 3 for IDC_GPB_ORIGINAL).
5. We tried to use APIs like MapDialgRect & GetDialogBaseUnits to provide transformation to the co-ordinates obtained in 3, but still it does not match the values mentioned in the RC file. If the values obtained in 3 are inserted into the RC file after modifying the position by say 1 unit to the right, control position & size get grossly altered. We want to know the transformation required to write back such a value as in 3 to the RC file’s co-ordinate system.
|
|
|
|
|
A image will be Loaded in the Contol and Now i need to select and move the image (Up-Down) and (left -Right)in Custom static Control.I need a Help..
Will u Please Help me?
Hari S P
|
|
|
|
|
Derive a class from CStatic and treat the keydown event in the sense of setting some displacements ont he x and y axes. Then use those displacements to "draw" your image in OnPaint().
SkyWalker
|
|
|
|
|
This isn't really a question about VC++ but I thought this was the best place to ask it.
I have to create resources in Chinese for an existing suite of applications. The apps already support non-English languages by using resource-only dlls and over the years I have created resources in Italian, French, German, Spanish, Danish, Dutch, Portuguese, Turkish and Russian.
My next challenge is to begin making a Chinese resource dll. The problem is that I know nothing at all about the language . I have a Chinese agent who reads, writes and speaks good English. He will translate text files for me and I have a way of exporting and importing them from and to resource files. He is in China and I am in England.
The applications will run on XP Pro SP2, either a Chinese version or (very preferably) an English version with MUI.
My development system is English XP Pro SP2.
I have some naive questions to get started:
1. What else, if anything, do I need on a development system?
2. What's the difference between Simplified and Traditional Chinese, and how should I choose which to target?
3. Are there any pointers to how I should proceed? My plan is to begin by translating just the text of menus and progress from there.
I need to get a reasonably representative proof-of-concept demo for a potential customer in a couple of weeks. I have lots of other stuff to do at the same time!
Any advice would be very welcome.
Thanks in advance.
Phil
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Phil J Pearson wrote:
2. What's the difference between Simplified and Traditional Chinese...
Does this help?
"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow
|
|
|
|
|
Yes, it does. Thanks.
First step of a 1000 mile journey...
The opinions expressed in this communication do not necessarily represent those of the author (especially if you find them impolite, discourteous or inflammatory).
|
|
|
|
|
Some translation tools may reduce cost, such as MS offices(Simplified Chinese), or Kingsoft Fast AIT.
http://blog.joycode.com/jiangsheng
http://blog.csdn.net/jiangsheng
Command what is yours
Conquer what is not
---Kane
|
|
|
|
|
I need to display a picture in a custom static control. but when the size of image is larger than the control i need a scroll bar (up-down)(left-right)..so how do i attach a scroll bar in static control and scroll the image...help please...
sanjay
|
|
|
|
|
try creating the static control with WS_VSCROLL and WS_HSCROLL styles then handle the scroll messages
C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg
|
|
|
|
|
I need a Sha Encription alogorithm. Anyone could please help me?
|
|
|
|
|
|
1) Encryption is written with Y
2) The SHA algorithm is no encryption, it is an hash algorithm.
Don't try it, just do it!
|
|
|
|
|
I have a little menu here which i want to execute my functions using it.
So i have problems in entering the process like notepad which i want to create, but then it crushes.
How can i declare the variable which will take care of the input process, because i didn't want to include it in the commandline when running. Part of my code is below
<br />
#include <windows.h><br />
#include <stdio.h><br />
#include <windef.h><br />
#include <winbase.h><br />
#include <imagehlp.h> <br />
LPVOID lpMsgBuf;<br />
<br />
int menu(void)<br />
{<br />
int choice;<br />
<br />
printf ("\n");<br />
printf ("*****************************************\n");<br />
printf ("*\t\t\t\t\t*\n*\tCHECKPOINTING SYSTEM \t\t*\n");<br />
printf ("=========================================");<br />
printf ("\n=\t 1: Create a process \t=");<br />
printf ("\n=\t 2: Shutdown the process\t=");<br />
printf ("\n=========================================\n");<br />
printf ("\n");<br />
<br />
printf("\nEnter choice (1-2): ");<br />
scanf("%d", &choice);<br />
return choice; <br />
}<br />
int main(int argc, char **argv) <br />
{<br />
PROCESS_INFORMATION pi ; <br />
STARTUPINFO si; <br />
LPDWORD lpExitCode = 0;<br />
HANDLE hProcess ; <br />
DWORD baseaddr = 0;<br />
DWORD error = GetLastError();<br />
LPCTSTR lpApplicationName="";<br />
<br />
int choice;<br />
menu();<br />
<br />
while((choice = menu())!=3)<br />
{<br />
switch (choice)<br />
{<br />
case 1: <br />
printf("Enter process you want to execute: ",lpApplicationName);<br />
scanf ("%s",lpApplicationName);<br />
printf("Process %d reporting for creation\n",GetCurrentProcessId());
GetStartupInfo(&si);<br />
CreateProcess(NULL, <br />
argv[1], <br />
NULL, <br />
NULL, <br />
FALSE, <br />
CREATE_NEW_CONSOLE, <br />
NULL, <br />
NULL, <br />
&si, <br />
&pi <br />
); <br />
hProcess = pi.hProcess;<br />
printf("New Process ID: %d ",pi.dwProcessId);<br />
printf("has started \n"); <br />
break;<br />
case 2:<br />
<br />
TerminateProcess(pi.hProcess, GetExitCodeProcess(hProcess,lpExitCode ));<br />
GetLastError();<br />
<br />
break;<br />
default: printf("\nInvalid choice: ");<br />
}
}<br />
return(0);<br />
}<br />
oam
|
|
|
|
|
Try this:
#include "stdafx.h"<br />
#include <stdio.h><br />
<br />
int menu(void)<br />
{<br />
int choice;<br />
<br />
printf ("\n");<br />
printf ("*****************************************\n");<br />
printf ("*\t\t\t\t\t*\n*\tCHECKPOINTING SYSTEM \t\t*\n");<br />
printf ("=========================================");<br />
printf ("\n=\t 1: Create a process \t=");<br />
printf ("\n=\t 2: Shutdown the process\t=");<br />
printf ("\n=========================================\n");<br />
printf ("\n");<br />
<br />
printf("\nEnter choice (1-2): ");<br />
scanf("%d", &choice);<br />
return choice; <br />
}<br />
<br />
void main(int argc, char **argv) <br />
{<br />
PROCESS_INFORMATION pi ; <br />
STARTUPINFO si; <br />
HANDLE hProcess;<br />
TCHAR lpApplicationName[100]="";<br />
<br />
int choice;<br />
<br />
while((choice = menu())!=3)<br />
{<br />
switch (choice)<br />
{<br />
case 1: <br />
printf("Enter process you want to execute: ",lpApplicationName);<br />
scanf ("%s",lpApplicationName);<br />
printf("Process %d reporting for creation\n",GetCurrentProcessId());
GetStartupInfo(&si);<br />
CreateProcess(NULL, <br />
lpApplicationName, <br />
NULL, <br />
NULL, <br />
FALSE, <br />
CREATE_NEW_CONSOLE, <br />
NULL, <br />
NULL, <br />
&si, <br />
&pi <br />
); <br />
hProcess = pi.hProcess;<br />
printf("New Process ID: %d ",pi.dwProcessId);<br />
printf("has started \n"); <br />
break;<br />
<br />
case 2:<br />
<br />
TerminateProcess(pi.hProcess, 0);<br />
break;<br />
<br />
default:<br />
printf("\nInvalid choice: ");<br />
}<br />
}<br />
}
And don't be as lazy as to believe anything you see...
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
Im sorry im using C language and now i'm having a problem with the header file
stdafx.h because i think it works in C++.
the error i'm getting shows this after adding the header file to the project.
<br />
Compiling...<br />
pro.c<br />
c:\program files\microsoft visual studio\vc98\mfc\include\afx.h(15) : fatal error C1189: #error : MFC requires C++ compilation (use a .cpp suffix)<br />
Error executing cl.exe.<br />
<br />
pro.obj - 1 error(s), 0 warning(s)<br />
oam
|
|
|
|
|
Comment the #include "stdafx.h" line.
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|
|
well now it works even after re-including the header file.
But now it does not create the notepad process and im amazed that its ID is -858993460 though it doesn't appear
oam
|
|
|
|
|
It does. Check out the source again and look for GetStartupInfo(&si) . Reinsert it into your code.
No, wait! Just replace it with:
<br />
<br />
ZeroMemory( &si, sizeof(si) );<br />
si.cb = sizeof(si);<br />
ZeroMemory( &pi, sizeof(pi) );<br />
"though nothing
will keep us together
we can beat them
for ever and ever"
rechi
|
|
|
|