|
I always say the same:
I love using this forum and I love you guys!! You are my salvation!! I´m about to finish my proyect and I have no time left!
I really thank you a lot, Steve.
|
|
|
|
|
In addition to what Stephen said, check whether the message is for edit control
if(pMsg->wParam == VK_RETURN && pMsg->message == WM_KEYDOWN && pMsg->hwnd == m_Edit.m_hWnd )
nave
|
|
|
|
|
That´s perfect. Thank you two!
|
|
|
|
|
hi
Any one tell me, how to compress the text data and decompress the same.
i send the text data through socket ,so before sending the data i have to compress and after receving decompress it.
this is done in vc++
if any one know give sample code or give the suggestion
shakumar
|
|
|
|
|
Try to type Compression on CP article search...
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
shakumar_22 wrote: Any one tell me, how to compress the text data and decompress the same.
zlib can do this for you.
Its free and readily available for inclusion in your project.
Failure is not an option - it's built right in.
|
|
|
|
|
|
Hi all,
I have 'A.exe' running. It loads and uses 'B.dll'.
How to get the name of the dll i.e 'B.dll'?
If i use GetModuleFileName() in 'B.dll' file, it returns 'A.exe' and not 'B.dll'.
I have to write the code in 'B.dll'.
Thank you
|
|
|
|
|
use this code in the b.dll
TCHAR tczFileName[ MAX_FILE_LENGTH ];<br />
MEMORY_BASIC_INFORMATION stMemoryInfo; <br />
static int nAddress;<br />
HMODULE hModule = 0;<br />
if( VirtualQuery( &nAddress, &stMemoryInfo, sizeof( stMemoryInfo ))<br />
!= 0 )<br />
{ <br />
hModule = reinterpret_cast<HMODULE>( <br />
stMemoryInfo.AllocationBase);<br />
}<br />
DWORD dwFileNameLength = GetModuleFileName( hModule,tczFileName,<br />
MAX_FILE_LENGTH );
nave
|
|
|
|
|
Call GetModuleFileName() like this:
TCHAR szPath[1024] = { _T('\0') };
GetModuleFileName((HMODULE)AfxGetInstanceHandle(), szPath, sizeof(szPath)/sizeof(TCHAR)-1);
For non-MFC DLL's, you can just use the hInstance that was passed to the DllMain() function.
|
|
|
|
|
Thank you both for the solution.
|
|
|
|
|
Your DllMain() receives the HINSTANCE for the DLL. Save that and pass it to GetModuleFileName() .
|
|
|
|
|
i have paths of web pages in an ListBox,these pages are placed in my pc folder, i want to open these pages by double clicking those paths....is there any method which can open(execute) a web page??????? plzzzz plzz reply me sooon!
|
|
|
|
|
MahaKh wrote: is there any method which can open(execute) a web page?
ShellExecute(/*parameters*/);
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
hey _AnShUmAn_!!!
thnxxxx a loooot! it really worked great!!!!
thnx again!!!
|
|
|
|
|
And if you want to show this pages on your program you can use of CHtmlView class.
|
|
|
|
|
i hv sent a mail b4..got answer too..that was not the prblm(24th may-Dynamically Combo)..AddString just displaying that string in to combo..when ever administrator creating a new user,it should be written in a .ini file ..and from there it should be retrieve that and display in user combo box.its about that file creation
and retrieving data from it.how to do it?
There are two dialogs.user creation and user login.
|
|
|
|
|
(1) Please write in plain clean English.
(2) If you really need to use a *.INI file then have to use GetPrivateProfileString, WritePrivateProfileString and so on... (you can find a list of these at the bottom of this page http://msdn2.microsoft.com/en-us/library/ms724875.aspx[^] (please consider the alternative of usign the registry or an XML file for the purpose).
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
#define USERNAME_MAXSIZE 260
//write proc
CString oWrite ;
FILE *f ;
f= fopen( "C:\\myfile" , "w" ) ;
//oWrite = combo.text ;
//oWrite = oWrite + "\n" //use a \n at end
//
char bufwrite[USERNAME_MAXSIZE] ;
oWrite = "first_name\n" ;//use a \n at end
fprintf( f , oWrite ) ;
oWrite = "second_name\n" ;
fprintf( f , oWrite ) ;
fclose( f ) ;
//read proc
CString oRead ;
char bufread[USERNAME_MAXSIZE] ;
f = fopen( "C:\\myfile" , "r" ) ;
while( ! feof( f ) && ( fscanf( f , "%s" , bufread ) != -1 ) )
{
oRead = bufread ;
//add to combo
getch();
}
fclose( f ) ;
|
|
|
|
|
|
Hi!
I want to create Microsoft Access Data Project(ADP)File through program in VC++.
Actually I have some Raw Data Which i get From the another Access File and now i want to create ADP file by using that RAW Data. Actually i get a function in Access Application Class.
application.NewAccessProject(filepath, Connect).
this funcation create an empty adp file.
But the problem is that I want to create an ADP file by passing some raw data which I get from another file and the function written above does't have any paramete which may take RAW data. Is there any other way to create the adp file in which I can pass the raw data as an paramater. or is there any other way to do so.
Ansh
|
|
|
|
|
can anyone explain me how to create an msi(set up) file in visual studio 2005?.
-- modified at 2:24 Tuesday 29th May, 2007
|
|
|
|
|
|
Hi,
I have got a very basic question. Do WS_POPUP style windows get created in a separate thread than the thread which created them or do they run in the same thread and somehow also manage a message loop?
Thanks,
---
Hakuna-Matada
It means no worries for the rest of your days...
It's our problem free, Philosophy
"I think my response was 'What idiot dreamed this up?'" -- Mary Ann Davidson, Oracle's chief security officer, in typical blunt manner, remembering her reaction to the company's scheme to brand its databases as "unbreakable."
|
|
|
|
|
HakunaMatada wrote: Do WS_POPUP style windows get created in a separate thread
no. When you call createwindow() from a thread, what ever be its style, it is created in same thread.
nave
|
|
|
|