|
Hi
I am starting a new project to program an AI Agent. Before I started I wanted to look for source code for similar projects. Can anyone give me links or anything? just to have an idea
Thanks
|
|
|
|
|
|
hiii...
how can i get an ICON from a window and pass it to the
CreateWindowEx function?
regards,
kedar.
|
|
|
|
|
kedar.dave wrote:
how can i get an ICON from a window and pass it to the
CreateWindowEx function?
if you want to get the Icon from some other window and use that in your window program you can use ExtractIcon api
here is small code listing for that
HICON m_hRemoteIcon;
CString m_strFileName;
<font color=#008000>
</font>
m_hRemoteIcon=ExtractIcon(NULL,m_strFileName,0);
<font color=#008000>
m_statIcon.SetIcon(m_hRemoteIcon);
"I Think this Will Help"
<h5
alok gupta="" <br=""> visit me at http://www.thisisalok.tk
|
|
|
|
|
thanks a lot Alok...
i also have another Query...
how can i get a bitmap and an image n use it ?
if possible...can u attach a piece of code..
regards,
kedar.
|
|
|
|
|
(MFC questions)
how to use mouse to resize property sheet
thx
includeh10
|
|
|
|
|
http://www.codeproject.com/property/resizableproperties.asp[^]
Basicly in your propertysheet's OnSize handler you have to resize the tab control to match the sheet and then resize the active page to match the tab control. Then use your propertypage's OnSize handler to resize the controls on the page.
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
"Obviously ??? You're definitely a superstar!!!" mYkel - 21 Jun '04
Within you lies the power for good - Use it! Honoured as one of The Most Helpful Members of 2004
|
|
|
|
|
Is there any API to get dimensions(height and width)of an image(jpg or gif)?
Please help..
|
|
|
|
|
|
With GDI+ it could be like this:
#include <windows.h>
#include <gdiplus.h>
#include <stdio.h>
using namespace Gdiplus;
INT main()
{
GdiplusStartupInput gdiplusStartupInput;
ULONG_PTR gdiplusToken;
GdiplusStartup(&gdiplusToken, &gdiplusStartupInput, NULL);
Image* image = new Image(L"Crayons.jpg");
UINT imageHeight = image->GetHeight();
printf("The height of the image is %u.\n", imageHeight);
delete image;
GdiplusShutdown(gdiplusToken);
return 0;
}
viliam
|
|
|
|
|
Hi,
Well, I have a console based application which keeps printing to the console for every second or so. The problem that I am facing is when some user clicks on the console, the application is just hanging because of the "printf()" function. The thread resumes operation only after the user presses the right click button.
Any clues as to how I can over ride the mouse events in a console application? (this seems to be the only solution to me, any other solutions are more than welcome).
I have heard something about "GetConsoleWindow()" etc. which provides an alternative to printf()...any1 can please update me on this??
Thanks a lot folks.
Regards,
Mahadevan.
|
|
|
|
|
Hi!
I am writing an application kinda photo album in which i want to provide the page flip effect. i don't know what
should i select from the following:
DirectX
GDI
OpenGL
or something else.
currently i worked with my graphics+web designer and developed the application using Flash; but you might know that
flash is not reliable and doesn't provide better integration with VC.
I can code in VC, C# and VB/VB.NET. so i would appreciate your effort if you suggest me in this regard.
Thanks.
Muneeb-ur-Rehman Baig.
A thing of beauty is the joy forever.
|
|
|
|
|
|
GDI is most apropriate for this. Although you can use DirectX and OpenGL even if you are going to be using C#.
This posting is provided "AS IS" with no warranties, and confers no rights.
Alex Korchemniy
|
|
|
|
|
Hi!
I have source codes of my programs. One of them is dialog based application and the other is SDI Single Document Interface. I would like to combine that two sources into one. SDI program should have the dialog based program inside. What should I do?
Best regards.
|
|
|
|
|
CSdiApp
CSdiDoc
CSdiView
CSdiMainFrame
----------------
CDialogApp
CDialogDlg
---------------
now copy the clas CDialogDlg to the SDI app, you must also open
the .rc file from the dialog app and add the dialogtemplate to your SDI app
CSdiApp
CSdiDoc
CSdiView
CSdiMainFrame
CDialogDlg
now you must check the CDialogApp class, if there is some code you must
also add to your new App.
Add a menuentrie to the Mainmenu, and in the eventhandler for
this menu you can create a modal dialog of your
old app and show it to the user...
I hope this helps.
|
|
|
|
|
Hi
Thanks for help. But I got two questions:
wb wrote:
now copy the clas CDialogDlg to the SDI app, you must also open
the .rc file from the dialog app and add the dialogtemplate to your SDI app
1.I don’t know how to copy the calss CDialogDlg to the SDI app. I tried using Insert->New Class but I get that message:
CDialogDlg.cpp is not a member of the current project.
2. I don’t know how to add the dialogtemplate do my SDI app.
Any suggestions?
|
|
|
|
|
I have a MFC dialog based application that uses another dll that is MFC based generated using appwizard.
The problem is that when i try to run application the debug assertion fails in appcore.cpp in function
CWinApp::CWinApp(LPCTSTR lpszAppName) on following line :
ASSERT(AfxGetThread() == NULL);
Any help how this can be fixed and why i am encoutering the issue.
|
|
|
|
|
Can you help me to write the function which will describe the x,y 2-d coord
on the rotated sphere with v initial velocity. It can be top point of the sphere or for example number on the pool ball.
Thanks.
|
|
|
|
|
See here
Shog9
I'm not the Jack of Diamonds... I'm not the six of spades.
I don't know what you thought; I'm not your astronaut...
|
|
|
|
|
I need to parse xml files in an C++ SDI application. But to me as a beginner it seem's quite difficult how to use MSXML parser. Can anyone give me some hints?
|
|
|
|
|
Can't help with MSXML but I think you'll find articles here on CP if you do a search. Another option is to use pugXml, also here on CP which you may find easier.
Neville Franks, Author of ED for Windows www.getsoft.com and Surfulater www.surfulater.com "Save what you Surf"
|
|
|
|
|
Hi,
I'm having a problem or let's say that I don't know how to insert an image in a clasic CTreeCtrl. I found some samples but it doesen't work.
Plaese help!!
|
|
|
|
|
You can do it like this,
of course you can Add some extra images into a imagelist
I hope this frgment will be clear
CImageList m_imageList;
CTreeCtrl m_myTree;
......
m_imageList.Create( ........ );
m_myTree.SetImageList(&m_imageList, TVSIL_NORMAL);
m_myTree.SetItemImage( .., 0, 1);
viliam
|
|
|
|
|
Hi,
how can I programmaticly create and delete a folder???
|
|
|
|