Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 15 Jul 2008
Offline Last Active Jan 26 2015 10:54 AM

Topics I've Started

Creating a window in C++ with MFC

20 March 2013 - 10:40 AM

Hi all,


I am developing a tool for my game project, and I want to have the "find" feature. When Ctrl + F is pushed I want to create a new window.

(I don't want to have a dialog, I would like to implement the find feature with a window and a embedded dialog inside, VS 2008 style)


The window is a member variable in my class, m_FindWindow and this is my OnCreate method


Whatever::OnCreate(LPCREATESTRUCT lpCreateStruct)





if(m_FindWindow->GetSafeHwnd() == NULL)
if (!m_FindWindow->CreateEx(WS_EX_STATICEDGE, _T("STATIC"), _T("Find"),
CRect(CPoint(0, 0),CSize(1600, 600)), this, 123444))
return -1;
if (!m_FindWindow->SetWindowPos(&wndTop, 0, 0, 1600, 600, SWP_DRAWFRAME | SWP_SHOWWINDOW))
return -1;
And this is the code that is called every time I push Ctrl + F
void Whatever::OnFindCommand(void)
m_FindWindow->SetWindowPos(&wndTop, 0, 0, 1600, 600, SWP_DRAWFRAME | SWP_SHOWWINDOW);
I don't know what is wrong but nothing appears on the screen...
Could you help me guys?

Using classes from different projects

31 January 2013 - 06:32 AM



I am working in a huge application using Visual Studio 2008 (more than a thousand classes)


I have one solution with several projects, now I want to create a new project under the same solution, it's a simple cmd application that uses one class (classX) from another project (projectX)in the same solution.


Note ProjectX is a dll


First, I have created a new cmd application using the wizard

Then I have added some additional include directories in the project properties

I have written some code in the main function, that uses the others project class (classX)

I have compiled the code and I get some LNK2019 unresolved external symbol (these symbols are in classX)


What I have to do now? How I include the dll to my new project?

MFC + DirectX Render Problem

15 July 2008 - 03:26 AM

Hi everybody, I'm programming a development tool that uses the Microsoft Foundation Classes (MFC) and DirectX 9.0. It has a render view. At first I used a LPD3DXMESH teapot to test I could paint a 3d scene right. Later I changed to my own proprietary format and then the view doesn't update itself properly.( At the begining of the app shows my mesh, but when I minimize and maximize keeps the others window aspect) I changed the Directx to debug mode and a break is thrown in this code of the cmdtarg.cpp file: case AfxSigCmd_v: // normal command or control notification ASSERT(CN_COMMAND == 0); // CN_COMMAND same as BN_CLICKED ASSERT(pExtra == NULL); (pTarget->*mmf.pfnCmd_v_v)(); break; I tested my mesh format in other project and works right. I don't know what to do. Someone can help me? (sorry if my english is a bit bad)