|
I'm trying to set the height of a combobox (as opposed to the height of the dropdown list), but I just can't seem to find any quick fix for it on the net.
Is there a quick fix?
--
Schni Schna Schnappi! Schnappi Schnappi Schnapp!
|
|
|
|
|
|
Yes I did. But the thing is that comboboxes are bastardizations, and doesn't deserve to be called windows. You can tell it's an OLD OLD hack from the Win 3.x-era (probably 2.x), that's been kept alive due to legacy reasons.
I found the workaround after a good nights sleep. Apparently googling becomes increasingly difficult as you become more tired. Anyway, the solution to the problem (I also found this in the MSDN docs this morning): SetItemHeight(-1, nYourHeight);
Henceforth, I will call this control: "ugly bag of mostly hacks".
--
Schni Schna Schnappi! Schnappi Schnappi Schnapp!
|
|
|
|
|
Hi Guys I have been banging my head against the wall for some time.Please Help...
I have downloaded an example in C#.NET and have made some conversion that have worked
in my C++.NET winform application. Does anyone have any ideas?
The last line does not work.......
// get the collection of sheets in the workbook
//C# example
// Excel.Sheets sheets = theWorkbook.Worksheets;
// This conversion works
Interop::Excel::Sheets *sheets = theWorkbook->Worksheets;
//C# example
// Excel.Worksheet worksheet = (Excel.Worksheet)sheets.get_Item(1);
// This does not work..it is looking for a
// error C2664: 'Interop::Excel::Sheets::get_Item' : cannot convert parameter 1 from 'int'
// to 'System::Object __gc *'
Interop::Excel::Worksheet *worksheet = (Interop::Excel::Worksheet*)sheets->get_Item(1);
|
|
|
|
|
I'm trying to find a way to detect the type of bus connection a video card has, programatically of course. Valid types being PCI, AGP, and PCI-Express. And of course that bus's speed would be nice too, like 8x, 16x, etc. I've been searching everywhere and tried many things, including WMI which doesn't have that information.
Any ideas are much appreciated!
umgoblue525
|
|
|
|
|
Hi,
For quite long time now I've been trying to get the Crypto++ (www.cryptopp.com) library working with a simple MFC Dialog Based application.
The strange thing is that a Win32 console application links and works fine with the same settings :-|
Here are the errors I'm getting:
--------------------Configuration: dialog - Win32 Debug--------------------
Linking...
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::ios_base::Init::Init(void)" (??0Init@ios_base@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::ios_base::Init::~Init(void)" (??1Init@ios_base@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::_Winit::_Winit(void)" (??0_Winit@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::_Winit::~_Winit(void)" (??1_Winit@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(void)" (??1?$basic_s
tring@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(char const *,class st
d::allocator<char> const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBDABV?$allocator@D@1@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >(class std::basic_stri
ng<char,struct std::char_traits<char="">,class std::allocator<char> > const &)" (??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z)" imported
LINK : warning LNK4049: locally defined symbol ""public: char const * __thiscall std::basic_string<char,struct std::char_traits<char="">,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@st
d@@QBEPBDXZ)" imported
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___setlc_active
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___unguarded_readlc_active
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___lc_handle
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol __pctype
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol __pctype
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol __pctype
libcpmtd.lib(wlocale.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___mb_cur_max
libcpmtd.lib(_tolower.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(_toupper.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(xwctomb.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(xmbtowc.obj) : error LNK2001: unresolved external symbol ___lc_codepage
libcpmtd.lib(xstrcoll.obj) : error LNK2001: unresolved external symbol ___lc_collate_cp
Debug/dialog.exe : fatal error LNK1120: 7 unresolved externals
Error executing link.exe.
dialog.exe - 29 error(s), 8 warning(s)
I've followed this tutorial:
http://www.codeproject.com/cpp/dirtypad.asp
with no luck
Here is some of the (I believe) relevant code:
- StdAfx.h
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__C79FF988_1405_4A43_A1AF_A9DF5EC942C9__INCLUDED_)
#define AFX_STDAFX_H__C79FF988_1405_4A43_A1AF_A9DF5EC942C9__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#pragma comment( linker, "/NODEFAULTLIB:msvcprtd.lib" )
#pragma comment( linker, "/NODEFAULTLIB:libcmtd.lib" )
#pragma comment( linker, "/NODEFAULTLIB:msvcprt.lib" )
#pragma comment( linker, "/NODEFAULTLIB:libcmt.lib" )
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__C79FF988_1405_4A43_A1AF_A9DF5EC942C9__INCLUDED_)
- dialogDlg.cpp
// dialogDlg.cpp : implementation file
//
#include "stdafx.h"
#include "dialog.h"
#include "dialogDlg.h"
#include "pch.h"
#include "base64.h"
#include "md5.h"
#include "sha.h"
#include "ripemd.h"
#include "files.h"
#include "rng.h"
#include "hex.h"
#include "gzip.h"
#include "default.h"
#include "osrng.h"
#include "rsa.h"
#include "randpool.h"
#include "ida.h"
#include "socketft.h"
#include "validate.h"
#include "bench.h"
#include <iostream>
#if (_MSC_VER >= 1000)
#include <crtdbg.h> // for the debug heap
#endif
#if defined(__MWERKS__) && defined(macintosh)
#include <console.h>
#endif
USING_NAMESPACE(CryptoPP)
USING_NAMESPACE(std)
...
Maybe there's something wrong with my configuration? Or with my VC++ instalation? Some library is still missing?
I was suggested that there could be something wrong with Calling / Naming convention but changing Calling convention didn't help
I've tried switching many options in Project -> Setting but neither helped.
I'm really in need of help
If needed I can gladly give more code snippets...
Best regards,
Maciej Zieba
|
|
|
|
|
* bump * Any suggestions? Please... * bump *
|
|
|
|
|
* bump * Any suggestions? Please... * bump *
|
|
|
|
|
i want to know that is SDK function and the API are same or different. if same can we use them in vc6.
ddd
|
|
|
|
|
tasleem143 wrote:
i want to know that is SDK function and the API are same or different.
Software Development Kit vs. Application Programming Interface. An SDK can contain many APIs.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
can we use the sdk functions in vc like API without header files or do something exta.
ddd
|
|
|
|
|
You seem to have a fundamental confusion as to what an SDK is and what an API is. While a difference exists, depending on your perspective, there's nary a reason to know. What exactly is it that you are trying to do.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
i had used the api to know the text of active window on the computer.For that i got the api "GetWindowText( , , )" from api text viewer.
i tried to use in the visual c code. but the problem is that there is the Cwnd function with same name but it take two argument.the first argument which is the activewindow handle is not present tell me what to do
more description is below.
result=GetWindowText(m_hhandle1,str1,512);//this is api i had seen on api textviewer comes with visual studio. i want to use API had the three parameter
//1.The first handler form above API
//2. buffer to store the windowname
//3.length of buffer
//but i takes two arg not three bcos it consider it a fucntion of CWnd not API. what to.
/*******************************/
ddd
|
|
|
|
|
CWnd encapsulate the hwnd of the Window; so when using CWnd::GetWindowText( ... ), you actually use the hwnd of the current CWnd ( this ).
if you want to use the ::GetWindowText, you will need to get the HANDLE of the CWnd you want.
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
i had got that handle through the GetForegroundWindow API. but problem is that this Cwnd functin GetWindowText take two argument it does not take the handle of window as parameter as GetWindowText API does.
i hope u had understood the problem that i dont want to use Cwnd function bcos it work for the current window only not all window handle got through the api Getforegroundwindow.i want the enabling of api function not cwnd func.
ddd
|
|
|
|
|
if you want to use API function, you need to use the :: prefix for the function :
::GetWindowText( ... );
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Try:
result = ::GetWindowText(m_hhandle1, str1, 512);
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
thanks it works. but what actually :: does if u can tell me.
ddd
|
|
|
|
|
The :: indicates that the function is part of the global namespace ( or global scope depending on the documentation ).
Maximilien Lincourt
Your Head A Splode - Strong Bad
|
|
|
|
|
Like I indicated, it's the scope resolution operator.
"Ideas are a dime a dozen. People who put them into action are priceless." - Unknown
|
|
|
|
|
How to use the RTC Client API?I downloaded the version 1.2 and 1.3 and installed them,but I still
can't run the programmes about RTC on my Windows 2000 SP4 operating systems!!
Always "Initialization Error" !?
Run-Time Requirements:
The RTC Client API version 1.2 requires Rtcdll.dll on Windows Server 2003, Windows XP, and Windows 2000 operating systems.
The RTC Client API version 1.3 requires Rtcdll.dll on Windows Server 2003, Windows XP, and Windows 2000 SP4 operating systems.
BOOL CAVDConfDlg::OnInitDialog()<br />
{<br />
CDialog::OnInitDialog();<br />
<br />
SetIcon(m_hIcon, TRUE);
SetIcon(m_hIcon, FALSE);
<br />
if (InitRTCClient() != S_OK)<br />
{<br />
MessageBox ( "Initialization Error" );<br />
m_cMakeCall.EnableWindow ( FALSE );<br />
m_cAppCall.EnableWindow ( FALSE );<br />
m_cMessaging.EnableWindow ( FALSE );<br />
m_cTuning.EnableWindow ( FALSE );<br />
m_cWhiteboard.EnableWindow ( FALSE );<br />
}<br />
<br />
return TRUE;
}
|
|
|
|
|
Is there a way to check if a thread is currently suspended?
Pandoras Gift #44: Hope. The one that keeps you on suffering. aber.. "Wie gesagt, der Scheiss is' Therapie" boost your code || Fold With Us! || sighist | doxygen
|
|
|
|
|
This is abit of a guess, but you could call SuspendThread , followed by a call to ResumeThread (these functions maintain a "suspension count", and test the return code of ResumeThread to see if it was suspended before your two calls.
|
|
|
|
|
Hi
What is the basic idea to track the url requests. My intention is trap all url request i post using IE or mozilla and say save that to a file. Can any one help me in this regard.
Regards
Vivek Ragunathan
|
|
|
|
|
to track the urls of ie, it is possible to create a "browser helper object" (a kind of plugin for (internet) explorer). if i remember well, you can be notified on each new navigation.
++
thomas
|
|
|
|