[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Borland Button in Resource Workshop.

Posted on 2000-02-24
5
Medium Priority
?
821 Views
Last Modified: 2010-05-18
Will somebody explain to me why when I create the 'borland button' with using Resource Workshop, After compiled. The Dialog Box which contains this kind of Borland Button cannot appear when I run the project's .exe application. It is only can appear when after I start my Borland 4.5.
0
Comment
Question by:b_k_cheah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2557711
Do you want use Bitmap Button? See Borland Doc about using BWCC controls: you must make 3 state bitmaps(usual, pressed, choused ) and write code for
displaying Bitmap. See in you
bc45\doc bwcc.txt(if i remember right).
I can send you it(and example of using ,
if you add PTS),but only in sandy:it is in office.

 
0
 

Author Comment

by:b_k_cheah
ID: 2560552
send it to me please.. I will really appreciate it. I am writing my source code in Win API form. I wonder whether I need to change to Borland Object-Oriented Programming format or not. Please advise.
0
 
LVL 14

Expert Comment

by:AlexVirochovsky
ID: 2560699
Ok, but write you EMail!
0
 

Author Comment

by:b_k_cheah
ID: 2562157
My email is b_k_cheah@telebot.com
0
 
LVL 14

Accepted Solution

by:
AlexVirochovsky earned 200 total points
ID: 2565386
Hi, i send you bwcc.zip with doc about BWCC, but in you
BC5\help must be BWCC.hlp with same thing.
Next is snippet of working code:
in you RC file:
IDD_DIALOGORDER DIALOG 20, 0, 195, 112
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CLASS "bordlg"
CAPTION "test"
FONT 11, "Courier New (Hebrew)"
{
 ...
 CONTROL "", IDC_BITMAP1, "BorBtn", BS_DEFPUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_BORDER, 95, 90, 40,20
 CONTROL "", IDC_BITMAP2, "BorBtn", BS_PUSHBUTTON | WS_CHILD | WS_VISIBLE | WS_BORDER, 95, 90, 40,20
 ...
}
In you InitMainWindow()
....
#include <bwcc.h>
....
void app::InitMainWindow()
{
  ...
   // Borland Windows custom controls.
  //
  EnableBWCC();
  HINSTANCE hInst = GetMainWindow()->GetModule()->GetInstance();
  BWCCRegister(hInst);
  ...
}
In you Dialog Class:
....
#include <bwcc.h>
....
DEFINE_RESPONSE_TABLE1(DisplayArea, TDialog)
  ...
   EV_COMMAND(IDC_BITMAP1, EvOk),            //Press enter
   ....
END_RESPONSE_TABLE;

void DisplayArea::SetupWindow()
{
  TDialog::SetupWindow();
  ....
  HBITMAP hBits[3];

  HWND  hWndButton = ::GetDlgItem( this->HWindow, IDC_BITMAP1);

  HINSTANCE hInst = GetApplication()->GetMainWindow()->GetModule()->GetInstance();
  hBits[0] = ::LoadBitmap(hInst, MAKEINTRESOURCE( IDB_VBOK0)); //not pressed
  hBits[1] = ::LoadBitmap(hInst, MAKEINTRESOURCE( IDB_VBOK1)); //pressed
  hBits[2] = ::LoadBitmap(hInst, MAKEINTRESOURCE( IDB_VBOK2)); //choused

  ::SendMessage( hWndButton, BBM_SETBITS, 0, (LONG) (LPSTR) hBits);
 ...
 //of course, Bitmaps VBOK0, .. must be in you RC file
}
And don't forget make you Apps with BWCC enable(in TargetExpert)
I hope, it helps. Alex
I wll be happy, if you increase some PTS:
only retype this text ~ 1/2 hour!

0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: SunnyDark
This article's goal is to present you with an easy to use XML wrapper for C++ and also present some interesting techniques that you might use with MS C++. The reason I built this class is to ease the pain of using XML files with C++, since there is…
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
Suggested Courses

656 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question