|
Hai
In my VC++ application i want to show the selected folder(from browse) in a separate list box and also the subfolders like a treeview.I dont need any control on folders, its just to show the folders..as in the browse folder dialog box.
Can any one suggest about the APIs that are usefull.
Thanks in advance
Regards
vijay
|
|
|
|
|
Hi
By default a property page has three buttons ie BACK,NEXT and CANCEL.
Along with these buttons,I want a FINISH button also in my Property pages.
How to achieve it?
With Regards
Neeraj Sinha
Netstudio
Pune
|
|
|
|
|
In wizard mode, the last property page in the set will change the 'next' button to 'finish' automatically. Check out the PSH_WIZARD and PSH_WIZARDHASFINISH values for the dwFlags value in the PROPSHEETHEADER [^] structure.
Software Zen: delete this;
|
|
|
|
|
Well,it's correct that On the last wizard page,the NEXT button can be
automatically changed to FINISH button,but I want the FINISH button
on all the wizard pages right from it's first page along with the NEXT,
BACK and CANCEL button at the same time.Is it possible to do so?
With Regards
Neeraj Sinha
Netstudio
Pune
|
|
|
|
|
Setting the PSH_WIZARDHASFINISH value in the dwFlags member of the PROPSHEETHEADER should do that. If you are using the CPropertyPage /CPropertySheet MFC classes, you should be able to do something like this:
CPropertySheet sheet;
sheet.m_psh.dwFlags |= PSH_WIZARD | PSH_WIZARDHASFINISH;
sheet.AddPage(...);
sheet.DoModal(); Alternatively, you can use the SetWizardButtons member function in the CPropertySheet class.
Software Zen: delete this;
|
|
|
|
|
|
In MFC exe application, how do populate my combo box using RecordSet Object, if i created my application with "database file support" at the time of creating the project.
I am getting exception message like "No colomns were bound before SQLBulkFetch" and like "No data fields found on which fetch specified"
I created RS object,I am calling SetRowSize(25), I am calling open(...) and getting exceptions.
san
|
|
|
|
|
Hi,
This is regarding conversion of C++ Multibyte character set to UNICODE character set.
We are converting the ANSI C++ source code to make it UNICODE compatible. But while converting the parameters of basic_istream methods like read(), write() etc. we are getting the following error:
error C2664: 'std::basic_istream<_Elem,_Traits> with [_Elem=char,_Traits=std::char_traits<char>]::read' : cannot convert parameter 1 from '_TCHAR *' to 'char *'; Types pointed to are unrelated; conversion requires reinterpret_cast, C-style cast or function-style cast
The error is in the source code:
strm.read(data_+length(), capacity()-length());
Where the parameter of type _TCHAR * is passed whereas it's expecting char *. Could anyone please tell me what change should I do to the method to make it UNICODE compatible.
Thanks in Advance,
Debabrata Mukherjee
|
|
|
|
|
You have to change the declaration of strm . This[^] article might be of some help to you. Just be sure to heed this[^] warning.
You may be right
I may be crazy
-- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
do anyone know about structured storage. please explain. i need a basic tutorial for this.
Arise Awake Stop Not Till ur Goal is Reached.
|
|
|
|
|
Google has some.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi, first off thnx for the help guys getting a variable passed to a thread..
it works.
but i need to get either a return and check the status of a variable in that thread at any given point of time. can you help me out..
|
|
|
|
|
The basic approach to this problem is to have a variable that is accessible to both the thread and your program, and then to use one of the thread synchronization primitives to 'protect' the variable from simultaneous access by the program and the thread.
Here's a crude example, using an int as the shared data and a critical section for the thread sync primitive:
static int SharedVariable = 0;
CCriticalSection SharedCS;
static UINT Thread(LPVOID parameter);
int main()
{
AfxBeginThread(Thread,NULL);
for (;;<nobr>) {
SharedCS.Lock();
int shared_variable = SharedVariable;
SharedCS.Unlock();
}
}
UINT Thread(LPVOID parameter)
{
SharedCS.Lock();
SharedVariable = 1;
SharedCS.Unlock();
SharedCS.Lock();
SharedVariable = 2;
SharedCS.Unlock();
return 0;
} Each time either the main program or the thread function need to access the shared variable, they lock the critical section before the access, and unlock it afterward. When locked, a critical section guarantees that only one thread may 'enter' the section at a time. In my example, the main program is only reading the value, using it to monitor the progress of the thread.
Software Zen: delete this;
|
|
|
|
|
hi,
I am new to VC++ i am getting error for all assert's in the code. The error is error C2065: '__MODULE__' : undeclared identifier. I included assert.h still i am getting this error. Can any one tell me why is this error and what should i do to remove this error.
Sunil Reddy
|
|
|
|
|
Install latest platform SDK. Refer this FAQ[^].
|
|
|
|
|
Hi
All
I want to change font of Dialog Box in VC++ 6.0 which used CPropertyPage class.I this case there are more that one page on Dialog Box so how to change font of each page.
Thanks and Regards
Atul
Atul M
|
|
|
|
|
You have asked this question on numerous occasions in last few months. And answer is same. Use CWnd::SetFont . You need to dig out some things to get things done.
|
|
|
|
|
Thanks for reply
Where this function should call
Thanks
Atul
A
|
|
|
|
|
One of those places would be in OnInitdialog of property pages.
|
|
|
|
|
Hi,
In my MFC application I have shortcut keys, Now I want to check if the message is allready on queue I don,t want to add it, I mean to say if I have press CTRL+z till this undo action is completed user shold not be able to do another undo meance CTRL+z message wil be discarded.
How can I do this?
Thanks,
Rushiraj
|
|
|
|
|
Have a look at GetQueueStatus() .
You may be right I may be crazy -- Billy Joel --
Within you lies the power for good, use it!!!
|
|
|
|
|
In your handler for the CTRL+Z, do something like this:
void MyClass::MyCtrlZHandler()
{
static bool in_progress = false;
if (!in_progress) {
in_progress = true;
in_progress = false;
}
} If a second CTRL+Z comes in while the first is being handled, it is simply ignored.
Software Zen: delete this;
|
|
|
|
|
When my app rx'es a message, it gets it in the form of a MSG struct. That MSG contains the HWND that is to receive the message (i.e. my wnd). Is there any way to find the main HWND of the process that sent the message?
|
|
|
|
|
No (to my knowledge).
What message do you use, and what do oyu need the sender for?
Developers, Developers, Developers, Developers, Developers, Developers, Velopers, Develprs, Developers! We are a big screwed up dysfunctional psychotic happy family - some more screwed up, others more happy, but everybody's psychotic joint venture definition of CP Linkify!|Fold With Us!
|
|
|
|
|
It's a registered message, sent between associated apps. I want the receiving app to be able to display (in a list) the name of the app that sent the msg. I could pass the sender's HWND in the wParam or lParam, but I'm extending an existing app that already uses W and L, so I'm plumb out of args and trying to cook up a workaround
|
|
|
|