|
MFC.
I do a skinning for a winapp written in mfc.
I have to change totally the bkcolor
apearence for all ui in a custom color.
I superclassed all controls and works fine except:
Tab controls 3d borders shadwows,
Toolbar separators,
Static frames and 3D edit controls shadows which are still
system color.
ANy Ideea.
P.S
Just Dont tell me I have to handle them on WM_PAINT
and redraw on top another rect.
|
|
|
|
|
Handle WM_NCPAINT
Sonork 100.11743 Chicken Little
"You're obviously a superstar." - Christian Graus about me - 12 Feb '03
Within you lies the power for good - Use it!
|
|
|
|
|
Hello,
I downloaded JBSocketServer1.zip and tried to compile it, however I got the following errors coming from mswsock.h and winsock2.h
Would you know why?
Thanks in advance.
Eugene
C:\MSDev\VC98\INCLUDE\mswsock.h(69) : error C2065: 'SOCKET' : undeclared identifier
C:\MSDev\VC98\INCLUDE\mswsock.h(69) : error C2146: syntax error : missing ')' before identifier 's'
C:\MSDev\VC98\INCLUDE\mswsock.h(69) : warning C4229: anachronism used : modifiers on data are ignored
C:\MSDev\VC98\INCLUDE\mswsock.h(73) : error C2059: syntax error : ')'
C:\MSDev\VC98\INCLUDE\mswsock.h(89) : error C2146: syntax error : missing ')' before identifier 'hSocket'
C:\MSDev\VC98\INCLUDE\mswsock.h(89) : warning C4229: anachronism used : modifiers on data are ignored
C:\MSDev\VC98\INCLUDE\mswsock.h(96) : error C2059: syntax error : ')'
C:\MSDev\VC98\INCLUDE\mswsock.h(101) : error C2146: syntax error : missing ')' before identifier 'sListenSocket'
C:\MSDev\VC98\INCLUDE\mswsock.h(101) : warning C4229: anachronism used : modifiers on data are ignored
C:\MSDev\VC98\INCLUDE\mswsock.h(109) : error C2059: syntax error : ')'
C:\MSDev\VC98\INCLUDE\mswsock.h(131) : error C2146: syntax error : missing ')' before identifier 'hSocket'
C:\MSDev\VC98\INCLUDE\mswsock.h(131) : error C2165: 'left-side modifier' : cannot modify pointers to data
C:\MSDev\VC98\INCLUDE\mswsock.h(131) : error C2071: 'LPFN_TRANSMITFILE' : illegal storage class
C:\MSDev\VC98\INCLUDE\mswsock.h(138) : error C2059: syntax error : ')'
C:\MSDev\VC98\INCLUDE\mswsock.h(146) : error C2146: syntax error : missing ')' before identifier 'sListenSocket'
C:\MSDev\VC98\INCLUDE\mswsock.h(146) : error C2165: 'left-side modifier' : cannot modify pointers to data
C:\MSDev\VC98\INCLUDE\mswsock.h(146) : error C2071: 'LPFN_ACCEPTEX' : illegal storage class
C:\MSDev\VC98\INCLUDE\mswsock.h(154) : error C2059: syntax error : ')'
C:\MSDev\VC98\INCLUDE\winsock2.h(95) : error C2378: 'SOCKET' : redefinition; symbol cannot be overloaded with a typedef
C:\MSDev\VC98\INCLUDE\winsock2.h(112) : error C2146: syntax error : missing ';' before identifier 'fd_array'
C:\MSDev\VC98\INCLUDE\winsock2.h(112) : error C2501: 'SOCKET' : missing storage-class or type specifiers
C:\MSDev\VC98\INCLUDE\winsock2.h(112) : error C2501: 'fd_array' : missing storage-class or type specifiers
C:\MSDev\VC98\INCLUDE\winsock2.h(115) : error C2059: syntax error : ')'
|
|
|
|
|
Try including winsock2 before mswsock
Papa
while (TRUE)
Papa.WillLove ( Bebe ) ;
|
|
|
|
|
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.
|
|
|
|