|
I think COM will be the way to go as far as designing is concerned. I think that when you are actually designing the form, that "un-named language" IDE is actually running the form in some way.
Create an MDI project, then the rest will be COM work; like resizable controls at runtime etc. Even the form itself will be resizable.
If I had to do it, I would start writing the controls; starting with the form, then the other controls.
And in which form do you want to save it? That "un-named language" IDE saves forms as binary files. So you will need to do some research on its format.
this is this.
|
|
|
|
|
Can a ANSI-C compliant compiler compile successfully a code containing functions embedded in structure?
hitherto shall thou come but not further thee
|
|
|
|
|
I think C does not support functions in structs. But in C++, structs and classes are very similar, and both can contain functions.
So for a .C file, functions within struct will not compile.
this is this.
|
|
|
|
|
I'm having a table in oracle 9i DB. One of the column(VARCHAR) in this table is stored with unicode string (chinese/japanese characters) .
Problem is if I take a backup of this table using the adodb.recordset.save("file") to file and lattter when adodb.recordset.open("saved file") the chinese character is lost in between any idea why this is hapenning ?
|
|
|
|
|
Hi All
1.I using MFC in my application , and i need to type on screen the preformance of the CPU in runtime.
How can i know the preformance ? what API can i use ?
2.I need to show some FORM (window) that i have in my app. on top, how can i do it ?
Thanks for any halp.
|
|
|
|
|
1-
GetPerformaceInfo(...)[^]
This function get you the needed info, but the requirements are high:
Client: Windows XP
Server Windows 2003
You can also use:
GetProcessTimes(...)[^]
You could enumerate all the processes using EnumProcesses() api, and use GetProcessTimes(...) with it.
2-
You could use:
MFC: SetWindowPos(&wndTopMost,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
Win32: SetWindowPos(hWnd,HWND_TOPMOST,0,0,0,0,SWP_NOSIZE | SWP_NOMOVE);
this is this.
|
|
|
|
|
|
Hi
Does anyone know how UNDO operation is handled in explorer. Suppose if a file move is perfomred and undo is done. The file is restored to the original location.
Thanks in advance.
|
|
|
|
|
Hello,
I'm working on a project and am making a c++ application thru windows programming. My program creates a window just fine and can display text through the code below...
HDC hdc;
PAINTSTRUCT ps;
HFONT hFont;
hdc = BeginPaint (hWnd, &ps);
hFont = (HFONT) GetStockObject ( SYSTEM_FONT );
SelectObject (hdc, hFont);
SetTextColor (hdc, RGB(0,0,180));
SetBkColor (hdc, RGB(190,180,200));
SetTextAlign (hdc, TA_LEFT);
char *string1;
string1 = new char[20];
lstrcpy (string1, " ");
TextOut (hdc, 10, 10, string1, lstrlen(string1));
EndPaint (hWnd, &ps);
However, I need a way of removing the text that was displayed. This would happen after a button click or something else along those lines. Also, does anyone know an easier way to display text, I think I am jumping through extra hoops when I use the code above. And finally, does anyone know how to make a windowed application run in the background?
Thanks, Roy K.
|
|
|
|
|
To remove the text I think you can repaint the window, without drawing the text, like send a WM_PAINT message :
::SendMessage(hWnd,WM_PAINT,0,0);
To display text, you are allocating memory every time. You could create a fixed size character array like:
char str[200];//make it large enough for the string.
And if you have to make it dynamic, then you must delete it also:
str = new char[20];
delete[] str;
I don't really understand what you mean by running in the background. You can minimize the application, you can even hide the main window (then you should have a way to restore it, like a notification area icon etc).
Minimize: ::ShowWindow(m_hWnd,SW_MINIMIZE);
Hide: ::ShowWindow(m_hWnd,SW_HIDE);
this is this.
|
|
|
|
|
It may be a C++ application, but this is almost C compatible code. The only thing that keeps it from being C code it the declaration "char *string1;", after making function calls.
You'll still need to write code like that, but you can simplify by placing the code for drawing the text in a seperate function.
MyTextOut(HDC hdc, int x, int y, char* pStr)
You do not need to allocate any memory for the string in the given code, since you already know what the string contains.
const char *string1 = "";
You would not need to do the above accept that it is easier to use lstrlen than to do some thing like this:
TextOut (hdc, 10, 10, "", lstrlen(""));
or this
TextOut (hdc, 10, 10, "123", 3);
You should restore the previous font to the DC out of habit:
HGDIOBJ hOldFont = SelectObject(hdc, (HFONT)GetStockObject(SYSTEM_FONT));<br />
......<br />
SelectObject(hdc,hOldFont);<br />
EndPaint(hWnd, &ps);
Whoops, I got carried away!
Ways of erasing the text:
1) Invalidate the window and do not draw it again.
2) Call GetTextExtentPoint32 and calculate the window rectangle where you displayed the text. Save the rectangle some where. Then just invalidate that rectangle when you want to earase it and do not draw it again. This method is faster, because you do not need to redraw the entire window (which is slow).
Note: Calling GetTextExtentPoint32 is equivalent to calling MFCs CDC::GetTextExtent method.
There are other ways, just let your imagination run free.
INTP
Every thing is relative...
|
|
|
|
|
I used three webbrowser ctrls in my application. but it used nearly 70MB memory and it seemed that it would never reduced. Is there any way to reduce the memory usage? I found that many tabbed browsers won't use so much memory enven more than ten window were opened. but there were only three in my application.
Thank you very much and happy new year.
|
|
|
|
|
//kenar means edge
#ifndef KENAR_H
#define KENAR_H
enum {COLLINEAR, PARALLEL, SKEW, SKEW_CROSS, SKEW_NO_CROSS };
#include "Nokta.h"
#include "float.h"
class Edge{
public:
Point org;
Point dest;
Edge(Point &_org, Point &_dest);
.
.
.
error C2146: syntax error : missing ';' before identifier 'org'
error C2501: 'Point' : missing storage-class or type specifiers
error C2501: 'org' : missing storage-class or type specifiers
error C2146: syntax error : missing ';' before identifier 'dest'
error C2501: 'Point' : missing storage-class or type specifiers
error C2501: 'dest' : missing storage-class or type specifiers
|
|
|
|
|
|
|
wann't it because of the Case typo, "Point" for "POINT"
Vipin - MVP
|
|
|
|
|
wasn't it because of the Case typo, "Point" for "POINT"
Vipin - MVP
|
|
|
|
|
You are missing a semi-colon, and based on the code you posted I would say probably in the file 'float.h'.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" - mYkel - 21 Jun '04
"There's not enough blatant self-congratulatory backslapping in the world today..." - HumblePie - 21 Jun '05
Within you lies the power for good - Use it!
|
|
|
|
|
In my work space there are two projects, one is dll another is application which calls dll. they are in different folder. in VC IDE, is there a way to add the dll path to the PATH variable, or let IDE search the dll path when application runs?
Thank you.
|
|
|
|
|
Tools->Options->Directories->Exectuable paths
|
|
|
|
|
Change the Output Directory in the project settings. You should change it such that the executeable and the dll binary gets placed in the same directory. It is controlled via the /OUT:filename linker setting.
Vipin - MVP
|
|
|
|
|
I would like to know that Can win32 dlls supports CMenu class to load a context menu dyanmically or popup menu dynamically ? ..
if yes, how it is possible or anyother way to do that ?
Subash.k
Software Engineer
|
|
|
|
|
In win32, you have to do like this to create menus dynamically using the below:-
CreatePopupMenu();
AppendMenu(...);
TrackPopupMenu(...)
Not sure if you want the same thing.
Vipin - MVP
|
|
|
|
|
Yes Vipin, this is correct but it works in MFC32 dll , i believe not in win32 dll.
Is it correct ? Do u have any other way ?
|
|
|
|
|
It works everywhere. After all MFC is a layer on top of win32.
|
|
|
|
|