|
I use these (where splitterwidth is the size of the splitter I want and borderwidth is the size
of the 3-D border around the views:
m_cxSplitter = m_cySplitter = splitterwidth + borderwidth * 2;
m_cxBorderShare = m_cyBorderShare = 0
m_cxSplitterGap = m_cySplitterGap = splitterwidth + borderwidth * 2;
m_cxBorder = m_cyBorder = borderwidth;
I also added customizable colors to all individual borders and the splitter which required a
CSplitterWnd::OnDrawSplitter() override.
I almost wrote an article for it (it all started in response to a CP question) but I noticed
hundreds of articles were already there LOL.
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
sir,
I am working on vc++ project and it is based on document view architecture and I am trying to embed an active-x component into my project.
why it takes more time, when i try to create a component on the display document for the first time. The same component when i try to create subsequent time it takes less time. could you please throw some light on it.
Thanks & Regards,
Praveen A.
praveena@navayuga.co.in
pv_pravin@yahoo.co.in
|
|
|
|
|
To hide a dos windwow,
I placed the following line in the top of progam under all include files and the dos window will not be appeared when run the program.
#pragma comment(linker, "/subsystem:\"windows\" /entry:\"mainCRTStartup\"")
But,
I take the exe and add it to the setup file(build in .net) the dos window will appear.what a pbm.how to hide the dos window.
|
|
|
|
|
I can help u regarding this. But make u'r doubt more specific.
Come online at:-
jubinc@skype
|
|
|
|
|
Hello ,
Can anyone help with the declaration of arrays on the .NET 2.0 platform ? I get an error "subscript requires array or pointer type . Codes listed below
public: System::Void convertStringToBinary(String ^myString)
{
binaryVal = "";
__wchar_t characterArray gcnew[];
characterArray = new __wchar_t gcnew[myString->Length];
myString->CopyTo(0, characterArray, 0, myString->Length);
for(unsigned long int i=0; i<characterarray->Length; i++)
{
binaryVal = String::Concat(binaryVal, characterArray[i]>=128 ? "1":"0");
characterArray[i] %= 128;
D
|
|
|
|
|
|
Maybe something like:
array<__wchar_t> ^characterArray = gcnew array<__wchar_t>(myString->Length);
And yes, this should be posted on the C++/CLI board
Mark
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Thanks it worked
|
|
|
|
|
I need to create a quick/easy RSS Reader. Can anyone help me with the code/ or where to get it?
|
|
|
|
|
Here[^] is an example of course its C++/CLI
|
|
|
|
|
Hi,
I am using LogOnUser() API to check whether My application has similliar logon username and password same as my windows username and password. If i give a wrong user name and password it takes almost 15 secs to return. Is there a way i could make it faster?
BOOL bRes = LogonUser( m_strUser,
NULL /*domain*/,
m_strPassword,
LOGON32_LOGON_NETWORK /*dwLogonType*/,
LOGON32_PROVIDER_DEFAULT /*dwLogonProvider*/,
&hUserHandle);
It is because of passing NULL for the domain name, there are around 10 domains and that is the reason it takes so much of time i guess. Is there a way to get the current doamin pls suggest how to go about?
-- modified at 16:31 Monday 23rd April, 2007
|
|
|
|
|
AnilUnni wrote: Is there a way to get the current doamin
Use NetWkstaUserGetInfo(NULL, 1, ...) .
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi all.
I wont add to my project .dll file.
can help?
|
|
|
|
|
You wont or want?
Add what to the .dll file?
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Ok, so what's the problem? Do you want to load it explicitly or implicitly?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
You can if you want
Did you get any message if you want to use it you must use of LoadLibrary for load it and then use of GetProcAddress for returns the address of funtion on the dll and in the end use of FreeLibrary if its not your question Can you more explain,please
|
|
|
|
|
But, I dont know how to do this.
|
|
|
|
|
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Im wondering,he answered to my reply and you answered to his reply I think it was reply to your answer.
|
|
|
|
|
I thought (s)he replied to DavidCrow!
*edit* And, I didn't answer....I'm still not up to speed on what the question is :)
"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder
|
|
|
|
|
Maybe or maybe not.
|
|
|
|
|
Mark Salsbery wrote: I thought (s)he replied to DavidCrow!
Me too, since I got an e-mail reply. CP is having a Mon-day.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"To have a respect for ourselves guides our morals; to have deference for others governs our manners." - Laurence Sterne
|
|
|
|
|
Hi,
I have an application which uses a static library and a load time DLL for which the .lib is required to be added in the project settings.
when the application, both .lib file in VC6 works fine
when the application in VC8, static lib in VC8, dll's .lib file in VC6 works fine.
when the application in VC8, static lib in VC8, dll's .lib file in VC8,the application crashes.
Dr.watson is enabled and the Crash dialog shows module name as unknown, version no. 0.0.0.0.
The dump.log file also doesn't specify which module the crash is happening. FAULT --> shows to a section which doesn't specify the module name.
The dll is having a version number. but the crash doesn't show the dll.
Can anybody throw some light where could be the problem.
Thanks,
|
|
|
|
|
Why do people use Dr. Watson to debug their application ?
You should use the debugger from Visual Studio to do such things, it this much more powerfull and it will give you much more information.
If the crash doesn't occur in your own source code, use the call stack to trace it back to the root problem.
|
|
|
|
|
Hi all
Fistly , I know this is a Visual C++ forum , but i really need help on my problem in C. So kindly bear with me !!
Here is the code I wrote to get the .bmp greyscale Image Header info in C
<br />
#include <stdio.h> <br />
#include <stdlib.h><br />
#include <math.h><br />
int main()<br />
{<br />
struct Image{<br />
int rows;<br />
int column;<br />
unsigned char *data;<br />
} sImage;<br />
FILE *fpr; <br />
FILE *fpw;<br />
int i,j;<br />
char imagein[20];<br />
char imageout[20];<br />
unsigned char *ptrC;<br />
unsigned char dummy;<br />
long filesize;<br />
int r, c;<br />
dummy = '0';<br />
ptrC = &dummy;<br />
<br />
printf("Enter input image : ");<br />
gets(imagein);<br />
printf("Enter output image : ");<br />
gets(imageout);<br />
<br />
<br />
if ((fpr = fopen(imagein, "rb"))==NULL){<br />
printf("Cannot open source file \n");<br />
exit(1);<br />
}<br />
if ((fpw = fopen(imageout, "w"))== NULL){<br />
printf("Cannot open target file.");<br />
fclose(fpr);<br />
exit(1);<br />
}<br />
<br />
fseek(fpr, 0, SEEK_SET);<br />
sImage.rows = getImageInfo(fpr, 22, 4);<br />
printf("Number of rows : %d",&sImage.rows);<br />
sImage.column = getImageInfo(fpr, 18, 4);<br />
printf("Number of columns : %d",&sImage.column);<br />
filesize = getImageinfo(fpr, 2, 4);<br />
printf("Filesize : %ld",&filesize);<br />
fseek(fpw, 0, SEEK_SET);<br />
r = sImage.rows;<br />
c = sImage.column;<br />
for (i=0; i<r; i++){<br />
for(j=0; j<c; j++){<br />
fread (ptrC, sizeof(char), 1, fpr);<br />
fwrite(ptrC, sizeof(char), 1, fpw);<br />
}<br />
}<br />
fclose(fpr);<br />
fclose(fpw);<br />
getch();<br />
return 0;<br />
}<br />
<br />
long getImageInfo(FILE* inputfile, long offset, int numberofchars)<br />
{<br />
unsigned char *ptrC;<br />
long value = 0L;<br />
unsigned char dummy;<br />
int i;<br />
<br />
dummy = '0';<br />
ptrC = &dummy;<br />
<br />
fseek(inputFile, offset, SEEK_SET);<br />
<br />
for(i=1; i<=numberOfChars; i++)<br />
{<br />
fread(ptrC, sizeof(char), 1, inputFile);<br />
<br />
value = (long)(value + (*ptrC)*(pow(256, (i-1))));<br />
}<br />
return(value);<br />
}<br />
<br />
And the error I get is :-
"Conflicting type of 'getImageInfo'. "
Could anyone please tell me , where i m possibly going wrong ....
Thanks a lot !!
|
|
|
|