|
No including winsock2 before mswsock did not help...
Eugene
|
|
|
|
|
Hi
I created a Dialog box class within a MFC share Regular DLL. I use the Resource Wizard to create the Dialog and Class Wizard to define the derived class. I'm exporting the class with the _declspec(dllexport) storage class type specifier.
When I try to create an object of that derived Dialog box class in the client application... the object pointer is NULL. I get no errors. The DLL is loaded at load-time, the DLL Library is included in the linker. Do you know what step(s) I might be leaving out ??
One person suggested adding the AFX_MANAGE_STATE macro... but, none of the CDialog base functions are being re-defined. So, I'm exporting the Dialog Box functions indirectly... adding the AFX_MANAGE_STATE macro at the begain of the exported functions is not feasible. Besides, I create a Regular MFC DLL function that used a device context pointer and CBrush class... and I did not include the AFX_MANAGE_STATE macro.
Thx,
King
|
|
|
|
|
try this
hRes= LoadLibrary("dllwheredlgis.dll");
if(hRes)
AfxSetResourceHandle(hRes);
|
|
|
|
|
Hi
I try adding that code to the client app and hRes is a NULL HINSTANCE pointer.
also, I'm not sure where the problem lies, in the DLL or the Client ??
|
|
|
|
|
Hi!
Somebody that have programmed an UDP-protocol in C or C++? I need to do so but I am not sure how to. I have been reading a lot about how UDP works and how it looks like, but still to make C-code is little bit complicate..
Anyone that can help me? Is there any open-source that I can look at? I can´t use win-sockets because I use a laborationsboard that don´t have any common OS. So I need to write it in C?
|
|
|
|
|
see at:
http://enet.cubik.org/Features.html
|
|
|
|
|
I need to do some sorting in a C-Scripting environment.
I have an array of string; e.g. "Fread2", "RobertThree", so just need a routine that will determine if string1 > string2.
I know I could write my own, but I bet it would be slow and I am sure that it has been done many times before.
Sweep.
PS The scripting environment has no Sort routines!
|
|
|
|
|
What about strcmp?
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
Thanks, could not see the wood for the trees!
|
|
|
|
|
I am using a windows service program to open a CFileDialog. The file dialog box can be displayed and working.
However, when the choosing the Desktop folder, it goes to the "C:\Documents and Settings\All Users\Desktop" instead of the Desktop folder of the logged on user. When choosing the My Documents folder, it goes to the "C:\Documents and Settings\Default User\My Documents" folder instead of the logged on user's My Documents folder.
When clicking the New Folder icon, the newly created folder does not displayed unless F5 is pressed. When renaming/deleting folder, the displays update only after press F5.
When i use the same code to call CFileDialog in a non-service application, it works perfectly.
Can anyone help me to solve the problem?
Thx!!
|
|
|
|
|
douglas_kei wrote:
I am using a windows service program to open a CFileDialog.
See my response here.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Most of services are running udner SYSYTEM account, but not under logged user account. This account has no "user folder", so it drops you to default user folder.
|
|
|
|
|
Yes, i know about this. But the question is, how can I set the service process environment so that CFileDialog works as if it is called by logged on user. Thx!
|
|
|
|
|
Does anybody know how to write a DDEML server application for
excel in VC++. I had used the code given by microsoft and modified it to how i needed it.
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q238/1/33.ASP&NoWebContent=1#appliesto
but for some reason the XlTable format is not working fast enough than i thought in Excel. any help is appreciated
|
|
|
|
|
Hi,
is there some trick to add a string at the top of the dropdown and not at the bottom? If so, how?
Thanks!
|
|
|
|
|
comboboxcontrolvariable.InsertString(index, string);
or something like that.
good luck.
"If I don't see you in this world, I'll see you in the next one... and don't be late." ~ Jimi Hendrix
|
|
|
|
|
No trick, just use InsertString() .
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
Yeah I know... that was pretty dumb from my part
Thanks guys!
|
|
|
|
|
Hi!
I can't derive my CBaseRenderer class from CD3DBase, here's my code:
#pragma once
class CD3DBase;
class CBaseRenderer : public CD3DBase
{
public:
CBaseRenderer(void);
~CBaseRenderer(void);
public:
void OnLostDevice();
void OnResetDevice();
void OnFrameMove();
void OnRender();
void OnInitVolatileResources();
void OnFreeVolatileResources();
};
and these are the errors:
------ Build started: Project: DXProject, Configuration: Release Win32 ------<br />
<br />
Compiling...<br />
CBaseRenderer.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined<br />
DXProject.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined<br />
CD3DBase.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined<br />
CApplication.cpp<br />
e:\C++\DXProject\CBaseRenderer.h(7) : error C2504: 'CD3DBase' : base class undefined
What's wrong with this code?
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You must include the header for the definition of CD3DBase. If you are deriving from a class then it is not enough just to have a forward reference, you need the full class available.
|
|
|
|
|
Ok thanks, but if I include the header, I get even more errors, since CBaseRenderer and CD3DBase include each other, because CD3DBase needs to create an object of CBaseRenderer
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You could put a forward declaration of CBaseRenderer into CD3DBase.h
|
|
|
|
|
Ok, next errors
#pragma once
class CBaseRenderer;
class CD3DBase
{
private:
CBaseRenderer gRenderer;
};
And here the errors:
e:\C++\DXProject\CD3DBase.h(46) : error C2079: 'CD3DBase::gRenderer' uses undefined class 'CBaseRenderer
modified 12-Sep-18 21:01pm.
|
|
|
|
|
You're missing #include "BaseRenderer.h" or you can make gRenderer a pointer.
"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen
|
|
|
|
|
tried both. this eliminated all errors, except that now I get this one again:
e:\C++\DXProject\CBaseRenderer.h(5) : error C2504: 'CD3DBase' : base class undefined
#pragma once
#include "CD3DBase.h"
class CBaseRenderer : public CD3DBase
{ ...
but well...since I only need a pointer to an IDirect3DDevice9 from CD3DBase, I might also create a function to pass this one as a parameter and make CBaseRender not to inherit from CD3DBase.
modified 12-Sep-18 21:01pm.
|
|
|
|