|
true, but its also one of the most common licensing tools out there...
|
|
|
|
|
Well, in that case, why haven't you written an article about it?
|
|
|
|
|
...I can't even figure out why this simple attribute change is causing a memory leak!
|
|
|
|
|
hi everybody, i code in language C and i want to choose a graphics library,where i can draw a graph(a graph is an abstract representation of a set of objects where some pairs of the objects are connected by links. The interconnected objects are represented by mathematical abstractions called vertices, and the links that connect some pairs of vertices are called edges)
please help me , if someone was confronted to this .
|
|
|
|
|
Well here's one way to start
#include <GdiPlusGraphics.h>
Chris Meech
I am Canadian. [heard in a local bar]
In theory there is no difference between theory and practice. In practice there is. [Yogi Berra]
posting about Crystal Reports here is like discussing gay marriage on a catholic church’s website.[Nishant Sivakumar]
|
|
|
|
|
Hi, I have an application written in MFC.After some calculation i have to show the results in html file.how to generate a HTML through program.
|
|
|
|
|
Are you familiar with the html tags. If affirmative, you can use the tags and write them to the file alongwith the result. The html file can be opened in HTML view.
I am a HUMAN. I have that keyword in my name........
_AnsHUMAN_
|
|
|
|
|
Try one of the MFC controls, perhaps one of these[^].
I must get a clever new signature for 2011.
|
|
|
|
|
|
FILE *fp = fopen(filename, "w");
fprintf(fp, "<html>\n<body>\n");
fprintf(fp, all your data goes here);
fprintf(fp, "<\body>\n</html>");
fclose(fp);
|
|
|
|
|
GetNetworkParams failed in windows server 2003
Trioum
|
|
|
|
|
What is the return value?
I am a HUMAN. I have that keyword in my name........
_AnsHUMAN_
|
|
|
|
|
|
Your problem description is really not very detailed. Do you expect people to guess what is going on in your program?
I must get a clever new signature for 2011.
|
|
|
|
|
Per MSDN:
If the function fails, use FormatMessage() to obtain the message string for the returned error.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"Some people are making such thorough preparation for rainy days that they aren't enjoying today's sunshine." - William Feather
|
|
|
|
|
Hi,
I want to implement a functionality in which when i click F2 on any Treeview item, it should display the Tooltip for that item (This is possible generally).But in Tooltip the text should be in tabular format and also should allow me to edit the value of the item text.
Please let me know if anyone has implemented this.
I am not sure whether its feasible or not...Please if anyone has any other idea which we can implement to achieve this functionality.
Thanks,
Nikhil
|
|
|
|
|
Hi,
I want to implement a functionality in which when i click F2 on any Treeview item, it should display the Tooltip for that item (This is possible generally).But in Tooltip the text should be in tabular format and also should allow me to edit the value of the item text.
Please let me know if anyone has implemented this.
I am not sure whether its feasible or not...Please if anyone has any other idea which we can implement to achieve this functionality.
Thanks,
Nikhil
|
|
|
|
|
Nikhil Sisodia wrote: the text should be in tabular format and also should allow me to edit the value of the item text. An easy way to do this would be to pop up a dialog box that contains a CListCtrl. The CListCtrl could have editable subitems. There are several articles on Codeproject on how to do this.
|
|
|
|
|
Hi guys...
Suppose I have selected the text in a rich edit control through( Ctrl + A) or mouse click and move, after I have only clicked on either selected or non-selected area, I want to deselect this text. It' look like deselected, but when I called GetSel() it gave me the starting and end selection point.
Thanks in advance.
|
|
|
|
|
You can use m_RichEdit.SetSel(0, 0); to deselect any selected text.
|
|
|
|
|
Hey. Basically I made a program that contains 17 * 7 number of boxes using two for loops, and they seem to work pretty well, until i resize it. Every single time i resize the window, the memory goes up by quite a bit, until the program fails with too much memory. I am pretty sure i deleted everything that i called for WM_PAINT, but I am not sure what other parts i might have overlooked. Is there any common mistakes that people would make for drawing a lot of GDI objects? Do I need to post my code to see which part went wrong?
here are the codes. sorry for asking the stupid question "do i need to post my code here" =_+;;
#include <windows.h>
COLORREF color[17][7];
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance,
LPSTR lpCmdLine, int nCmdShow )
{
MSG msg ;
HWND hwnd;
WNDCLASS wc;
wc.style = CS_HREDRAW | CS_VREDRAW;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.lpszClassName = TEXT( "Window" );
wc.hInstance = hInstance ;
wc.hbrBackground = GetSysColorBrush(COLOR_INACTIVECAPTIONTEXT);
wc.lpszMenuName = NULL;
wc.lpfnWndProc = WndProc;
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
RegisterClass(&wc);
hwnd = CreateWindow( wc.lpszClassName,TEXT("BOXES"), WS_OVERLAPPEDWINDOW | WS_VISIBLE,
100, 100, 800, 800, NULL, NULL,
hInstance,
NULL);
ShowWindow(hwnd, nCmdShow);
UpdateWindow(hwnd);
while( GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
LRESULT CALLBACK WndProc( HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam )
{
int i_row, j_column;
switch (msg)
{
case WM_CREATE:
{
for(i_row=0; i_row<17; i_row++)
{
for(j_column=0; j_column<7; j_column++)
{
color[i_row][j_column]=RGB(255,255,255);
}
}
break;
}
case WM_PAINT:
{
HDC hdc;
PAINTSTRUCT ps;
HPEN hPen,holdPen;
HBRUSH hBrush_1, holdBrush;
hdc = BeginPaint(hwnd, &ps);
hPen = CreatePen(PS_NULL, 1, RGB(0, 0, 0));
holdPen = SelectObject(hdc, hPen);
for(i_row=0; i_row<17; i_row++)
{
for(j_column=0; j_column<7; j_column++)
{
hBrush_1 = CreateSolidBrush(color[i_row][j_column]);
holdBrush = SelectObject(hdc, hBrush_1);
Rectangle(hdc, 90*j_column+100, 50+30*i_row, 90*j_column+180, 30*i_row+75);
}
}
DeleteDC(hdc);
DeleteObject(hPen);
DeleteObject(holdPen);
DeleteObject(hBrush_1);
DeleteObject(holdBrush);
EndPaint(hwnd, &ps);
break;
}
break;
case WM_DESTROY:
{
PostQuitMessage(0);
return 0;
}
}
return DefWindowProc(hwnd, msg, wParam, lParam);
}
modified on Wednesday, March 9, 2011 5:01 AM
|
|
|
|
|
leorex wrote: Is there any common mistakes that people would make for drawing a lot of GDI objects?
maybe you are leaking handles/GDI objects? If the memory usage increases a lot, possibly you are creating bitmaps that never get freed up?
leorex wrote: Do I need to post my code to see which part went wrong?
that usually helps a lot, otherwise we can only guess. This is like as if you had a problem with your car so you'd call your mechanic and say "my car's engine is smoking, do i actually need to show you the car to get it fixed?".
In case you do decide to show code, only the relevant parts, please, and use <pre> </pre> tags to make it nicely formatted and readable.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<
|
|
|
|
|
leorex wrote: Do I need to post my code to see which part went wrong? Yes.
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke
[My articles]
|
|
|
|
|
What are you doing in your WM_SIZE handler?
|
|
|
|
|
I have updated the thread and posted my code there. Please point out the part where i went wrong tyvm
|
|
|
|
|