|
I'm writing a GUI editor which can also create buttons on the fly, and I'm trying to change the buttons' text (foreground) color. I'm having trouble adding the BS_OWNERDRAW style - I keep getting a "Debug Assertion Failed" message. Even if I 'Ignore' this message, I still don't get the WM_DRAWITEM message. How do I fix this?
Help will be greatly appreciated.
|
|
|
|
|
Does anyboby know how to add context menu to the CRichEditView? I tried to override CRichEditView::GetContextMenu(), but that did not help.
Any ideas?
Thanks in advance.
Nikolay.
|
|
|
|
|
try this
HMENU CCmView::GetContextMenu(WORD, LPOLEOBJECT, CHARRANGE* )
{
menu.DestroyMenu();
menu.LoadMenu(IDR_MENU_POPUP);
HMENU hMenu=menu.GetSubMenu(0)->GetSafeHmenu();
return hMenu;
}
design your menu as you would any other popup menu - if you are always using the same menu then you could load the menu at the view creation and delete it when the view is destroyed
Holy Handgrenade of Antioch instructions
|
|
|
|
|
How do you create a ToolBar in a Dialog Box Window????
Help me...
I tried to do this: it doesn't work..
object.Create (WS_CHILD | WS_VISIBLE,CRect(200,100,250,250),this,IDR_TOOLBAR1);
where the object is devied from a CToolBar class.
Help....
|
|
|
|
|
I took a quick look (very quick ) here at CP, but didn't see any relevant articles. Check out the CodeGuru dialogs section - there's a "toolbars and status bars" subsection with a few articles on this topic.
--Mike--
http://home.inreach.com/mdunn/
"Didn't I tell you? I've got a brain the size of a planet."
--Marvin the paranoid android
|
|
|
|
|
You can't do it - toolbars are not supported in dialogs, and need to be simulated.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
How do you create a ToolBar in a Dialog Box Window????
Help me...
|
|
|
|
|
UT is C++ based, but all the files are compiles as utx files and the like. I Have 3D Max 3 and there is a plug in for it that allows users to export Models INTO UT. I would like to IMPORT UT Models into 3D Max. I have the plug in, but I am not a programmer at all. If you can help please reply.
|
|
|
|
|
You might try Chumbalum Soft's modeler MilkShape3D. The link to their site is:
http://www.swissquake.ch/chumbalum-soft/
I believe you can import UT models into MilkShape and then perhaps you can save it out in a format that Max can read. Writing a MAX import plugin for UT models is probably not going to be easy.
-andrew
awelch@swbell.net
|
|
|
|
|
Yep, You're right about MilkShape. It does open UT 3D model files. The problem is that UT "zips" the files using an extension that I can't get winzip to unzip. I guess UT used to not do this, but since people wanted to be cheaters they started to. It is all C++ and the Source code is available online, I just need a way to open the files. I am teaching myself the 3D programs and creating stuff in the game formats to learn them.
Sad to say it, but all my programming experience to date was in Gary Kitchen's Game Maker for the C-64 so I am lost.
I can get all the C++ source code, the Compiling program that turns stuff into UT's "special zip files" and whatever else might be needed, but that is where my knowledge ends.
|
|
|
|
|
Like UT, SiN uses a custom file format which I would like to Open. SiN is based on the Quake 2 engine. but they renamed their pak files and stuff differently. I want to see model animations to see how they created them, but I can't seem to open them. There is a plug in for 3D Max that allows users to export Max files to .sam files which SiN uses, but I would like to do the opposite and OPEN .sam files into 3D Max. If you can help, please reply back, I am an Amature artist, NOT a programmer
|
|
|
|
|
Hi,
I made a program which works on windows.
I put some data files on the web which are for the program.
In IE/Netscape, when I click my file link (on the web), a messagebox will popup and ask me to "open..." or "Save...".
How can I launch my program when I click on my file link automaticly? (without Open/Save box)
anywhere (webpage? newsgoup?) I can find a help?
thanks a lot,
larry
|
|
|
|
|
I would like to run a local .js WSH file from within a MFC project. The .js file for instance uses a WScript.Quit(1) and WScript.Quit(2) command and I would like to tackle that.
Could anyone give me a hint on how to do this?
|
|
|
|
|
You'd need to run wscript.exe (the program that reads the .js file and executes it) with CreateProcess(), and wait on the process handle. The parameter to WScript.Quit() is the exit value of the process, which you get with GetExitCodeProcess().
Check out the article "An Introduction to Processes: Asynchronous Process Notification" for help with using those APIs.
--Mike--
http://home.inreach.com/mdunn/
"Didn't I tell you? I've got a brain the size of a planet."
--Marvin the paranoid android
|
|
|
|
|
Of course ... thx Michael
|
|
|
|
|
I have an MDI application. I have created an accelerator associated with the VK_DELETE key.
I would like to disable the translation of this accelerator in some views but not in others. How can i do it?
Thanks in advance,
Jose.
|
|
|
|
|
The only way I've done that is to put code at the start of the function the accelerator calls that simply returns if it is not wanted. You can probably create multiple accelerator lists and load the one you want at startup, but I've not done it myself so cannot offer any further advice on that method.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
While we interact with database using DAO technology i faced the following error.
I created database in Ms Access 2000
But in VC++ i couldn't open it by creating an object to CDaoDatabase class.
A error comes Stating that, Unrecognized data format
And How to get rid of this difficult.
|
|
|
|
|
While we interact with database using DAO technology i faced the following error.
I created database in Ms Access 2000
But in VC++ i couldn't open it by creating an object to CDaoDatabase class.
A error comes that Stating that, Un recognizing data format
And How to get rid of this difficult.
|
|
|
|
|
While we interact with database using DAO technology i faced the following error.
I created database in Ms Access 2000
But in VC++ i couldn't open it by creating an object to CDaoDatabase class.
A error comes that Stating that, Un recognizing data format
And How to get rid of this difficult.
|
|
|
|
|
Most likely the DAO classes you are working with are for an older version of the database. You can try searching to see if any neewer versions are available. Alternatively, you may also be able to have Access 2000 save your database in an older format, so that it can be opened by the DAO classes you are trying to use.
Chris
|
|
|
|
|
I have a dockwindow that I have setup in the MainFrame.h/cpp files
the one line in the MainFrame.cpp:
m_wndSTCBar.AddView("Database", RUNTIME_CLASS(CClassView));
(This creates a Tree structure in the DockWindow)
this goes to a CClassView.h/cpp File which reference a database, but at this point the database is not fully loaded and cause an error.
I want to call this line from the View.cpp file
But I don't know how, or if there is a better way to do this??
Thanks in advance.
|
|
|
|
|
Make sure mainfrm.h is included in your view and then
CMainFrame* pMain = (CMainFrame*)AfxGetMainWnd();
will give you a pointer you can use to call whatever you like, assuming it is public, or you've declared your view to be a friend of the class.
Christian
The content of this post is not necessarily the opinion of my yadda yadda yadda.
To understand recursion, we must first understand recursion.
|
|
|
|
|
Hi !
I need the GetRandomRgn API which is documented in MSDN library, but when I use this function, the compiler throws me an error because it doesn't know it.
So I searched the definition of this function in wingdi.h but I didn't find it !
What could I do ?
Thanks for any help...
Emmanuel Derriey.
|
|
|
|
|
Looks like someone at MS goofed. Just add your own prototype for it:
extern "C" int WINAPI GetRandomRgn(HDC, HRGN, INT);
--Mike--
http://home.inreach.com/mdunn/
"Didn't I tell you? I've got a brain the size of a planet."
--Marvin the paranoid android
|
|
|
|